From 3b18f8660ea24b4e559beb8d56049044e243e818 Mon Sep 17 00:00:00 2001 From: Sudheer Papothi Date: Tue, 18 Nov 2014 08:20:22 +0530 Subject: [PATCH] ASoC: wcd9xxx: Handle fake mechanical interrupt Handle fake mechanical interrupt during slow insertion of headset usecase when the plug type is detected as lineout. CRs-Fixed: 754305 Change-Id: I559309915771b633c6f1677f020459b8afc1f574 Signed-off-by: Sudheer Papothi Signed-off-by: Shreyas Nagasandra Chandrasekhar --- sound/soc/codecs/wcd9xxx-mbhc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd9xxx-mbhc.c b/sound/soc/codecs/wcd9xxx-mbhc.c index 877fa204370..1cc809cf4ca 100644 --- a/sound/soc/codecs/wcd9xxx-mbhc.c +++ b/sound/soc/codecs/wcd9xxx-mbhc.c @@ -3221,9 +3221,13 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc) &mbhc->correct_plug_swch); if ((mbhc->current_plug != PLUG_TYPE_NONE) && + (mbhc->current_plug != PLUG_TYPE_HIGH_HPH) && !(snd_soc_read(codec, WCD9XXX_A_MBHC_INSERT_DETECT) & - (1 << 1))) + (1 << 1))) { + pr_debug("%s: current plug: %d\n", __func__, + mbhc->current_plug); goto exit; + } /* Disable Mic Bias pull down and HPH Switch to GND */ snd_soc_update_bits(codec, mbhc->mbhc_bias_regs.ctl_reg, 0x01,