]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA-Intel: AMD ACP - add LED support
authorJaroslav Kysela <perex@perex.cz>
Thu, 4 Nov 2021 09:01:05 +0000 (10:01 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Nov 2021 22:05:56 +0000 (23:05 +0100)
- create 'Mic ACP LED Capture Switch'
- load the snd_ctl_led module when ACP microphone device is detected
- attach 'Mic ACP LED Capture Switch' to Mic LED
- add 'Mic ACP LED Capture Switch' control to ACP microphone device

Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/115
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA-Intel/HDA-Intel.conf
ucm2/HDA-Intel/HiFi-acp.conf

index 0d10fd4710a2cd1f1dd05723f667338634a4c3d2..78b46f0082a9f20c3d160b2fdc48df5e1e850066 100644 (file)
@@ -28,6 +28,12 @@ If.use {
                }
 
                Include.init.File "/HDA-Intel/init.conf"
+
+               FixedBootSequence [
+                       cset-new "name='Mic ACP LED Capture Switch' type=bool,count=1 off"
+                       exec "-/sbin/modprobe snd_ctl_led"
+                       sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:Mic ACP LED Capture Switch"
+               ]
        }
        True {
                Error "UCM is not supported for this HDA model (${CardLongName})"
index 123ae15f04066230a63e28ab0c39666fbbdd1d49..a650f5cfb2f59830367ca44e2f876d4a98368bfd 100644 (file)
@@ -4,5 +4,7 @@ SectionDevice."Mic1" {
        Value {
                CapturePriority 100
                CapturePCM "hw:${var:AcpCardId}"
+               CaptureMixerElem "Mic ACP LED"
+               CaptureSwitch "Mic ACP LED Capture Switch"
        }
 }