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

Commit e344168f 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: Fix detection issue for headsets with threshold on MIC"

parents b262e539 6ce1bcb4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1409,7 +1409,7 @@ wcd9xxx_cs_find_plug_type(struct wcd9xxx_mbhc *mbhc,
		    (dgnd->_vdces + WCD9XXX_CS_GM_SWAP_THRES_MAX_MV >
		     maxv))
			type = PLUG_TYPE_GND_MIC_SWAP;
		else if (dgnd->_type != PLUG_TYPE_HEADSET) {
		else if (dgnd->_type != PLUG_TYPE_HEADSET && !dmicbias) {
			pr_debug("%s: Invalid, inconsistent types\n", __func__);
			type = PLUG_TYPE_INVALID;
		}
@@ -2260,8 +2260,11 @@ static void wcd9xxx_hs_remove_irq_noswch(struct wcd9xxx_mbhc *mbhc)
	usleep_range(generic->t_shutdown_plug_rem,
		     generic->t_shutdown_plug_rem);

	cs_enable = ((mbhc->mbhc_cfg->cs_enable_flags &
		      (1 << MBHC_CS_ENABLE_REMOVAL)) != 0);
	/* If micbias is enabled, don't enable current source */
	cs_enable = (((mbhc->mbhc_cfg->cs_enable_flags &
		      (1 << MBHC_CS_ENABLE_REMOVAL)) != 0) &&
		     (!(snd_soc_read(codec,
				     mbhc->mbhc_bias_regs.ctl_reg) & 0x80)));
	if (cs_enable)
		wcd9xxx_turn_onoff_current_source(mbhc, true, false);