File tree Expand file tree Collapse file tree 10 files changed +34
-49
lines changed
Expand file tree Collapse file tree 10 files changed +34
-49
lines changed Original file line number Diff line number Diff line change 11Syntax 6
22
3+ Include.led.File "/common/ctl/led.conf"
4+
35Define.Use "" # a non-empty string to use UCM configuration for HDA devices
46Define.Done "" # a non-empty string to skip the end error
57
@@ -51,11 +53,10 @@ If.use {
5153 True {
5254 Include.init.File "/HDA/init.conf"
5355
54- FixedBootSequence [
55- cset-new "name='Mic ACP LED Capture Switch' type=bool,count=1 off"
56- exec "-/sbin/modprobe snd_ctl_led"
57- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:Mic ACP LED Capture Switch"
58- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:Capture Switch"
56+ Macro [
57+ { CtlNew { Arg="name='Mic ACP LED Capture Switch' type=bool,count=1 off" } }
58+ { SetLED { LED="mic" Action="attach" CtlId="Mic ACP LED Capture Switch" } }
59+ { SetLED { LED="mic" Action="detach" CtlId="Capture Switch" } }
5960 ]
6061 }
6162 }
Original file line number Diff line number Diff line change 1- Syntax 4
1+ Syntax 6
22
33SectionUseCase."HiFi" {
44 File "/Intel/bytcr-rt5640/HiFi.conf"
55 Comment "Play HiFi quality Music"
66}
77
8+ Include.led.File "/common/ctl/led.conf"
89Include.card-init.File "/lib/card-init.conf"
910Include.ctl-remap.File "/lib/ctl-remap.conf"
1011Include.codec-init.File "/codecs/rt5640/init.conf"
1112
12- FixedBootSequence [
13- exec "-/sbin/modprobe snd_ctl_led"
14- sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:Speaker Channel Switch"
15- sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:HP Channel Switch"
13+ Macro [
14+ { SetLED { LED="speaker" Action="attach" CtlId="Speaker Channel Switch" } }
15+ { SetLED { LED="speaker" Action="attach" CtlId="HP Channel Switch" } }
1616]
Original file line number Diff line number Diff line change 11# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
22
3- Syntax 3
3+ Syntax 6
44
55SectionUseCase."HiFi" {
66 File "/Intel/cht-bsw-rt5672/HiFi.conf"
77 Comment "Play HiFi quality Music"
88}
99
10- FixedBootSequence [
11- exec "-/sbin/modprobe snd_ctl_led"
12- sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:DAC1 Playback Switch"
13- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:ADC Capture Switch"
10+ Include.led.File "/common/ctl/led.conf"
11+
12+ Macro [
13+ { SetLED { LED="speaker" Action="attach" CtlId="DAC1 Playback Switch" } }
14+ { SetLED { LED="mic" Action="attach" CtlId="ADC Capture Switch" } }
1415]
Original file line number Diff line number Diff line change 11Syntax 7
22
3+ Include.led.File "/common/ctl/led.conf"
34Include.card-init.File "/lib/card-init.conf"
45Include.dsp-variables.File "dsp.conf"
56
@@ -25,13 +26,13 @@ If.devdmic {
2526 True {
2627 Define.DeviceDmic "Mic1"
2728 Define.DeviceMic "Mic2"
29+ #
30+ # users expect to turn the LED on when only internal
31+ # mic is off, but it makes sense to turn this LED
32+ # when all internal inputs are off
33+ #
34+ Macro [{ SetLED { LED="mic" Action="detach" CtlId="Capture Switch" } }]
2835 FixedBootSequence [
29- #
30- # users expect to turn the LED on when only internal
31- # mic is off, but it makes sense to turn this LED
32- # when all internal inputs are off
33- #
34- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:Capture Switch"
3536 # dmic array info
3637 exec "-nhlt-dmic-info -o ${var:LibDir}/dmics-nhlt.json"
3738 ]
@@ -82,11 +83,7 @@ If.DellMuteLed {
8283 Haystack "$${sys:class/leds/platform::mute/device}"
8384 Needle "dell-laptop"
8485 }
85- True {
86- FixedBootSequence [
87- sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:Master Playback Switch"
88- ]
89- }
86+ True.Macro [{ SetLED { LED="speaker" Action="detach" CtlId="Master Playback Switch" } }]
9087}
9188
9289If.headphone {
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ BootSequence [
1818 cset "name='cs42l43 Decimator 4 Switch' 0"
1919]
2020
21- FixedBootSequence [
22- exec "-/sbin/modprobe snd_ctl_led"
23- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 3 Switch"
24- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 4 Switch"
21+ Macro [
22+ { SetLED { LED="mic" Action="attach" CtlId="cs42l43 Decimator 3 Switch" } }
23+ { SetLED { LED="mic" Action="attach" CtlId="cs42l43 Decimator 4 Switch" } }
2524]
Original file line number Diff line number Diff line change @@ -15,7 +15,4 @@ BootSequence [
1515 cset "name='cs42l43 Decimator 1 Switch' 0"
1616]
1717
18- FixedBootSequence [
19- exec "-/sbin/modprobe snd_ctl_led"
20- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 1 Switch"
21- ]
18+ Macro [{ SetLED { LED="mic" Action="attach" CtlId="cs42l43 Decimator 1 Switch" } }]
Original file line number Diff line number Diff line change @@ -8,7 +8,4 @@ BootSequence [
88 cset "name='rt714 FU02 Capture Volume' 47"
99]
1010
11- FixedBootSequence [
12- exec "-/sbin/modprobe snd_ctl_led"
13- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:rt714 FU02 Capture Switch"
14- ]
11+ Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt714 FU02 Capture Switch" } }]
Original file line number Diff line number Diff line change @@ -24,8 +24,5 @@ If.capturesw {
2424 Type ControlExists
2525 Control "name='rt715 Capture Switch'"
2626 }
27- True.FixedBootSequence [
28- exec "-/sbin/modprobe snd_ctl_led"
29- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:rt715 Capture Switch"
30- ]
27+ Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt715 Capture Switch" } }]
3128}
Original file line number Diff line number Diff line change @@ -10,7 +10,4 @@ BootSequence [
1010 cset "name='rt722 FU0F Capture Volume' 63"
1111]
1212
13- FixedBootSequence [
14- exec "-/sbin/modprobe snd_ctl_led"
15- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:rt722 FU1E Capture Switch"
16- ]
13+ Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt722 FU1E Capture Switch" } }]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ SectionUseCase."HiFi" {
55 Comment "Play HiFi quality Music"
66}
77
8+ Include.led.File "/common/ctl/led.conf"
89Include.card-init.File "/lib/card-init.conf"
910Include.ctl-remap.File "/lib/ctl-remap.conf"
1011
@@ -126,9 +127,7 @@ If.mic_init_rt715 {
126127 Needle "rt715"
127128 Haystack "${var:MicCodec1}"
128129 }
129- True.BootSequence [
130- sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch"
131- ]
130+ True.Macro [{ SetLED { LED="mic" Action="detach" CtlId="PGA5.0 5 Master Capture Switch" } }]
132131}
133132
134133If.pga_init_pga2 {
You can’t perform that action at this time.
0 commit comments