diff options
author | Mark Brown <broonie@kernel.org> | 2022-10-19 14:03:33 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-19 14:03:33 +0300 |
commit | fd65e099235f99415178484b328cc230ad021d18 (patch) | |
tree | fc86595452287aea5bbec43604c2b059a67fb296 | |
parent | 67860d2a8e0db7783f680f6f1c1600ed34ed3a97 (diff) | |
parent | 9f68d6e64f51bf62f8d2f7d82a425470e9aa3b24 (diff) | |
download | linux-fd65e099235f99415178484b328cc230ad021d18.tar.xz |
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.
-rw-r--r-- | sound/soc/intel/avs/core.c | 11 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 9 | ||||
-rw-r--r-- | sound/soc/sof/intel/hda-dsp.c | 14 |
3 files changed, 0 insertions, 34 deletions
diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 900d250799b7..d067ce951afc 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -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) { struct hdac_bus *bus = &adev->base.core; - struct hdac_ext_link *hlink; int ret; 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) 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; } diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index bbba2df33aaf..1cfdb04f589f 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -387,15 +387,6 @@ static int skl_resume(struct device *dev) snd_hdac_bus_init_cmd_io(bus); } else { 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; 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 */ |