]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Suspend codec at shutdown
authorTakashi Iwai <tiwai@suse.de>
Fri, 13 Aug 2021 08:12:29 +0000 (10:12 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 14 Aug 2021 06:39:27 +0000 (08:39 +0200)
commit735d1900eb5f8633c7b05fbaaf44e128e3bfffb3
treeb4e00504895725dd1b693de9a894dfb36d2ada68
parenta947b7af1cfdbc533b49235653335488bb3f0e07
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>
sound/pci/hda/hda_bind.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h