]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: control - add generic LED trigger module as the new control layer
authorJaroslav Kysela <perex@perex.cz>
Wed, 17 Mar 2021 17:29:42 +0000 (18:29 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 Mar 2021 13:33:58 +0000 (15:33 +0200)
commit57a56cffc61badff678ec096c24592b01473a916
treec70cf12a37bf874e36b727dbefece077b34febe5
parentc639d74437100a37ee7985de9a0784a45df8fa7a
ALSA: control - add generic LED trigger module as the new control layer

The recent laptops have usually two LEDs assigned to reflect
the speaker and microphone mute state. This implementation
adds a tiny layer on top of the control API which calculates
the state for those LEDs using the driver callbacks.

Two new access flags are introduced to describe the controls
which affects the audio path settings (an easy code change
for drivers).

The LED resource can be shared with multiple sound cards with
this code. The user space controls may be added to the state
chain on demand, too.

This code should replace the LED code in the HDA driver and
add a possibility to easy extend the other drivers (ASoC
codecs etc.).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210317172945.842280-4-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/control.h
sound/core/Kconfig
sound/core/Makefile
sound/core/control.c
sound/core/control_led.c [new file with mode: 0644]