ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown
authorTakashi Iwai <tiwai@suse.de>
Fri, 26 Jul 2024 14:26:19 +0000 (16:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 26 Jul 2024 14:36:01 +0000 (16:36 +0200)
commit6cd23b26b348fa52c88e1adf9c0e48d68e13f95e
tree1d2751f36e4d3a199f6d1f67a8f7f59397adbc6c
parente60dc98122110594d0290845160f12916192fc6d
ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown

Some devices indicate click noises at suspend or shutdown when the
speakers are unmuted.  This patch adds a helper,
snd_hda_gen_shutup_speakers(), to work around it.  The new function is
supposed to be called at suspend or shutdown by the codec driver, and
it mutes the speakers.

The mute status isn't cached, hence the original mute state will be
restored at resume again.

Link: https://patch.msgid.link/20240726142625.2460-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_generic.h