diff mbox series

[2/4] ASoC: qcom: sdw: do not restart soundwire ports for every prepare

Message ID 20230323164403.6654-3-srinivas.kandagatla@linaro.org
State Accepted
Commit e2e530886359246ae782c779be248c59bc2ed111
Headers show
Series ASoC: qcom: fixes for Click/Pop Noise | expand

Commit Message

Srinivas Kandagatla March 23, 2023, 4:44 p.m. UTC
unpreparing/disabling and preparing/reenabling soundwire ports is not required
for every prepare call, this add lots of click and pop noise if we do this in
middle of playback or capture.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/sdw.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c
index 10249519a39e..1a41419c7eb8 100644
--- a/sound/soc/qcom/sdw.c
+++ b/sound/soc/qcom/sdw.c
@@ -32,11 +32,8 @@  int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream,
 		return 0;
 	}
 
-	if (*stream_prepared) {
-		sdw_disable_stream(sruntime);
-		sdw_deprepare_stream(sruntime);
-		*stream_prepared = false;
-	}
+	if (*stream_prepared)
+		return 0;
 
 	ret = sdw_prepare_stream(sruntime);
 	if (ret)