From: Hans de Goede Date: Fri, 7 May 2021 13:11:39 +0000 (+0200) Subject: bytcr-rt5640: Add support for controlling a speaker-mute LED X-Git-Tag: v1.2.5~14 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=449b10d55902c70a239db3e3689d5cc31400f14f;p=alsa-ucm-conf.git bytcr-rt5640: Add support for controlling a speaker-mute LED Add support for controlling a speaker-mute LED using the new snd_ctl_led kernel module for generic mute LED control. Tested on a HP Pavilion X2 10-n000nd and a HP Pavilion X2 10-p002nd both of which have a detachable USB keyboard with a speaker mute LED embedded in the audio-mute button. Signed-off-by: Hans de Goede Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/bytcr-rt5640/bytcr-rt5640.conf b/ucm2/bytcr-rt5640/bytcr-rt5640.conf index 34e9146..00b03b6 100644 --- a/ucm2/bytcr-rt5640/bytcr-rt5640.conf +++ b/ucm2/bytcr-rt5640/bytcr-rt5640.conf @@ -8,3 +8,9 @@ SectionUseCase."HiFi" { Include.card-init.File "/lib/card-init.conf" Include.ctl-remap.File "/lib/ctl-remap.conf" Include.codec-init.File "/codecs/rt5640/init.conf" + +FixedBootSequence [ + exec "-/sbin/modprobe snd_ctl_led" + sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:Speaker Channel Switch" + sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:HP Channel Switch" +]