Skip to content

Commit

Permalink
ASoC: wm8994: Disable debounce of jack detection on inserted jack
Browse files Browse the repository at this point in the history
Don't debounce jack detection for inserted jacks, giving improved
responsiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Mar 1, 2012
1 parent df0c016 commit 378ec0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 378ec0c

Please sign in to comment.