Skip to contentSkip to conversation

ASoC: wm8994: Disable debounce of jack detection on inserted jack

PATCH New Mark Brown 1 participant 1 message Mar 1, 2012

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: wm8994: Disable debounce of jack detection on inserted jack

Don't debounce jack detection for inserted jacks, giving improved responsiveness.

---
 sound/soc/codecs/wm8994.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8994.c +8 -0
index bc1f119..81d62a3 100644
@@ -3235,6 +3235,10 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
 		snd_soc_update_bits(codec, WM8958_MICBIAS2,
 				    WM8958_MICB2_DISCH, 0);
 
+		/* Disable debounce while inserted */
+		snd_soc_update_bits(codec, WM1811_JACKDET_CTRL,
+				    WM1811_JACKDET_DB, 0);
+
 		/*
 		 * Start off measument of microphone impedence to find
 		 * out what's actually there.
@@ -3270,6 +3274,10 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
 				    SND_JACK_MECHANICAL | SND_JACK_HEADSET |
 				    wm8994->btn_mask);
 
+		/* Enable debounce while removed */
+		snd_soc_update_bits(codec, WM1811_JACKDET_CTRL,
+				    WM1811_JACKDET_DB, WM1811_JACKDET_DB);
+
 		wm8994->mic_detecting = false;
 		wm8994->jack_mic = false;
 		snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
Signature · 1 line
1.7.9.1