[PATCH] ASoC: SOF: Intel: hda: cancel D0i3 work during runtime suspend
Kai Vehmanen
kai.vehmanen at linux.intel.com
Thu Jan 28 10:23:45 CET 2021
From: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Cancel the D0i3 work during runtime suspend as no streams are
active at this point anyway.
Fixes: 63e51fd33fef("ASoC: SOF: Intel: cnl: Implement feature to support DSP D0i3 in S0")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
---
sound/soc/sof/intel/hda-dsp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 2b001151fe37..9e8b3e542548 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -799,11 +799,15 @@ int hda_dsp_runtime_idle(struct snd_sof_dev *sdev)
int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev)
{
+ struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
const struct sof_dsp_power_state target_state = {
.state = SOF_DSP_PM_D3,
};
int ret;
+ /* cancel any attempt for DSP D0I3 */
+ cancel_delayed_work_sync(&hda->d0i3_work);
+
/* stop hda controller and power dsp off */
ret = hda_suspend(sdev, true);
if (ret < 0)
base-commit: e32df142359fb6f4d27977b7652549f0844aa62f
--
2.29.2
More information about the Alsa-devel
mailing list