Skip to content

Commit dad0a12

Browse files
committed
wireplumber: be fancy
1 parent 22fecb4 commit dad0a12

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed
+18-26
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
1-
local disable_spdif = {
2-
matches = {
3-
{
1+
local function disable_node(node_name)
2+
local rule = {
3+
matches = {
44
{
5-
"node.name",
6-
"equals",
7-
"alsa_output.usb-Generic_USB_Audio-00.HiFi__hw_Audio_3__sink"
5+
{
6+
"node.name",
7+
"equals",
8+
node_name
9+
}
810
}
11+
},
12+
apply_properties = {
13+
["node.disabled"] = true
914
}
10-
},
11-
apply_properties = {
12-
["node.disabled"] = true
1315
}
14-
}
1516

16-
local disable_fpaudio = {
17-
matches = {
18-
{
19-
{
20-
"node.name",
21-
"equals",
22-
"alsa_output.usb-Generic_USB_Audio-00.HiFi__hw_Audio_1__sink"
23-
}
24-
}
25-
},
26-
apply_properties = {
27-
["node.disabled"] = true
28-
}
29-
}
17+
table.insert(alsa_monitor.rules, rule)
18+
end
19+
20+
-- S/PDIF
21+
disable_node("alsa_output.usb-Generic_USB_Audio-00.HiFi__hw_Audio_3__sink")
3022

31-
table.insert(alsa_monitor.rules, disable_spdif)
32-
table.insert(alsa_monitor.rules, disable_fpaudio)
23+
-- Front panel audio
24+
disable_node("alsa_output.usb-Generic_USB_Audio-00.HiFi__hw_Audio_1__sink")

0 commit comments

Comments
 (0)