diff options
author | Mark Brown <broonie@kernel.org> | 2022-06-14 11:25:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-14 11:25:45 +0100 |
commit | 14cc5849120051caf537f663ec620910503bb719 (patch) | |
tree | f786cd254d3a6dc104976b03e05b381d9fe5cc16 /sound/soc/qcom | |
parent | 7ed1f83bb4f05fe460984ae49e98d1c1be38fb5f (diff) | |
parent | da440af07fc3dd2b5a5138671eba51991dd1fac8 (diff) |
ASoC: Merge fixes
Required for more changes for the ops.
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r-- | sound/soc/qcom/qdsp6/q6apm-dai.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index 19c4a90ec1ea..ee59ef36b85a 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -147,6 +147,12 @@ static int q6apm_dai_prepare(struct snd_soc_component *component, cfg.num_channels = runtime->channels; cfg.bit_width = prtd->bits_per_sample; + if (prtd->state) { + /* clear the previous setup if any */ + q6apm_graph_stop(prtd->graph); + q6apm_unmap_memory_regions(prtd->graph, substream->stream); + } + prtd->pcm_count = snd_pcm_lib_period_bytes(substream); prtd->pos = 0; /* rate and channels are sent to audio driver */ |