summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-dsp.c
diff options
context:
space:
mode:
authorMarcin Rajwa <marcin.rajwa@linux.intel.com>2020-07-27 11:36:13 -0700
committerMark Brown <broonie@kernel.org>2020-07-28 16:22:35 +0100
commit79560b8aeb01a715f75060e40085e641248bee51 (patch)
tree618ed7246c2532796f3c9f9c27d5958b408e2db2 /sound/soc/sof/intel/hda-dsp.c
parent195f101980dc4c0d0093007d7daac68ec2270f95 (diff)
downloadlwn-79560b8aeb01a715f75060e40085e641248bee51.tar.gz
lwn-79560b8aeb01a715f75060e40085e641248bee51.zip
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 <marcin.rajwa@linux.intel.com> Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200727183613.1419005-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-dsp.c')
-rw-r--r--sound/soc/sof/intel/hda-dsp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 89961397010a..ed4d65a29d3a 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -408,11 +408,13 @@ static int hda_dsp_set_D0_state(struct snd_sof_dev *sdev,
value = SOF_HDA_VS_D0I3C_I3;
/*
- * Trace DMA is disabled by default when the DSP enters D0I3.
- * But it can be kept enabled when the DSP enters D0I3 while the
- * system is in S0 for debug.
+ * Trace DMA need to be disabled when the DSP enters
+ * D0I3 for S0Ix suspend, but it can be kept enabled
+ * when the DSP enters D0I3 while the system is in S0
+ * for debug purpose.
*/
- if (hda_enable_trace_D0I3_S0 &&
+ if (!sdev->dtrace_is_supported ||
+ !hda_enable_trace_D0I3_S0 ||
sdev->system_suspend_target != SOF_SUSPEND_NONE)
flags = HDA_PM_NO_DMA_TRACE;
} else {