MLK-12464-2: ASoC: wm8960: fix clock is not correct after suspend/resume
authorShengjiu Wang <shengjiu.wang@freescale.com>
Mon, 21 Mar 2016 05:09:26 +0000 (13:09 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:51:45 +0000 (14:51 -0500)
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 <shengjiu.wang@freescale.com>
sound/soc/codecs/wm8960.c

index 3bf081a..4acc4fd 100644 (file)
@@ -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;