From: Shengjiu Wang Date: Mon, 21 Mar 2016 05:09:26 +0000 (+0800) Subject: MLK-12464-2: ASoC: wm8960: fix clock is not correct after suspend/resume X-Git-Tag: C0P2-H0.0--20200415~3646 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=233c0a72e580b6dff61e75ebdf73ea8ce19201a6;p=linux.git MLK-12464-2: ASoC: wm8960: fix clock is not correct after suspend/resume After the suspend/resume, hw_params may be called in bias_level is not BIAS_ON, then the PLL is not disable/enabled, if the sample rate is changed, the output clock is not correct. Signed-off-by: Shengjiu Wang --- diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 3bf081a7e450..4acc4fd77ca6 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -765,8 +765,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, wm8960->is_stream_in_use[tx] = true; - if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON && - !wm8960->is_stream_in_use[!tx]) + if (!wm8960->is_stream_in_use[!tx]) return wm8960_configure_clocking(codec); return 0; @@ -819,10 +818,6 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec, } } - ret = wm8960_configure_clocking(codec); - if (ret) - return ret; - /* Set VMID to 2x50k */ snd_soc_update_bits(codec, WM8960_POWER1, 0x180, 0x80); break;