aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-25 10:19:20 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-25 10:35:40 -0500
commit9fb83526a898f14adbd3f6f52fa7126f528f15ac (patch)
tree2f798da96ce9cf8b57fc262285d92caf9b05a0a9 /sound
parentc83f1d7e71625801c72f4013291194e09b6f0a6e (diff)
ASoC: wm5100: Make sure we switch to button reporting mode
When we have identified an accessory make sure we've flagged that we've done so in order to make sure we always report buttons and don't continue to polarity flip. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm5100.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 66f0611e68b6..3f8fd3ca9454 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2183,6 +2183,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec)
2183 if (wm5100->jack_detecting) { 2183 if (wm5100->jack_detecting) {
2184 dev_dbg(codec->dev, "Microphone detected\n"); 2184 dev_dbg(codec->dev, "Microphone detected\n");
2185 wm5100->jack_mic = true; 2185 wm5100->jack_mic = true;
2186 wm5100->jack_detecting = false;
2186 snd_soc_jack_report(wm5100->jack, 2187 snd_soc_jack_report(wm5100->jack,
2187 SND_JACK_HEADSET, 2188 SND_JACK_HEADSET,
2188 SND_JACK_HEADSET | SND_JACK_BTN_0); 2189 SND_JACK_HEADSET | SND_JACK_BTN_0);
@@ -2221,6 +2222,7 @@ static void wm5100_micd_irq(struct snd_soc_codec *codec)
2221 SND_JACK_BTN_0); 2222 SND_JACK_BTN_0);
2222 } else if (wm5100->jack_detecting) { 2223 } else if (wm5100->jack_detecting) {
2223 dev_dbg(codec->dev, "Headphone detected\n"); 2224 dev_dbg(codec->dev, "Headphone detected\n");
2225 wm5100->jack_detecting = false;
2224 snd_soc_jack_report(wm5100->jack, SND_JACK_HEADPHONE, 2226 snd_soc_jack_report(wm5100->jack, SND_JACK_HEADPHONE,
2225 SND_JACK_HEADPHONE); 2227 SND_JACK_HEADPHONE);
2226 2228