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

Commit 8133494a authored by Yeleswarapu, Nagaradhesh's avatar Yeleswarapu, Nagaradhesh
Browse files

Asoc: wcd9xxx: Avoid unnecessary dispatch of mechanical interrupts



Interrupt number for WCD9306_IRQ_MBHC_JACK_SWITCH and
WCD9320_IRQ_EAR_PA_STARTUP is same due to this single interrupt is
dispatched twice, due to this real interrupts are not getting handled.
To avoid this remove WCD9320_IRQ_EAR_PA_STARTUP from interrupt table.

CRs-Fixed: 589453
Change-Id: Id1945bb6399bc9b3f991ffc587b83ca02dd9647d
Signed-off-by: default avatarYeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
parent cd74cbf9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -555,7 +555,6 @@ static const struct intr_data intr_tbl_v2[] = {
	{WCD9XXX_IRQ_EAR_PA_OCPL_FAULT, false},
	{WCD9XXX_IRQ_HPH_L_PA_STARTUP, false},
	{WCD9XXX_IRQ_HPH_R_PA_STARTUP, false},
	{WCD9320_IRQ_EAR_PA_STARTUP, false},
	{WCD9XXX_IRQ_RESERVED_0, false},
	{WCD9XXX_IRQ_RESERVED_1, false},
	{WCD9XXX_IRQ_MAD_AUDIO, false},
+6 −4
Original line number Diff line number Diff line
@@ -3171,16 +3171,15 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc)
	if (wcd9xxx_cancel_btn_work(mbhc))
		pr_debug("%s: button press is canceled\n", __func__);

	/* cancel detect plug */
	wcd9xxx_cancel_hs_detect_plug(mbhc,
				      &mbhc->correct_plug_swch);

	insert = !wcd9xxx_swch_level_remove(mbhc);
	pr_debug("%s: Current plug type %d, insert %d\n", __func__,
		 mbhc->current_plug, insert);
	if ((mbhc->current_plug == PLUG_TYPE_NONE) && insert) {
		mbhc->lpi_enabled = false;
		wmb();
		/* cancel detect plug */
		wcd9xxx_cancel_hs_detect_plug(mbhc,
				      &mbhc->correct_plug_swch);

		if ((mbhc->current_plug != PLUG_TYPE_NONE) &&
		    !(snd_soc_read(codec, WCD9XXX_A_MBHC_INSERT_DETECT) &
@@ -3195,6 +3194,9 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc)
	} else if ((mbhc->current_plug != PLUG_TYPE_NONE) && !insert) {
		mbhc->lpi_enabled = false;
		wmb();
		/* cancel detect plug */
		wcd9xxx_cancel_hs_detect_plug(mbhc,
				      &mbhc->correct_plug_swch);

		if (mbhc->current_plug == PLUG_TYPE_HEADPHONE) {
			wcd9xxx_report_plug(mbhc, 0, SND_JACK_HEADPHONE);