Skip to content

Commit 79560b8

Browse files
mrajwabroonie
authored andcommitted
ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3
We should always disable DMA trace on S0Ix. When staying at S0-D0I3, we should enable DMA trace while both DMA Trace debug is enabled and hda_enable_trace_D0I3_S0 is set. This commit corrects the existed logic errors about that. Signed-off-by: Marcin Rajwa <[email protected]> Signed-off-by: Keyon Jie <[email protected]> Signed-off-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 195f101 commit 79560b8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sound/soc/sof/intel/hda-dsp.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,13 @@ static int hda_dsp_set_D0_state(struct snd_sof_dev *sdev,
408408
value = SOF_HDA_VS_D0I3C_I3;
409409

410410
/*
411-
* Trace DMA is disabled by default when the DSP enters D0I3.
412-
* But it can be kept enabled when the DSP enters D0I3 while the
413-
* system is in S0 for debug.
411+
* Trace DMA need to be disabled when the DSP enters
412+
* D0I3 for S0Ix suspend, but it can be kept enabled
413+
* when the DSP enters D0I3 while the system is in S0
414+
* for debug purpose.
414415
*/
415-
if (hda_enable_trace_D0I3_S0 &&
416+
if (!sdev->dtrace_is_supported ||
417+
!hda_enable_trace_D0I3_S0 ||
416418
sdev->system_suspend_target != SOF_SUSPEND_NONE)
417419
flags = HDA_PM_NO_DMA_TRACE;
418420
} else {

0 commit comments

Comments
 (0)