未验证 提交 249ee180 编写于 作者: L Libin Yang 提交者: Mark Brown

ASoC: SOF: disable dma trace in s0ix

When system enters s0ix, the dma trace won't be used. Otherwise,
the DMA will access the host memory, which will prevent entering
S0ix. Driver has notified firmware not to send message through
dma trace. Let's also trigger stop dma trace in driver side.
Signed-off-by: NLibin Yang <libin.yang@intel.com>
Reviewed-by: NKai Vehmanen <kai.vehmanen@intel.com>
Reviewed-by: NPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220330201926.1330402-8-ranjani.sridharan@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 758f24d4
...@@ -102,11 +102,18 @@ static int sof_resume(struct device *dev, bool runtime_resume) ...@@ -102,11 +102,18 @@ static int sof_resume(struct device *dev, bool runtime_resume)
/* /*
* Nothing further to be done for platforms that support the low power * Nothing further to be done for platforms that support the low power
* D0 substate. * D0 substate. Resume trace and return when resuming from
* low-power D0 substate
*/ */
if (!runtime_resume && sof_ops(sdev)->set_power_state && if (!runtime_resume && sof_ops(sdev)->set_power_state &&
old_state == SOF_DSP_PM_D0) old_state == SOF_DSP_PM_D0) {
ret = snd_sof_trace_resume(sdev);
if (ret < 0)
/* non fatal */
dev_warn(sdev->dev,
"failed to enable trace after resume %d\n", ret);
return 0; return 0;
}
sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE); sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE);
...@@ -201,6 +208,7 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) ...@@ -201,6 +208,7 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
/* Skip to platform-specific suspend if DSP is entering D0 */ /* Skip to platform-specific suspend if DSP is entering D0 */
if (target_state == SOF_DSP_PM_D0) { if (target_state == SOF_DSP_PM_D0) {
snd_sof_trace_suspend(sdev, pm_state);
/* Notify clients not managed by pm framework about core suspend */ /* Notify clients not managed by pm framework about core suspend */
sof_suspend_clients(sdev, pm_state); sof_suspend_clients(sdev, pm_state);
goto suspend; goto suspend;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册