ASoC: wm8962: Only configure BCLK in hw_params when audio is active
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 16 Feb 2012 08:46:44 +0000 (00:46 -0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 Feb 2012 06:32:00 +0000 (22:32 -0800)
Otherwise we might not have a sensible clocking setup ready.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8962.c

index a5b8a0963581fc3f5b58ecbd54b78327c30248ea..d285bc1556d29717cf678bc59bbf9c96177673f8 100644 (file)
@@ -2675,7 +2675,8 @@ static int wm8962_hw_params(struct snd_pcm_substream *substream,
                            WM8962_SAMPLE_RATE_INT_MODE |
                            WM8962_SAMPLE_RATE_MASK, adctl3);
 
-       wm8962_configure_bclk(codec);
+       if (codec->dapm.bias_level == SND_SOC_BIAS_ON)
+               wm8962_configure_bclk(codec);
 
        return 0;
 }