Browse Source

ASoC: lpass_cdc: Disable va_swr gpio on clk failure

During SSR down event,
ensure swr gpios are put to sleep even in error conditions.

Change-Id: I649d088d0bc429c9b7a02304272eaea06774ca51
Signed-off-by: Ganapathiraju Sarath Varma <[email protected]>
Ganapathiraju Sarath Varma 2 years ago
parent
commit
3533e47a4d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c

+ 4 - 0
asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c

@@ -732,6 +732,10 @@ static int lpass_cdc_va_macro_tx_va_mclk_enable(
 							   TX_CORE_CLK,
 							   false);
 			if (ret < 0) {
+				if (va_priv->swr_clk_users == 0) {
+					msm_cdc_pinctrl_select_sleep_state(
+							va_priv->va_swr_gpio_p);
+				}
 				dev_err_ratelimited(va_priv->dev,
 					"%s: swr request clk failed\n",
 					__func__);