From: Jaroslav Kysela Date: Thu, 4 Nov 2021 09:01:05 +0000 (+0100) Subject: HDA-Intel: AMD ACP - add LED support X-Git-Tag: v1.2.6~35 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=9add68044679685ecd408bdd11e0c99da490adb5;p=alsa-ucm-conf.git HDA-Intel: AMD ACP - add LED support - 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 --- diff --git a/ucm2/HDA-Intel/HDA-Intel.conf b/ucm2/HDA-Intel/HDA-Intel.conf index 0d10fd4..78b46f0 100644 --- a/ucm2/HDA-Intel/HDA-Intel.conf +++ b/ucm2/HDA-Intel/HDA-Intel.conf @@ -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})" diff --git a/ucm2/HDA-Intel/HiFi-acp.conf b/ucm2/HDA-Intel/HiFi-acp.conf index 123ae15..a650f5c 100644 --- a/ucm2/HDA-Intel/HiFi-acp.conf +++ b/ucm2/HDA-Intel/HiFi-acp.conf @@ -4,5 +4,7 @@ SectionDevice."Mic1" { Value { CapturePriority 100 CapturePCM "hw:${var:AcpCardId}" + CaptureMixerElem "Mic ACP LED" + CaptureSwitch "Mic ACP LED Capture Switch" } }