File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # Macro SetLED - attach or detach speaker or microphone LED to given control element
3+ #
4+ # Arguments:
5+ # LED - LED selection - "speaker" or "mic"
6+ # Action - action for given control - "attach" or "detach"
7+ # CtlId - control identifier (as for amixer, e.g. "Capture Switch" or "name='CaptureSwitch',index=1")
8+ #
9+
10+ DefineMacro.SetLED {
11+ If.0 {
12+ Condition {
13+ Type String
14+ Empty "${var:-SndCtlLedModprobe}"
15+ }
16+ True {
17+ FixedBootSequence [
18+ exec "-/sbin/modprobe snd_ctl_led"
19+ ]
20+ Define.SndCtlLedModprobe ok
21+ }
22+ }
23+ If.1 {
24+ Condition { Type AlwaysTrue }
25+ True.FixedBootSequence [
26+ sysw "-/class/sound/ctl-led/${var:__LED}/card${CardNumber}/${var:__Action}:${var:__CtlId}"
27+ ]
28+ }
29+ }
30+
31+ #
32+ # Macro CtlNew - helper to create new control elemend
33+ #
34+ # Arguments:
35+ # Arg - string for cset-new
36+ #
37+
38+ DefineMacro.CtlNew.FixedBootSequence [
39+ cset-new "${var:__Arg}"
40+ ]
You can’t perform that action at this time.
0 commit comments