Skip to content

Commit 2173e4f

Browse files
committed
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: Libin Yang <libin.yang@intel.com>
1 parent 6aebe7f commit 2173e4f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

sound/soc/sof/pm.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,18 @@ static int sof_resume(struct device *dev, bool runtime_resume)
116116

117117
/*
118118
* Nothing further to be done for platforms that support the low power
119-
* D0 substate.
119+
* D0 substate. Resume trace and return when resuming from
120+
* low-power D0 substate
120121
*/
121122
if (!runtime_resume && sof_ops(sdev)->set_power_state &&
122-
old_state == SOF_DSP_PM_D0)
123+
old_state == SOF_DSP_PM_D0) {
124+
ret = snd_sof_trace_resume(sdev);
125+
if (ret < 0)
126+
/* non fatal */
127+
dev_warn(sdev->dev,
128+
"failed to enable trace after resume %d\n", ret);
123129
return 0;
130+
}
124131

125132
sof_set_fw_state(sdev, SOF_FW_BOOT_PREPARE);
126133

@@ -213,6 +220,7 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
213220

214221
/* Skip to platform-specific suspend if DSP is entering D0 */
215222
if (target_state == SOF_DSP_PM_D0) {
223+
snd_sof_trace_suspend(sdev, pm_state);
216224
/* Notify clients not managed by pm framework about core suspend */
217225
sof_suspend_clients(sdev, pm_state);
218226
goto suspend;

0 commit comments

Comments
 (0)