summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxminath Kasam <lkasam@codeaurora.org>2016-02-05 21:00:39 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:19:53 -0700
commitf0283a0da8a3f85f0172497251d438d9aee8d813 (patch)
treead2435b535cec0976e4221d2708d65251fc66a27
parent292eb4c390e6ca9099105bf700a973183296f9cf (diff)
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: Laxminath Kasam <lkasam@codeaurora.org>
-rwxr-xr-xsound/soc/codecs/wcd9335.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index 2665f13be9b8..def2b807cd28 100755
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -4602,6 +4602,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;
}