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

Commit 83b76724 authored by Laxminath Kasam's avatar Laxminath Kasam Committed by Banajit Goswami
Browse files

ASoC: msm_sdw: Fix random mute on speaker when device switch



Observe random mute on speaker during device switch on
secondary images. Avoid reading previous register
read when SWR slave read and overwrite of previous register
when SWR slave write, by adjusting delays in respective APIs.

Change-Id: I302968ad8e774598c8414e05ba669f90bf39b82c
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 23f6a5b0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1044,7 +1044,7 @@ static int msm_sdw_swrm_read(void *handle, int reg)
	 * Add sleep as SWR slave access read takes time.
	 * Allow for RD_DONE to complete for previous register if any.
	 */
	usleep_range(50, 55);
	usleep_range(100, 105);

	/* read_lock */
	mutex_lock(&msm_sdw->sdw_read_lock);
@@ -1079,6 +1079,11 @@ static int msm_sdw_bulk_write(struct msm_sdw_priv *msm_sdw,
	sdw_wr_addr_base = MSM_SDW_AHB_BRIDGE_WR_ADDR_0;
	sdw_wr_data_base = MSM_SDW_AHB_BRIDGE_WR_DATA_0;

	/*
	 * Add sleep as SWR slave write takes time.
	 * Allow for any previous pending write to complete.
	 */
	usleep_range(50, 55);
	for (i = 0; i < len; i += 2) {
		/* First Write the Data to register */
		ret = regmap_bulk_write(msm_sdw->regmap,