Skip to content

Commit d185e06

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: pm: Always tear down pipelines before DSP suspend
When the DSP is suspended while the firmware is in the crashed state, we skip tearing down the pipelines. This means that the widget reference counts will not get to reset to 0 before suspend. This will lead to errors with resuming audio after system resume. To fix this, invoke the tear_down_all_pipelines op before skipping to DSP suspend. Signed-off-by: Ranjani Sridharan <[email protected]> Reviewed-by: Curtis Malainey <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6f95eec commit d185e06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/soc/sof/pm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
192192
if (runtime_suspend && !sof_ops(sdev)->runtime_suspend)
193193
return 0;
194194

195+
if (tplg_ops && tplg_ops->tear_down_all_pipelines)
196+
tplg_ops->tear_down_all_pipelines(sdev, false);
197+
195198
if (sdev->fw_state != SOF_FW_BOOT_COMPLETE)
196199
goto suspend;
197200

@@ -216,9 +219,6 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
216219
goto suspend;
217220
}
218221

219-
if (tplg_ops->tear_down_all_pipelines)
220-
tplg_ops->tear_down_all_pipelines(sdev, false);
221-
222222
/* suspend DMA trace */
223223
sof_fw_trace_suspend(sdev, pm_state);
224224

0 commit comments

Comments
 (0)