Update QEMU audio configuration
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber-config-agl / policy.lua.d / 10-default-policy.lua
index 82f5bb0..e6170dd 100644 (file)
@@ -4,7 +4,10 @@ policy_config = {}
 
 policy_config.endpoints = {
   -- [endpoint name] = { endpoint properties }
-
+  ["endpoint.capture"] = {
+    ["media.class"] = "Audio/Source",
+    ["role"] = "Capture",
+  },
   ["endpoint.multimedia"] = {
     ["media.class"] = "Audio/Sink",
     ["role"] = "Multimedia",
@@ -53,6 +56,13 @@ policy_config.policy = {
   ["duck.level"] = 0.2,
 
   ["roles"] = {
+    ["Capture"] = {
+      ["alias"] = { "Multimedia", "Music", "Voice", "Capture" },
+      ["priority"] = 25,
+      ["action.default"] = "cork",
+      ["action.Capture"] = "mix",
+      ["media.class"] = "Audio/Source",
+    },
     ["Multimedia"] = {
       ["alias"] = { "Movie", "Music", "Game" },
       ["priority"] = 25,
@@ -113,8 +123,8 @@ load_module("mixer-api")
 -- Create endpoints statically at startup
 load_script("static-endpoints.lua", policy_config.endpoints)
 
-  -- Create session items for nodes that appear in the graph
-  load_script("create-item.lua", default_policy.policy)
+-- Create session items for nodes that appear in the graph
+load_script("create-item.lua", policy_config.policy)
 
 -- Link nodes to each other to make media flow in the graph
 load_script("policy-node.lua", policy_config.policy)