summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/sof-audio.c
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2020-01-29 16:07:18 -0600
committerMark Brown <broonie@kernel.org>2020-02-11 11:48:01 +0000
commit3f06501ea4d2d8add203e66d225274f106cb4029 (patch)
tree2a765c7348c656edf0ed6515e8e1d57080f1e495 /sound/soc/sof/sof-audio.c
parent5d3c644773925c3568617435e42a9404a114c428 (diff)
downloadlinux-3f06501ea4d2d8add203e66d225274f106cb4029.tar.bz2
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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200129220726.31792-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.c')
-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 0d8f65b9ae25..345e42ee4783 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -39,6 +39,13 @@ int sof_set_hw_params_upon_resume(struct device *dev)
*/
list_for_each_entry(spcm, &sdev->pcm_list, list) {
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;
if (!substream || !substream->runtime)
continue;