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

Commit 1ff72517 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd9xxx: Cancel headset detect work while in IRQ handler"

parents 2c0a4e36 a9d66e47
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -2858,6 +2858,10 @@ 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);
@@ -2865,9 +2869,6 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc)
		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) &
				   (1 << 1)))
@@ -2882,10 +2883,6 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc)
		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);
			is_removed = true;