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

Commit 051f3351 authored by Walter Yang's avatar Walter Yang
Browse files

ASoC: msm8x16-wcd: add more strict conditions for extension cable



The current conditions in plug report function for extension cable
insertion are not enough. It will also let in some other scenario,
e.g., the plug type correction from headphone to headset.
Add more strict conditions to just let in electrical insertion
of extension cable and electrical removal detection.

Change-Id: I5bafc0fe12cabb64e559a3fbc23df6657461f3e2
CRs-Fixed: 674500
Signed-off-by: default avatarWalter Yang <yandongy@codeaurora.org>
parent e9b6c820
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -447,6 +447,8 @@ static void wcd_mbhc_report_plug(struct wcd_mbhc *mbhc, int insertion,
		 * removal.
		 */
		if (mbhc->mbhc_cfg->detect_extn_cable &&
		    (mbhc->current_plug == MBHC_PLUG_TYPE_HIGH_HPH ||
		    jack_type == SND_JACK_LINEOUT) &&
		    (mbhc->hph_status && mbhc->hph_status != jack_type)) {

			if (mbhc->micbias_enable &&