meta-agl: split wireplumber to run in multiple instances
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber-config-agl / host.lua.d / 30-v4l2-monitor.lua
1 -- V4L2 monitor config file --
2
3 v4l2_monitor = {}
4 v4l2_monitor.properties = {}
5
6 v4l2_monitor.rules = {
7   -- An array of matches/actions to evaluate.
8   {
9     -- Rules for matching a device or node. It is an array of
10     -- properties that all need to match the regexp. If any of the
11     -- matches work, the actions are executed for the object.
12     matches = {
13       {
14         -- This matches all cards.
15         { "device.name", "matches", "v4l2_device.*" },
16       },
17     },
18     -- Apply properties on the matched object.
19     apply_properties = {
20       -- ["device.nick"] = "My Device",
21     },
22   },
23   {
24     matches = {
25       {
26         -- Matches all sources.
27         { "node.name", "matches", "v4l2_input.*" },
28       },
29       {
30         -- Matches all sinks.
31         { "node.name", "matches", "v4l2_output.*" },
32       },
33     },
34     apply_properties = {
35       --["node.nick"] = "My Node",
36       --["priority.driver"] = 100,
37       --["priority.session"] = 100,
38       --["node.pause-on-idle"] = false,
39     },
40   },
41 }
42
43 function v4l2_monitor.enable()
44   load_monitor("v4l2", {
45     properties = v4l2_monitor.properties,
46     rules = v4l2_monitor.rules,
47   })
48 end