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

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

Merge "ASoC: wcd-mbhc: Fix plug type detection with extension cable"

parents 019aaa44 e05d23ca
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1204,6 +1204,7 @@ static void wcd_mbhc_detect_plug_type(struct wcd_mbhc *mbhc)
		pr_debug("%s: cross con found, start polling\n",
		pr_debug("%s: cross con found, start polling\n",
			 __func__);
			 __func__);
		plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP;
		plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP;
		if (!mbhc->current_plug)
			mbhc->current_plug = plug_type;
			mbhc->current_plug = plug_type;
		pr_debug("%s: Plug found, plug type is %d\n",
		pr_debug("%s: Plug found, plug type is %d\n",
			 __func__, plug_type);
			 __func__, plug_type);
@@ -1440,7 +1441,7 @@ static irqreturn_t wcd_mbhc_hs_ins_irq(int irq, void *data)
				msleep(20);
				msleep(20);
				WCD_MBHC_REG_UPDATE_BITS(
				WCD_MBHC_REG_UPDATE_BITS(
						WCD_MBHC_ELECT_SCHMT_ISRC,
						WCD_MBHC_ELECT_SCHMT_ISRC,
						3);
						1);
			}
			}
			if (hphl_sch) {
			if (hphl_sch) {
				hphl_trigerred++;
				hphl_trigerred++;
@@ -1470,8 +1471,6 @@ determine_plug:
				   false);
				   false);


	WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, 0);
	WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ELECT_SCHMT_ISRC, 0);
	/* Enable HW FSM */
	WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_FSM_EN, 1);
	hphl_trigerred = 0;
	hphl_trigerred = 0;
	mic_trigerred = 0;
	mic_trigerred = 0;
	mbhc->is_extn_cable = true;
	mbhc->is_extn_cable = true;