Commit 3f06501e authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

ASoC: SOF: Do not reset hw_params for streams that ignored suspend

Setting the prepared flag to false marks the streams for the
hw_params to be reset upon resuming. In the case of
the D0i3-compatible streams that ignored suspend to
keep the pipeline active in the DSP during suspend,
this should not be done.
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200129220726.31792-2-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5d3c6447
...@@ -39,6 +39,13 @@ int sof_set_hw_params_upon_resume(struct device *dev) ...@@ -39,6 +39,13 @@ int sof_set_hw_params_upon_resume(struct device *dev)
*/ */
list_for_each_entry(spcm, &sdev->pcm_list, list) { list_for_each_entry(spcm, &sdev->pcm_list, list) {
for (dir = 0; dir <= SNDRV_PCM_STREAM_CAPTURE; dir++) { for (dir = 0; dir <= SNDRV_PCM_STREAM_CAPTURE; dir++) {
/*
* do not reset hw_params upon resume for streams that
* were kept running during suspend
*/
if (spcm->stream[dir].suspend_ignored)
continue;
substream = spcm->stream[dir].substream; substream = spcm->stream[dir].substream;
if (!substream || !substream->runtime) if (!substream || !substream->runtime)
continue; continue;
......
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