summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-dsp.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-10-27 22:35:34 +0300
committerMark Brown <broonie@kernel.org>2022-10-28 15:04:55 +0300
commit3400afcf6800af0be25bf076862dce9a8eac776e (patch)
tree579c61a1c3c68caa48ae659d4c43a9694990a394 /sound/soc/sof/intel/hda-dsp.c
parentd191009f77d8ef53d3b75959a4d7db9fcc0ed1d1 (diff)
downloadlinux-3400afcf6800af0be25bf076862dce9a8eac776e.tar.xz
ASoC: SOF: Intel: hda-codec: add helpers to suspend and resume cmd_io
No functionality change, code move to have better split between HDaudio codec management and core parts. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-16-pierre-louis.bossart@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, 4 insertions, 6 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index d325e82aff4c..2596de5e24d6 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -745,11 +745,10 @@ int hda_dsp_resume(struct snd_sof_dev *sdev)
}
}
}
+#endif
/* set up CORB/RIRB buffers if was on before suspend */
- if (bus->cmd_dma_state)
- snd_hdac_bus_init_cmd_io(bus);
-#endif
+ hda_codec_resume_cmd_io(sdev);
/* Set DSP power state */
ret = snd_sof_dsp_set_power_state(sdev, &target_state);
@@ -858,11 +857,10 @@ int hda_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
HDA_VS_INTEL_EM2_L1SEN,
HDA_VS_INTEL_EM2_L1SEN);
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
/* stop the CORB/RIRB DMA if it is On */
- if (bus->cmd_dma_state)
- snd_hdac_bus_stop_cmd_io(bus);
+ hda_codec_suspend_cmd_io(sdev);
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
/* no link can be powered in s0ix state */
ret = snd_hdac_ext_bus_link_power_down_all(bus);
if (ret < 0) {