leds: trigger: Introduce audio mute LED trigger

This patch adds a new LED trigger for coupling the audio mixer change
with the LED on laptops or other devices.  Currently there are two
trigger types, "audio-mute" and "audio-micmute".

The audio driver triggers the LED brightness change via
ledtrig_audio_set() call with the proper type (either mute or
mic-mute).  OTOH, the consumers may call ledtrig_audio_get() for the
initial brightness value that may have been set by the audio driver
beforehand.

This new stuff will be used by HD-audio codec driver and some platform
drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi).

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tento commit je obsažen v:
Takashi Iwai
2018-11-26 17:47:44 +01:00
rodič 9ff01193a2
revize faa2541f5b
4 změnil soubory, kde provedl 72 přidání a 0 odebrání

Zobrazit soubor

@@ -136,4 +136,11 @@ config LEDS_TRIGGER_PATTERN
which is a series of tuples, of brightness and duration (ms).
If unsure, say N
config LEDS_TRIGGER_AUDIO
tristate "Audio Mute LED Trigger"
help
This allows LEDs to be controlled by audio drivers for following
the audio mute and mic-mute changes.
If unsure, say N
endif # LEDS_TRIGGERS