From: Mark Brown Date: Thu, 1 Mar 2012 19:01:43 +0000 (+0000) Subject: ASoC: wm8994: Disable debounce of jack detection on inserted jack X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=378ec0ca38527d3ca3683f7f38f3243c8d0a90f3;p=deliverable%2Flinux.git ASoC: wm8994: Disable debounce of jack detection on inserted jack Don't debounce jack detection for inserted jacks, giving improved responsiveness. Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index bc1f1199a87f..81d62a38475e 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -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,