monitor-alsa: add api.alsa.card.* properties on nodes

Useful for rule matching on nodes where the rules are also matching
properties of the card.
This commit is contained in:
George Kiagiadakis 2021-03-26 17:29:25 +02:00
parent dd887a7b3e
commit 95bb22efe2

View file

@ -159,6 +159,13 @@ function createNode(parent, id, type, factory, properties)
properties["node.description"] = desc:gsub("(:)", " ")
end
-- add api.alsa.card.* properties for rule matching purposes
for k, v in pairs(dev_props) do
if k:find("^api%.alsa%.card%..*") then
properties[k] = v
end
end
-- apply properties from config.rules
rulesApplyProperties(properties)