Skip to content

Commit 09ff1b1

Browse files
Srinivas-Kandagatlagregkh
authored andcommitted
ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one
[ Upstream commit c52615e ] 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]> Stable-dep-of: 68f27f7 ("ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed") Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 47ade5f commit 09ff1b1

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)