aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-06-18 13:08:42 +0200
committerTakashi Iwai <tiwai@suse.de>2020-06-18 13:24:33 +0200
commitc9e272f9e03d412073a3ae2c1814efbec10b6278 (patch)
tree641782e2fd83947b47896765074f759e454ba285 /sound/pci/hda/hda_generic.c
parentALSA: hda/realtek: Unify LED helper code (diff)
downloadlinux-dev-c9e272f9e03d412073a3ae2c1814efbec10b6278.tar.xz
linux-dev-c9e272f9e03d412073a3ae2c1814efbec10b6278.zip
ALSA: hda: Let LED cdev handling suspend/resume
Set LED_CORE_SUSPENDRESUME to LED cdev flags, so that the LED core would store and restore the LED status at suspend/resume. In theory, the codec driver should be responsible for all LED bits, but this might be safer and cover the overlooked cases. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-14-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index c74519d7096b..9074265d934a 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3908,6 +3908,7 @@ static int create_mute_led_cdev(struct hda_codec *codec,
cdev->default_trigger = micmute ? "audio-micmute" : "audio-mute";
cdev->brightness_set_blocking = callback;
cdev->brightness = ledtrig_audio_get(micmute ? LED_AUDIO_MICMUTE : LED_AUDIO_MUTE);
+ cdev->flags = LED_CORE_SUSPENDRESUME;
return devm_led_classdev_register(&codec->core.dev, cdev);
}