aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2022-10-17 15:49:46 -0500
committerMark Brown <[email protected]>2022-10-18 19:16:33 +0100
commit9f68d6e64f51bf62f8d2f7d82a425470e9aa3b24 (patch)
treef676c620615e688b85bcdf4c0d08dda98ef5016d
parent8e1ae6f62c7e8f904949e9c60a4a38715c8c0aff (diff)
ASoC: SOF: Intel: hda-dsp: simplify S3 resume flows
The flow contains surprising parts that seem to have been inspired by the Skylake driver. During a resume from S3, the state of the links prior to suspend should not matter. One would have to assume that the links are powered down anyways prior to suspend, and there is also no specific code that turns links on unconditionally on resume. Likewise, the snd_hdac_init_chip() routine will start the cmd_io handling, and it's not clear why we should care about the state of the DMA prior to suspend. This patch removes these two sequences to simplify the flow. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/intel/hda-dsp.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 3c76f843454b..799c50fe24da 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -677,10 +677,6 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
{
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
- struct hdac_bus *bus = sof_to_bus(sdev);
- struct hdac_ext_link *hlink = NULL;
-#endif
int ret;
/* display codec must be powered before link reset */
@@ -707,16 +703,6 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
if (sdev->system_suspend_target == SOF_SUSPEND_NONE)
hda_codec_jack_check(sdev);
}
-
- /* turn off the links that were off before suspend */
- list_for_each_entry(hlink, &bus->hlink_list, list) {
- if (!hlink->ref_count)
- snd_hdac_ext_bus_link_power_down(hlink);
- }
-
- /* check dma status and clean up CORB/RIRB buffers */
- if (!bus->cmd_dma_state)
- snd_hdac_bus_stop_cmd_io(bus);
#endif
/* enable ppcap interrupt */