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

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

Merge "ASoC: wcd9335: Give more headroom for headphone PA ramp"

parents 6a66016f b3d8c472
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@
/* Convert from vout ctl to micbias voltage in mV */
#define WCD_VOUT_CTL_TO_MICB(v) (1000 + v * 50)

#define TASHA_ZDET_NUM_MEASUREMENTS 60
#define TASHA_ZDET_NUM_MEASUREMENTS 150
#define TASHA_MBHC_GET_C1(c)  ((c & 0xC000) >> 14)
#define TASHA_MBHC_GET_X1(x)  (x & 0x3FFF)
/* z value compared in milliOhm */
@@ -1608,11 +1608,15 @@ static inline void tasha_mbhc_get_result_params(struct wcd9xxx *wcd9xxx,
				WCD9335_ANA_MBHC_ZDET, 0x20, 0x00);
	x1 = TASHA_MBHC_GET_X1(val);
	c1 = TASHA_MBHC_GET_C1(val);
	/* If ramp is not complete, give additional 5ms */
	if ((c1 < 2) && x1)
		usleep_range(5000, 5050);

	if (!c1 || !x1) {
		dev_dbg(wcd9xxx->dev,
			"%s: Impedance detect ramp error, c1=%d, x1=0x%x\n",
			__func__, c1, x1);
		return;
		goto ramp_down;
	}
	d1 = d1_a[c1];
	denom = (x1 * d1) - (1 << (14 - noff));
@@ -1623,6 +1627,7 @@ static inline void tasha_mbhc_get_result_params(struct wcd9xxx *wcd9xxx,

	dev_dbg(wcd9xxx->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d(milliOhm)\n",
		__func__, d1, c1, x1, *zdet);
ramp_down:
	i = 0;
	while (x1) {
		wcd9xxx_bulk_read(&wcd9xxx->core_res,