1 -- Default policy config file --
5 default_policy.endpoints = {
6 -- [endpoint name] = { endpoint properties }
8 ["endpoint.multimedia"] = {
9 ["media.class"] = "Audio/Sink",
10 ["role"] = "Multimedia",
12 ["endpoint.speech_low"] = {
13 ["media.class"] = "Audio/Sink",
14 ["role"] = "Speech-Low",
16 ["endpoint.custom_low"] = {
17 ["media.class"] = "Audio/Sink",
18 ["role"] = "Custom-Low",
20 ["endpoint.navigation"] = {
21 ["media.class"] = "Audio/Sink",
22 ["role"] = "Navigation",
24 ["endpoint.speech_high"] = {
25 ["media.class"] = "Audio/Sink",
26 ["role"] = "Speech-High",
28 ["endpoint.custom_high"] = {
29 ["media.class"] = "Audio/Sink",
30 ["role"] = "Custom-High",
32 ["endpoint.communication"] = {
33 ["media.class"] = "Audio/Sink",
34 ["role"] = "Communication",
36 ["endpoint.emergency"] = {
37 ["media.class"] = "Audio/Sink",
38 ["role"] = "Emergency",
42 default_policy.policy = {
43 ["move"] = false, -- moves session items when metadata target.node changes
44 ["follow"] = true, -- moves session items to the default device when it has changed
46 -- how much to lower the volume of lower priority streams when ducking
47 -- note that this is a linear volume modifier (not cubic as in the mixer)
52 ["alias"] = { "Movie", "Music", "Game" },
54 ["action.default"] = "cork",
58 ["action.default"] = "cork",
59 ["action.Speech-Low"] = "mix",
63 ["action.default"] = "cork",
64 ["action.Custom-Low"] = "mix",
68 ["action.default"] = "duck",
69 ["action.Navigation"] = "mix",
73 ["action.default"] = "cork",
74 ["action.Speech-High"] = "mix",
78 ["action.default"] = "cork",
79 ["action.Custom-High"] = "mix",
83 ["action.default"] = "cork",
84 ["action.Communication"] = "mix",
87 ["alias"] = { "Alert" },
89 ["action.default"] = "cork",
90 ["action.Emergency"] = "mix",
95 function default_policy.enable()
96 -- Session item factories, building blocks for the session management graph
97 -- Do not disable these unless you really know what you are doing
98 load_module("si-node")
99 load_module("si-audio-adapter")
100 load_module("si-standard-link")
101 load_module("si-audio-endpoint")
103 -- API to access default nodes from scripts
104 load_module("default-nodes-api")
106 -- API to access mixer controls, needed for volume ducking
107 load_module("mixer-api")
109 -- Create endpoints statically at startup
110 load_script("static-endpoints.lua", default_policy.endpoints)
112 -- Create session items for nodes that appear in the graph
113 load_script("create-item.lua")
115 -- Link nodes to each other to make media flow in the graph
116 load_script("policy-node.lua", default_policy.policy)
118 -- Link client nodes with endpoints to make media flow in the graph
119 load_script("policy-endpoint-client.lua", default_policy.policy)
120 load_script("policy-endpoint-client-links.lua", default_policy.policy)
122 -- Link endpoints with device nodes to make media flow in the graph
123 load_script("policy-endpoint-device.lua", default_policy.policy)