Skip to content

Commit c52615e

Browse files
Srinivas-Kandagatlabroonie
authored andcommitted
ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one
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: c2ac3ae("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>
1 parent 99fddc1 commit c52615e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/qcom/qdsp6/q6apm-lpass-dais.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s
130130
if (dai_data->is_port_started[dai->id]) {
131131
q6apm_graph_stop(dai_data->graph[dai->id]);
132132
dai_data->is_port_started[dai->id] = false;
133+
134+
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
135+
q6apm_graph_close(dai_data->graph[dai->id]);
133136
}
134137

135138
/**

0 commit comments

Comments
 (0)