mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 22:08:45 +02:00
added support for disabling nodes and devices through conf
This commit is contained in:
parent
75281d8681
commit
bbd23fa3e3
2 changed files with 19 additions and 0 deletions
|
|
@ -17,6 +17,19 @@ alsa_monitor.properties = {
|
||||||
|
|
||||||
alsa_monitor.rules = {
|
alsa_monitor.rules = {
|
||||||
-- An array of matches/actions to evaluate.
|
-- An array of matches/actions to evaluate.
|
||||||
|
--
|
||||||
|
-- If you want to disable some devices or nodes, you can apply properties per device as the following example.
|
||||||
|
-- The name can be found by running pw-cli ls Device, or pw-cli dump Device
|
||||||
|
--{
|
||||||
|
-- matches = {
|
||||||
|
-- {
|
||||||
|
-- { "device.name", "matches", "name_of_some_disabled_card" },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- apply_properties = {
|
||||||
|
-- ["device.disabled"] = true,
|
||||||
|
-- },
|
||||||
|
--}
|
||||||
{
|
{
|
||||||
-- Rules for matching a device or node. It is an array of
|
-- Rules for matching a device or node. It is an array of
|
||||||
-- properties that all need to match the regexp. If any of the
|
-- properties that all need to match the regexp. If any of the
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,9 @@ function createNode(parent, id, type, factory, properties)
|
||||||
|
|
||||||
-- apply properties from config.rules
|
-- apply properties from config.rules
|
||||||
rulesApplyProperties(properties)
|
rulesApplyProperties(properties)
|
||||||
|
if properties["node.disabled"] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- create the node
|
-- create the node
|
||||||
local node = Node("adapter", properties)
|
local node = Node("adapter", properties)
|
||||||
|
|
@ -254,6 +257,9 @@ function prepareDevice(parent, id, type, factory, properties)
|
||||||
|
|
||||||
-- apply properties from config.rules
|
-- apply properties from config.rules
|
||||||
rulesApplyProperties(properties)
|
rulesApplyProperties(properties)
|
||||||
|
if properties["device.disabled"] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- override the device factory to use ACP
|
-- override the device factory to use ACP
|
||||||
if properties["api.alsa.use-acp"] then
|
if properties["api.alsa.use-acp"] then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue