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

Commit 272152ba authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

ASoC: wcd9xxx: Account for inconsistency in dce_z during button press



It is observed that dce gnd recalibration value will change
during button press. Currently dce_z is recalibrated only during
first button press. But this would cause issues in further button
detection due to the measurement inconsistancies in dce_z.
Fix this by recalibrating everytime during button press.

Change-Id: I13d9600b20408b1898b205201c3f076e4d093c9e
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent b26a0ee6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3242,7 +3242,9 @@ irqreturn_t wcd9xxx_dce_handler(int irq, void *data)
				 __func__);
			if (mbhc->update_z) {
				wcd9xxx_update_z(mbhc);
				mbhc->update_z = false;
				dce_z = mbhc->mbhc_data.dce_z;
				sta_z = mbhc->mbhc_data.sta_z;
				mbhc->update_z = true;
			}
			stamv = __wcd9xxx_codec_sta_dce_v(mbhc, 0, sta, sta_z,
						mbhc->mbhc_data.micb_mv);
@@ -3268,7 +3270,9 @@ irqreturn_t wcd9xxx_dce_handler(int irq, void *data)

	if (mbhc->update_z) {
		wcd9xxx_update_z(mbhc);
		mbhc->update_z = false;
		dce_z = mbhc->mbhc_data.dce_z;
		sta_z = mbhc->mbhc_data.sta_z;
		mbhc->update_z = true;
	}

	stamv = __wcd9xxx_codec_sta_dce_v(mbhc, 0, sta, sta_z,