diff mbox series

[alsa-ucm-conf,2/3] cht-bsw-rt5672: Add support for controlling speaker- and mic-mute LEDs

Message ID 20210507131139.10231-3-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series byt/cht: Add support for controlling mute LEDs using the new snd_ctl_led kmod | expand

Commit Message

Hans de Goede May 7, 2021, 1:11 p.m. UTC
Add support for controlling speaker- and mic-mute LEDs using the new
snd_ctl_led kernel module for generic mute LED control.

Tested on a Thinkpad 10 tablet which has a detachable USB keyboard with
a speaker mute LED embedded in the volume-mute button and a mic mute
LED embedded in the mic-mute button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf b/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf
index db2924f..c961967 100644
--- a/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf
+++ b/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf
@@ -6,3 +6,9 @@  SectionUseCase."HiFi" {
 	File "HiFi.conf"
 	Comment "Play HiFi quality Music"
 }
+
+FixedBootSequence [
+	exec "/sbin/modprobe snd_ctl_led"
+	sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:DAC1 Playback Switch"
+	sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:ADC Capture Switch"
+]