aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1dcccdbbc8b6..fdef56c1320b 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3755,6 +3755,18 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3755 trace_snd_soc_jack_irq(dev_name(codec->dev)); 3755 trace_snd_soc_jack_irq(dev_name(codec->dev));
3756#endif 3756#endif
3757 3757
3758 /* Avoid a transient report when the accessory is being removed */
3759 if (wm8994->jackdet) {
3760 reg = snd_soc_read(codec, WM1811_JACKDET_CTRL);
3761 if (reg < 0) {
3762 dev_err(codec->dev, "Failed to read jack status: %d\n",
3763 reg);
3764 } else if (!(reg & WM1811_JACKDET_LVL)) {
3765 dev_dbg(codec->dev, "Ignoring removed jack\n");
3766 return IRQ_HANDLED;
3767 }
3768 }
3769
3758 if (wm8994->mic_detecting) 3770 if (wm8994->mic_detecting)
3759 wm8958_mic_id(codec, reg); 3771 wm8958_mic_id(codec, reg);
3760 else 3772 else