Skip to content

Commit 7a11722

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Intel: hda: handle only paused streams in hda_dai_suspend()
hda_dai_suspend() was added to handle paused stream during system suspend. But as a side effect, it also ends up cleaning up the DMA data for those streams that were prepared but not triggered before a system suspend. Since these streams will not receive the prepare callback after resuming, we need to preserve the DMA data during suspend. So, add the check to handle only those streams that are in the paused state to avoid losing the DMA data for all other streams. Link: thesofproject#5080 Signed-off-by: Ranjani Sridharan <[email protected]> Reviewed-by: Fred Oh <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1862e84 commit 7a11722

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/soc/sof/intel/hda-dai.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,10 @@ static int hda_dai_suspend(struct hdac_bus *bus)
617617
sdai = swidget->private;
618618
ops = sdai->platform_private;
619619

620+
if (rtd->dpcm[hext_stream->link_substream->stream].state !=
621+
SND_SOC_DPCM_STATE_PAUSED)
622+
continue;
623+
620624
/* for consistency with TRIGGER_SUSPEND */
621625
if (ops->post_trigger) {
622626
ret = ops->post_trigger(sdev, cpu_dai,

0 commit comments

Comments
 (0)