Explorar el Código

aosc: codecs: set mclk flag false when mclk is disabled

the dapm_mclk_enable flag has not been set back to false
when the actual mclk is disabled.

Change-Id: Ic04756b3dcd074887dd1e93f23cf31873abc1428
Signed-off-by: Junkai Cai <[email protected]>
Junkai Cai hace 3 años
padre
commit
9107dae9d8

+ 3 - 1
asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c

@@ -937,8 +937,10 @@ static int lpass_cdc_wsa_macro_mclk_event(struct snd_soc_dapm_widget *w,
 			wsa_priv->dapm_mclk_enable = true;
 		break;
 	case SND_SOC_DAPM_POST_PMD:
-		if (wsa_priv->dapm_mclk_enable)
+		if (wsa_priv->dapm_mclk_enable) {
 			lpass_cdc_wsa_macro_mclk_enable(wsa_priv, 0, true);
+			wsa_priv->dapm_mclk_enable = false;
+		}
 		break;
 	default:
 		dev_err(wsa_priv->dev,

+ 3 - 1
asoc/codecs/lpass-cdc/lpass-cdc-wsa2-macro.c

@@ -936,8 +936,10 @@ static int lpass_cdc_wsa2_macro_mclk_event(struct snd_soc_dapm_widget *w,
 			wsa2_priv->dapm_mclk_enable = true;
 		break;
 	case SND_SOC_DAPM_POST_PMD:
-		if (wsa2_priv->dapm_mclk_enable)
+		if (wsa2_priv->dapm_mclk_enable) {
 			lpass_cdc_wsa2_macro_mclk_enable(wsa2_priv, 0, true);
+			wsa2_priv->dapm_mclk_enable = false;
+		}
 		break;
 	default:
 		dev_err(wsa2_priv->dev,