diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2023-02-09 15:27:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:33:21 +0300 |
commit | 91b7ce0cfff7e17a8f259e8b4da32a31e7450d5b (patch) | |
tree | efbf0a6cd50cf12ada044b04c7f62e98dbf850b2 /sound | |
parent | c95f4de66352df2782834d2f62ede18693fbc98e (diff) | |
download | linux-91b7ce0cfff7e17a8f259e8b4da32a31e7450d5b.tar.xz |
ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared
[ Upstream commit c2ac3aec474da0455df79c4a182f19687bc98d1d ]
prepare callback can be called multiple times, so unprepare the stream
if its already prepared.
Without this DSP is not happy to setting the params on a already
prepared graph.
Fixes: 9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230209122806.18923-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index ce9e5646d8f3..23d23bc6fbaa 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -127,6 +127,11 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct s int graph_id = dai->id; int rc; + if (dai_data->is_port_started[dai->id]) { + q6apm_graph_stop(dai_data->graph[dai->id]); + dai_data->is_port_started[dai->id] = false; + } + /** * It is recommend to load DSP with source graph first and then sink * graph, so sequence for playback and capture will be different |