aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjani Sridharan <[email protected]>2021-11-25 12:15:15 +0200
committerMark Brown <[email protected]>2021-11-26 13:24:20 +0000
commit47934e0fcbbe2bf488bcae2d68431b9ea5972488 (patch)
tree9d20250150a294dc2a55ab5ab19d37af9800f1e2
parent0dd71a3340b92b503278af4565156f086ccbca3f (diff)
ASoC: SOF: call platform hw_free for paused streams during suspend
Paused streams must be stopped and platform hw_free should be invoked during system suspend so they can be restarted properly after system resume. Signed-off-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/sof-audio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index e00ce275052f..d81071b39825 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -751,10 +751,17 @@ static int sof_tear_down_left_over_pipelines(struct snd_sof_dev *sdev)
continue;
if (spcm->stream[dir].list) {
+ /* Free PCM in the DSP */
ret = sof_pcm_dsp_pcm_free(substream, sdev, spcm);
if (ret < 0)
return ret;
+ /* stop DMA */
+ ret = snd_sof_pcm_platform_hw_free(sdev, substream);
+ if (ret < 0)
+ return ret;
+
+ /* free the DAPM widget list */
ret = sof_widget_list_free(sdev, spcm, dir);
if (ret < 0) {
dev_err(sdev->dev, "failed to free widgets during suspend\n");