From bba72b0f47d26dc9acbf245c0521d3b3c80103ee Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 7 May 2021 15:11:38 +0200 Subject: [PATCH] cht-bsw-rt5672: Add support for controlling speaker- and mic-mute LEDs 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 Signed-off-by: Jaroslav Kysela --- ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf b/ucm2/cht-bsw-rt5672/cht-bsw-rt5672.conf index db2924f..ddb8cce 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" +] -- 2.47.1