ALSA: control - add sysfs support to the LED trigger module
authorJaroslav Kysela <perex@perex.cz>
Wed, 17 Mar 2021 17:29:44 +0000 (18:29 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 Mar 2021 13:38:37 +0000 (15:38 +0200)
commitcb17fe0045aaa74d1ce12c0ad0058a62a1ce0401
treeaa0c55bd6f1e4bad33e44eed84112ce36117f88c
parente65bf99718b538c2f34e9444dfe1087789b58f94
ALSA: control - add sysfs support to the LED trigger module

Create SYSFS/devices/virtual/sound/ctl-led tree
(with SYSFS/class/sound/ctl-led symlink).

  speaker/
    +-- mode
    +-- brightness
  mic/
    +-- mode
    +-- brightness

Copy the idea from the HDA driver and allow to set the audio
LEDs based on the various modes:

- follow mute
- follow moute (inverted to follow mute)
- off
- on

Also, the actual LED state is exposed.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210317172945.842280-6-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/control_led.c