Skip to contentSkip to conversation

ASoC: wm5100: Make sure we switch to button reporting mode

PATCH New Mark Brown 1 participant 1 message Jan 25, 2012

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/codecs/wm5100.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm5100.c +2 -0
index 6a04ee2..0c82f38 100644
@@ -2161,6 +2161,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
 		if (wm5100->jack_detecting) {
 			dev_dbg(wm5100->dev, "Microphone detected\n");
 			wm5100->jack_mic = true;
+			wm5100->jack_detecting = false;
 			snd_soc_jack_report(wm5100->jack,
 					    SND_JACK_HEADSET,
 					    SND_JACK_HEADSET | SND_JACK_BTN_0);
@@ -2199,6 +2200,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
 					    SND_JACK_BTN_0);
 		} else if (wm5100->jack_detecting) {
 			dev_dbg(wm5100->dev, "Headphone detected\n");
+			wm5100->jack_detecting = false;
 			snd_soc_jack_report(wm5100->jack, SND_JACK_HEADPHONE,
 					    SND_JACK_HEADPHONE);
 
Signature · 1 line
1.7.9.rc1