mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
ASoC: SOF: Intel: hda-mlink: special-case HDaudio regular links
For backwards compatibility, HDaudio/iDISP links are powered-on when exiting reset, and the existing driver forces them to be powered-off when entering S0ix. In addition, the get/put helpers are invoked directly by the ASoC codec drivers, which a historical layering violation. Extended links are powered-on by software only, during the probe and DAI startup phases. This calls for a different handling of the 'regular' and 'extended' audio links. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20230404104127.5629-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
17c9b6ec35
commit
4c2d4e446d
1 changed files with 22 additions and 4 deletions
|
@ -255,8 +255,12 @@ void hda_bus_ml_put_all(struct hdac_bus *bus)
|
|||
{
|
||||
struct hdac_ext_link *hlink;
|
||||
|
||||
list_for_each_entry(hlink, &bus->hlink_list, list)
|
||||
snd_hdac_ext_bus_link_put(bus, hlink);
|
||||
list_for_each_entry(hlink, &bus->hlink_list, list) {
|
||||
struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink);
|
||||
|
||||
if (!h2link->alt)
|
||||
snd_hdac_ext_bus_link_put(bus, hlink);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(hda_bus_ml_put_all, SND_SOC_SOF_HDA_MLINK);
|
||||
|
||||
|
@ -277,7 +281,9 @@ int hda_bus_ml_resume(struct hdac_bus *bus)
|
|||
|
||||
/* power up links that were active before suspend */
|
||||
list_for_each_entry(hlink, &bus->hlink_list, list) {
|
||||
if (hlink->ref_count) {
|
||||
struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink);
|
||||
|
||||
if (!h2link->alt && hlink->ref_count) {
|
||||
ret = snd_hdac_ext_bus_link_power_up(hlink);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
@ -289,7 +295,19 @@ EXPORT_SYMBOL_NS(hda_bus_ml_resume, SND_SOC_SOF_HDA_MLINK);
|
|||
|
||||
int hda_bus_ml_suspend(struct hdac_bus *bus)
|
||||
{
|
||||
return snd_hdac_ext_bus_link_power_down_all(bus);
|
||||
struct hdac_ext_link *hlink;
|
||||
int ret;
|
||||
|
||||
list_for_each_entry(hlink, &bus->hlink_list, list) {
|
||||
struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink);
|
||||
|
||||
if (!h2link->alt) {
|
||||
ret = snd_hdac_ext_bus_link_power_down(hlink);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(hda_bus_ml_suspend, SND_SOC_SOF_HDA_MLINK);
|
||||
|
||||
|
|
Loading…
Reference in a new issue