Skip to contentSkip to conversation

ASoC: wm8994: Fix reporting of accessory removal on WM8958

PATCH New Mark Brown 1 participant 1 message May 27, 2013

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: wm8994: Fix reporting of accessory removal on WM8958

During recent refactoring the code to report removal when MICDET reports an absent microphone was removed, causing problems for systems which rely solely on the MICDET for this functionality. Restore it.

---
 sound/soc/codecs/wm8994.c |    5 +++++
 1 file changed, 5 insertions(+)
sound/soc/codecs/wm8994.c +5 -0
index 0bcbd12..5f51127 100644
@@ -3856,6 +3856,11 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
 			dev_dbg(codec->dev, "Ignoring removed jack\n");
 			return IRQ_HANDLED;
 		}
+	} else if (!(reg & WM8958_MICD_STS)) {
+		snd_soc_jack_report(wm8994->micdet[0].jack, 0,
+				    SND_JACK_MECHANICAL | SND_JACK_HEADSET |
+				    wm8994->btn_mask);
+		goto out;
 	}
 
 	if (wm8994->mic_detecting)
Signature · 1 line
1.7.10.4