config: add bluetooth seat-monitoring feature
This commit is contained in:
@@ -234,6 +234,10 @@ wireplumber.components = [
|
||||
type = virtual, provides = monitor.alsa-midi.monitoring,
|
||||
requires = [ api.file-monitor ]
|
||||
}
|
||||
{
|
||||
type = virtual, provides = monitor.bluetooth.seat-monitoring,
|
||||
requires = [ support.logind ]
|
||||
}
|
||||
|
||||
## Device monitors
|
||||
{
|
||||
@@ -246,13 +250,13 @@ wireplumber.components = [
|
||||
name = monitors/bluez.lua, type = script/lua
|
||||
provides = monitor.bluez
|
||||
requires = [ support.lua-scripting, support.export-core ]
|
||||
wants = [ support.logind ]
|
||||
wants = [ monitor.bluetooth.seat-monitoring ]
|
||||
}
|
||||
{
|
||||
name = monitors/bluez-midi.lua, type = script/lua
|
||||
provides = monitor.bluez-midi
|
||||
requires = [ support.lua-scripting, support.export-core ]
|
||||
wants = [ support.logind ]
|
||||
wants = [ monitor.bluetooth.seat-monitoring ]
|
||||
}
|
||||
{
|
||||
name = monitors/alsa-midi.lua, type = script/lua
|
||||
|
@@ -13,6 +13,7 @@ defaults.properties = Json.Object {}
|
||||
defaults.servers = Json.Array { "bluez_midi.server" }
|
||||
|
||||
config = {}
|
||||
config.seat_monitoring = Core.test_feature ("monitor.bluetooth.seat-monitoring")
|
||||
config.properties = Conf.get_section (
|
||||
"monitor.bluetooth-midi.properties", defaults.properties): parse ()
|
||||
config.servers = Conf.get_section (
|
||||
@@ -136,7 +137,9 @@ function createServers()
|
||||
return servers
|
||||
end
|
||||
|
||||
logind_plugin = Plugin.find("logind")
|
||||
if config.seat_monitoring then
|
||||
logind_plugin = Plugin.find("logind")
|
||||
end
|
||||
if logind_plugin then
|
||||
-- if logind support is enabled, activate
|
||||
-- the monitor only when the seat is active
|
||||
|
@@ -14,6 +14,7 @@ defaults = {}
|
||||
defaults.properties = Json.Object {}
|
||||
|
||||
config = {}
|
||||
config.seat_monitoring = Core.test_feature ("monitor.bluetooth.seat-monitoring")
|
||||
config.properties = Conf.get_section (
|
||||
"monitor.bluetooth.properties", defaults.properties): parse ()
|
||||
|
||||
@@ -380,7 +381,9 @@ function createMonitor()
|
||||
return monitor
|
||||
end
|
||||
|
||||
logind_plugin = Plugin.find("logind")
|
||||
if config.seat_monitoring then
|
||||
logind_plugin = Plugin.find("logind")
|
||||
end
|
||||
if logind_plugin then
|
||||
-- if logind support is enabled, activate
|
||||
-- the monitor only when the seat is active
|
||||
|
Reference in New Issue
Block a user