[PATCH alsa-ucm-conf 3/3] bytcr-rt5640: Add support for controlling a speaker-mute LED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hdegoede@xxxxxxxxxx>
---
 ucm2/bytcr-rt5640/bytcr-rt5640.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ucm2/bytcr-rt5640/bytcr-rt5640.conf b/ucm2/bytcr-rt5640/bytcr-rt5640.conf
index af966ef..6b54d8f 100644
--- a/ucm2/bytcr-rt5640/bytcr-rt5640.conf
+++ b/ucm2/bytcr-rt5640/bytcr-rt5640.conf
@@ -4,3 +4,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:Speaker Channel Switch"
+	sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:HP Channel Switch"
+]
-- 
2.31.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux