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

Commit 9b40373b authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

ASoC: wcd9335: reset the SWR_CH_CNT at session teardown



In speaker protection usecase, if SWR_CH is already
set to 2 due to bootup tone playback then the initial
calibration fails. As the WSA register writes will
fail due to gr_sid will not match with dev_num
and temperature read will return negative value.
To address this, when session teardown reset the
soundwire master channel count in tasha driver.

CRs-Fixed: 961023
Change-Id: I80ee0dedac8fa81ce54a0e61c839a97b9b45d36b
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent b7ca2f4c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4626,6 +4626,11 @@ static int tasha_codec_enable_swr(struct snd_soc_dapm_widget *w,
		if ((strnstr(w->name, "INT8_", sizeof("RX INT8_"))) &&
		    tasha->rx_8_count)
			tasha->rx_8_count--;
		ch_cnt = tasha->rx_7_count + tasha->rx_8_count;

		for (i = 0; i < tasha->nr; i++)
			swrm_wcd_notify(tasha->swr_ctrl_data[i].swr_pdev,
					SWR_SET_NUM_RX_CH, &ch_cnt);

		break;
	}