ASoC: wm8994: Make sure we disable FLL bypass when stopping the FLL
authorKyung-Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Tue, 24 Apr 2012 17:01:48 +0000 (18:01 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 25 Apr 2012 08:50:50 +0000 (09:50 +0100)
If FLL bypass is left enabled when we disable the CODEC then the output
clock will be left running which consumes a small amount of additional
current. Only enable bypass when there is an output.

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

index 4cebac4f621569a3695e1a163628a0a81e57a8f2..746d3db6f19ff21b0cdc9995670c4d825ab0bb4b 100644 (file)
@@ -1982,7 +1982,7 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
                            WM8994_FLL1_ENA, 0);
 
        if (wm8994->fll_byp && src == WM8994_FLL_SRC_BCLK &&
-           freq_in == freq_out) {
+           freq_in == freq_out && freq_out) {
                dev_dbg(codec->dev, "Bypassing FLL%d\n", id + 1);
                snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_5 + reg_offset,
                                    WM8958_FLL1_BYP, WM8958_FLL1_BYP);