mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-01-06 12:40:10 +01:00
config: load reserve-device only if alsa.reserve is true
and also make the default of alsa.reserve to be false, for easier scripting
This commit is contained in:
parent
4538d43bcb
commit
1d40e7713f
3 changed files with 9 additions and 8 deletions
|
|
@ -83,9 +83,6 @@ function enable_audio()
|
|||
|
||||
-- Implements storing metadata about objects in RAM
|
||||
load_module("metadata")
|
||||
|
||||
-- Enables device reservation via org.freedesktop.ReserveDevice1 on D-Bus
|
||||
load_module("reserve-device")
|
||||
end
|
||||
|
||||
function enable_endpoints()
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ local properties = {
|
|||
-- connect to the real JACK server.
|
||||
--["alsa.jack-device"] = false,
|
||||
|
||||
-- Reserve devices.
|
||||
--["alsa.reserve"] = true,
|
||||
-- Reserve devices via org.freedesktop.ReserveDevice1 on D-Bus
|
||||
["alsa.reserve"] = true,
|
||||
--["alsa.reserve.priority"] = -20,
|
||||
--["alsa.reserve.application-name"] = "WirePlumber",
|
||||
}
|
||||
|
|
@ -97,6 +97,11 @@ local rules = {
|
|||
}
|
||||
|
||||
function enable_alsa()
|
||||
-- The "reserve-device" module needs to be loaded for reservation to work
|
||||
if properties["alsa.reserve"] then
|
||||
load_module("reserve-device")
|
||||
end
|
||||
|
||||
load_monitor("alsa", {
|
||||
properties = properties,
|
||||
rules = rules,
|
||||
|
|
|
|||
|
|
@ -303,9 +303,8 @@ if config.properties["alsa.jack-device"] then
|
|||
})
|
||||
end
|
||||
|
||||
-- reservation is only disabled by explicitly setting it to false
|
||||
if config.properties["alsa.reserve"] == true or
|
||||
config.properties["alsa.reserve"] == nil then
|
||||
-- enable device reservation if requested
|
||||
if config.properties["alsa.reserve"] then
|
||||
rd_plugin = Plugin("reserve-device")
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue