summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordojha <dojha@codeaurora.org>2016-07-11 11:14:45 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-20 01:22:36 -0700
commit37545170e3491ee9a670b6ebef6f0be5fecf12cd (patch)
treeae84a8b4209f57cfc46a40d38c8b3553af900e3f
parent7eb20e5733b82473d2d1e9e59aa42989e73f3c70 (diff)
ASoC: wcd-mbhc: disable fake electrical interrupts
Electrical interrupts are enabled across mechanical removal of headphone. This causes fake electrical removal interrupts during cross connection check. So disable electrical interrupts during removal of headphone. CRs-Fixed: 1030696 Change-Id: Ib4cc92b86f01991d8d8dbad54c68ee79cbaea44a Signed-off-by: dojha <dojha@codeaurora.org>
-rw-r--r--sound/soc/codecs/wcd-mbhc-v2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
index 63ffacad61e1..0e0e235217ac 100644
--- a/sound/soc/codecs/wcd-mbhc-v2.c
+++ b/sound/soc/codecs/wcd-mbhc-v2.c
@@ -1545,6 +1545,13 @@ static void wcd_mbhc_swch_irq_handler(struct wcd_mbhc *mbhc)
mbhc->btn_press_intr = false;
if (mbhc->current_plug == MBHC_PLUG_TYPE_HEADPHONE) {
+ wcd_mbhc_hs_elec_irq(mbhc, WCD_MBHC_ELEC_HS_REM,
+ false);
+ wcd_mbhc_hs_elec_irq(mbhc, WCD_MBHC_ELEC_HS_INS,
+ false);
+ WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_DETECTION_TYPE,
+ 1);
+ WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, 0);
wcd_mbhc_report_plug(mbhc, 0, SND_JACK_HEADPHONE);
} else if (mbhc->current_plug == MBHC_PLUG_TYPE_GND_MIC_SWAP) {
wcd_mbhc_report_plug(mbhc, 0, SND_JACK_UNSUPPORTED);