ASoC: Ensure we reconfigure WM8958 microphone detection on rate changes
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 1 Dec 2011 12:43:26 +0000 (12:43 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 1 Dec 2011 14:21:58 +0000 (14:21 +0000)
We don't need to rerun DAPM if the clock source is the same but we do
need to adjust the microphone detection rate in case we are moving from
an audio to a non-audio rate.

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

index 2e28f472b963f01629f12c4e88edbfa8b68312d8..91f3638ab33fbc55f6e61f0c4e6a65f0bebdd8c6 100644 (file)
@@ -307,10 +307,8 @@ static int configure_clock(struct snd_soc_codec *codec)
 
        change = snd_soc_update_bits(codec, WM8994_CLOCKING_1,
                                     WM8994_SYSCLK_SRC, new);
-       if (!change)
-               return 0;
-
-       snd_soc_dapm_sync(&codec->dapm);
+       if (change)
+               snd_soc_dapm_sync(&codec->dapm);
 
        wm8958_micd_set_rate(codec);