Commit fd65e099 authored by Mark Brown's avatar Mark Brown

ASoC: Intel/SOF: simplify S3 resume flows

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

All Intel drivers for cAVS platforms contain a sequence for S3 resume
which doesn't seem justified nor necessary. Forensic Git investigation
in internal repositories did not provide any rationale for the
implementation, and tests show no impact when those sequences are
removed.

This sequence was identified as problematic during a large HDaudio
cleanup where all programming sequences were revisited before
extensions are added.
parents 67860d2a 9f68d6e6
...@@ -580,7 +580,6 @@ static int __maybe_unused avs_suspend_common(struct avs_dev *adev) ...@@ -580,7 +580,6 @@ static int __maybe_unused avs_suspend_common(struct avs_dev *adev)
static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool purge) static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool purge)
{ {
struct hdac_bus *bus = &adev->base.core; struct hdac_bus *bus = &adev->base.core;
struct hdac_ext_link *hlink;
int ret; int ret;
snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, true); snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, true);
...@@ -595,16 +594,6 @@ static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool purge) ...@@ -595,16 +594,6 @@ static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool purge)
return ret; return ret;
} }
/* 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);
return 0; return 0;
} }
......
...@@ -387,15 +387,6 @@ static int skl_resume(struct device *dev) ...@@ -387,15 +387,6 @@ static int skl_resume(struct device *dev)
snd_hdac_bus_init_cmd_io(bus); snd_hdac_bus_init_cmd_io(bus);
} else { } else {
ret = _skl_resume(bus); ret = _skl_resume(bus);
/* turn off the links which are off before suspend */
list_for_each_entry(hlink, &bus->hlink_list, list) {
if (!hlink->ref_count)
snd_hdac_ext_bus_link_power_down(hlink);
}
if (!bus->cmd_dma_state)
snd_hdac_bus_stop_cmd_io(bus);
} }
return ret; return ret;
......
...@@ -677,10 +677,6 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend) ...@@ -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) 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; int ret;
/* display codec must be powered before link reset */ /* display codec must be powered before link reset */
...@@ -707,16 +703,6 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume) ...@@ -707,16 +703,6 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
if (sdev->system_suspend_target == SOF_SUSPEND_NONE) if (sdev->system_suspend_target == SOF_SUSPEND_NONE)
hda_codec_jack_check(sdev); 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 #endif
/* enable ppcap interrupt */ /* enable ppcap interrupt */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment