未验证 提交 d185e068 编写于 作者: R Ranjani Sridharan 提交者: Mark Brown

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: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: NCurtis Malainey <cujomalainey@chromium.org>
Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: NPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221220125629.8469-3-peter.ujfalusi@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 6f95eec6
...@@ -192,6 +192,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) ...@@ -192,6 +192,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
if (runtime_suspend && !sof_ops(sdev)->runtime_suspend) if (runtime_suspend && !sof_ops(sdev)->runtime_suspend)
return 0; return 0;
if (tplg_ops && tplg_ops->tear_down_all_pipelines)
tplg_ops->tear_down_all_pipelines(sdev, false);
if (sdev->fw_state != SOF_FW_BOOT_COMPLETE) if (sdev->fw_state != SOF_FW_BOOT_COMPLETE)
goto suspend; goto suspend;
...@@ -216,9 +219,6 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) ...@@ -216,9 +219,6 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
goto suspend; goto suspend;
} }
if (tplg_ops->tear_down_all_pipelines)
tplg_ops->tear_down_all_pipelines(sdev, false);
/* suspend DMA trace */ /* suspend DMA trace */
sof_fw_trace_suspend(sdev, pm_state); sof_fw_trace_suspend(sdev, pm_state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册