Commit 3bdacc41 authored by Théo Lebrun's avatar Théo Lebrun Committed by George Kiagiadakis
Browse files

config: add enabled property on monitors



Signed-off-by: Théo Lebrun's avatarThéo Lebrun <theo.lebrun@bootlin.com>
parent 7080e996
Pipeline #581764 passed with stages
in 2 minutes and 38 seconds
......@@ -3,6 +3,10 @@ bluez_monitor.properties = {}
bluez_monitor.rules = {}
function bluez_monitor.enable()
if not bluez_monitor.enabled then
return
end
load_monitor("bluez", {
properties = bluez_monitor.properties,
rules = bluez_monitor.rules,
......
bluez_monitor.enabled = true
bluez_monitor.properties = {
-- These features do not work on all headsets, so they are enabled
-- by default based on the hardware database. They can also be
......
......@@ -3,6 +3,10 @@ default_access.properties = {}
default_access.rules = {}
function default_access.enable()
if not default_access.enabled then
return
end
load_access("default", {
rules = default_access.rules
})
......
......@@ -3,6 +3,10 @@ alsa_monitor.properties = {}
alsa_monitor.rules = {}
function alsa_monitor.enable()
if not alsa_monitor.enabled then
return
end
-- The "reserve-device" module needs to be loaded for reservation to work
if alsa_monitor.properties["alsa.reserve"] then
load_module("reserve-device")
......
......@@ -3,6 +3,10 @@ libcamera_monitor.properties = {}
libcamera_monitor.rules = {}
function libcamera_monitor.enable()
if not libcamera_monitor.enabled then
return
end
load_monitor("libcamera", {
properties = libcamera_monitor.properties,
rules = libcamera_monitor.rules,
......
......@@ -3,6 +3,10 @@ v4l2_monitor.properties = {}
v4l2_monitor.rules = {}
function v4l2_monitor.enable()
if not v4l2_monitor.enabled then
return
end
load_monitor("v4l2", {
properties = v4l2_monitor.properties,
rules = v4l2_monitor.rules,
......
device_defaults = {}
device_defaults.enabled = true
device_defaults.properties = {
-- store preferences to the file system and restore them at startup;
......@@ -37,6 +38,10 @@ device_defaults.persistent_profiles = {
}
function device_defaults.enable()
if not device_defaults.enabled then
return
end
-- Selects appropriate default nodes and enables saving and restoring them
load_module("default-nodes", device_defaults.properties)
......
stream_defaults = {}
stream_defaults.enabled = true
stream_defaults.properties = {
-- whether to restore the last stream properties or not
......@@ -24,6 +25,10 @@ stream_defaults.rules = {
}
function stream_defaults.enable()
if not stream_defaults.enabled then
return
end
-- Save and restore stream-specific properties
load_script("restore-stream.lua", {
properties = stream_defaults.properties,
......
alsa_monitor.enabled = true
alsa_monitor.properties = {
-- Create a JACK device. This is not enabled by default because
......
default_access.enabled = true
default_access.properties = {
-- Enable the use of the flatpak portal integration.
-- Disable if you are running a system-wide instance, which
......
libcamera_monitor.enabled = true
libcamera_monitor.rules = {
-- An array of matches/actions to evaluate.
......
v4l2_monitor.enabled = true
v4l2_monitor.rules = {
-- An array of matches/actions to evaluate.
......
default_policy = {}
default_policy.enabled = true
default_policy.properties = {}
default_policy.endpoints = {}
default_policy.policy = {
......@@ -37,6 +38,10 @@ bluetooth_policy.policy = {
}
function default_policy.enable()
if not default_policy.enabled then
return
end
-- Session item factories, building blocks for the session management graph
-- Do not disable these unless you really know what you are doing
load_module("si-node")
......
......@@ -92,4 +92,4 @@ default_policy.endpoints = {
["role"] = "Emergency",
},
}
]]--
\ No newline at end of file
]]--
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment