Commit 47934e0f authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

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: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211125101520.291581-6-kai.vehmanen@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0dd71a33
...@@ -751,10 +751,17 @@ static int sof_tear_down_left_over_pipelines(struct snd_sof_dev *sdev) ...@@ -751,10 +751,17 @@ static int sof_tear_down_left_over_pipelines(struct snd_sof_dev *sdev)
continue; continue;
if (spcm->stream[dir].list) { if (spcm->stream[dir].list) {
/* Free PCM in the DSP */
ret = sof_pcm_dsp_pcm_free(substream, sdev, spcm); ret = sof_pcm_dsp_pcm_free(substream, sdev, spcm);
if (ret < 0) if (ret < 0)
return ret; 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); ret = sof_widget_list_free(sdev, spcm, dir);
if (ret < 0) { if (ret < 0) {
dev_err(sdev->dev, "failed to free widgets during suspend\n"); dev_err(sdev->dev, "failed to free widgets during suspend\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment