diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-08-13 10:12:29 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-14 08:39:27 +0200 |
commit | b98444ed597dc42be620bcac241c93da50933e69 (patch) | |
tree | b4e00504895725dd1b693de9a894dfb36d2ada68 /sound/pci/hda/hda_local.h | |
parent | 95dc85dba05fa8f84c6db5fee3990fa4dd9fb499 (diff) | |
download | lwn-b98444ed597dc42be620bcac241c93da50933e69.tar.gz lwn-b98444ed597dc42be620bcac241c93da50933e69.zip |
ALSA: hda: Suspend codec at shutdown
So far we have a few workarounds at shutdown for each codec,
e.g. turning off the display power and setting the codec to D3.
But all those are basically a part of the suspend procedure.
Moreover, the streams are still active after that call, hence it might
hit the update on the codec that has been already put to D3.
In this patch, instead of calling each reboot_notify callback, simply
put the codec into the runtime-suspended state after the manual
suspend of all PCM streams. It makes the code and the behavior more
consistent.
The reboot_notify callback is no longer used after this patch, and
will be cleaned up later.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
Link: https://lore.kernel.org/r/20210813081230.4268-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 8d2503e8dad8..ea8ab8b43337 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -615,6 +615,8 @@ unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec, hda_nid_t nid, unsigned int power_state); +void snd_hda_codec_shutdown(struct hda_codec *codec); + /* * AMP control callbacks */ |