]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changes
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 3 Mar 2012 18:46:06 +0000 (18:46 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 4 Mar 2012 01:57:37 +0000 (01:57 +0000)
Normally this will have no effect as we set detection up at system startup
before DAPM syncs take effect, this will only be useful if the system
enables and disables detection at runtime.

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

index 1fef87d6a285d30c33c37d270e6dee55f60b8881..17baacbcf2f59ec495aefab80da212d7f8440538 100644 (file)
@@ -3330,6 +3330,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
                }
 
                snd_soc_dapm_force_enable_pin(&codec->dapm, "CLK_SYS");
+               snd_soc_dapm_sync(&codec->dapm);
 
                wm8994->micdet[0].jack = jack;
                wm8994->jack_cb = cb;
@@ -3376,6 +3377,7 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
                snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
                                    WM8958_MICD_ENA, 0);
                snd_soc_dapm_disable_pin(&codec->dapm, "CLK_SYS");
+               snd_soc_dapm_sync(&codec->dapm);
        }
 
        return 0;