summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2025-09-21 19:16:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 10:58:55 +0200
commit09ff1b1fadcde325d502a593b66859e495637edf (patch)
tree2691ab284467fa1ba0d408dcbea399c0cecefc04
parent47ade5f9d70b23a119ec20b1c6504864b2543a79 (diff)
ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one
[ Upstream commit c52615e494f17f44b076ac8ae5a53cfc0041a0dd ] On multiple prepare calls, its possible that the playback graphs are not unloaded from the DSP, which can have some wierd side-effects, one of them is that the data not consumed without any errors. Fixes: c2ac3aec474d("ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230323164403.6654-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: 68f27f7c7708 ("ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/soc/qcom/qdsp6/q6apm-lpass-dais.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
index b18e661c892b..d6fcdffd6621 100644
--- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
+++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
@@ -130,6 +130,9 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s
if (dai_data->is_port_started[dai->id]) {
q6apm_graph_stop(dai_data->graph[dai->id]);
dai_data->is_port_started[dai->id] = false;
+
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ q6apm_graph_close(dai_data->graph[dai->id]);
}
/**