ASoC: Enable SYSCLK last when enabling WM8962 mic detection
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 1 Nov 2011 15:59:03 +0000 (15:59 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 1 Nov 2011 18:56:26 +0000 (18:56 +0000)
Ensure everything is set up before we start detecting.

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

index 74ed8831990e68f52bd19a90f98d2ca9c53a7630..430bf535d546bf017571056f7cc9fec353eeee90 100644 (file)
@@ -3661,6 +3661,9 @@ int wm8962_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
        snd_soc_jack_report(wm8962->jack, 0,
                            SND_JACK_MICROPHONE | SND_JACK_BTN_0);
 
+       if (jack)
+               snd_soc_dapm_force_enable_pin(&codec->dapm, "SYSCLK");
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(wm8962_mic_detect);