Skip to content

Commit 8a276ea

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 2223aeb commit 8a276ea

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

sound/soc/sof/pm.c

Lines changed: 11 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. Re-enabled 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_enable_trace(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,8 @@ 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+
/* release trace */
224+
snd_sof_release_trace(sdev, 1);
216225
/* Notify clients not managed by pm framework about core suspend */
217226
sof_suspend_clients(sdev, pm_state);
218227
goto suspend;

0 commit comments

Comments
 (0)