Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5404be2 authored by Yeleswarapu Nagaradhesh's avatar Yeleswarapu Nagaradhesh
Browse files

ASoc: wcd-mbhc: correct handling of electrical interrupts



When 5 pole headset is removed, electrical interrupts are
disabled but intr_status bit is not set properly. Due to
which interrupts are not enabled when extension cable is
connected. So, corrrect handling on electrical interrupts.

CRs-Fixed: 1111164
Change-Id: I6d1c667ae6c44e7f0767df3e5450e99614717cc6
Signed-off-by: default avatarYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
parent 87905821
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1593,12 +1593,8 @@ static void wcd_mbhc_swch_irq_handler(struct wcd_mbhc *mbhc)
			WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, 0);
			wcd_mbhc_report_plug(mbhc, 0, SND_JACK_LINEOUT);
		} else if (mbhc->current_plug == MBHC_PLUG_TYPE_ANC_HEADPHONE) {
			mbhc->mbhc_cb->irq_control(codec,
					mbhc->intr_ids->mbhc_hs_rem_intr,
					false);
			mbhc->mbhc_cb->irq_control(codec,
					mbhc->intr_ids->mbhc_hs_ins_intr,
					false);
			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,
						 0);
			WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, 0);