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

Commit a0c82ae9 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: Report lineout immediately"

parents 7ca348d2 c445a195
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2227,6 +2227,7 @@ static void wcd9xxx_find_plug_and_report(struct wcd9xxx_mbhc *mbhc,
	} else if (plug_type == PLUG_TYPE_HIGH_HPH) {
		if (mbhc->mbhc_cfg->detect_extn_cable) {
			/* High impedance device found. Report as LINEOUT*/
			if (mbhc->current_plug == PLUG_TYPE_NONE)
				wcd9xxx_report_plug(mbhc, 1, SND_JACK_LINEOUT);
			wcd9xxx_cleanup_hs_polling(mbhc);
			pr_debug("%s: setup mic trigger for further detection\n",
@@ -2995,6 +2996,14 @@ static void wcd9xxx_correct_swch_plug(struct work_struct *work)
		} else if (plug_type == PLUG_TYPE_HIGH_HPH) {
			pr_debug("%s: High HPH detected, continue polling\n",
				  __func__);
			if (mbhc->mbhc_cfg->detect_extn_cable) {
				if (mbhc->current_plug != plug_type)
					wcd9xxx_report_plug(mbhc, 1,
							    SND_JACK_LINEOUT);
			} else if (mbhc->current_plug == PLUG_TYPE_NONE) {
					wcd9xxx_report_plug(mbhc, 1,
							    SND_JACK_HEADPHONE);
			}
		} else {
			if (plug_type == PLUG_TYPE_GND_MIC_SWAP) {
				pt_gnd_mic_swap_cnt++;