Prechádzať zdrojové kódy

asoc: lpass-cdc: avoid enabling VA_MCLk when requested clk is not default clk

When requested clk is not default clk, it should not enable
VA_MCLk directly. lpass_cdc_clk_rsc_check_and_update_va_clk
will take care of VA_MCLK switch.

Change-Id: I602be7dcc0228fd2e6ecd7624a96663e89485bd0
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 3 rokov pred
rodič
commit
52aa968296
1 zmenil súbory, kde vykonal 5 pridanie a 3 odobranie
  1. 5 3
      asoc/codecs/lpass-cdc/lpass-cdc-clk-rsc.c

+ 5 - 3
asoc/codecs/lpass-cdc/lpass-cdc-clk-rsc.c

@@ -510,10 +510,12 @@ int lpass_cdc_clk_rsc_request_clock(struct device *dev,
 		mux_switch = true;
 
 	if (mux_switch) {
-		ret = lpass_cdc_clk_rsc_mux1_clk_request(priv, clk_id_req,
+		if (clk_id_req != VA_CORE_CLK) {
+			ret = lpass_cdc_clk_rsc_mux1_clk_request(priv, clk_id_req,
 							enable);
-		if (ret < 0)
-			goto err;
+			if (ret < 0)
+				goto err;
+		}
 	} else {
 		ret = lpass_cdc_clk_rsc_mux0_clk_request(priv, clk_id_req, enable);
 		if (ret < 0)