mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-08 05:48:02 +02:00
config: immitate media-session's bluez-monitor.conf
This commit is contained in:
parent
d9bf776cb8
commit
989708a880
3 changed files with 69 additions and 9 deletions
|
|
@ -99,10 +99,6 @@ function enable_audio()
|
|||
})
|
||||
end
|
||||
|
||||
function enable_bluetooth()
|
||||
load_monitor("bluez5")
|
||||
end
|
||||
|
||||
function enable_endpoints()
|
||||
load_script("static-sessions.lua", {
|
||||
["audio"] = {},
|
||||
|
|
@ -112,10 +108,5 @@ function enable_endpoints()
|
|||
load_script("policy-endpoint.lua")
|
||||
end
|
||||
|
||||
-- split these calls into .lua files in config.lua.d/
|
||||
-- to get a similar effect as the 'with-audio', 'with-pusleaudio', etc
|
||||
-- flag files that ship with pipewire-media-session
|
||||
enable_access()
|
||||
enable_audio()
|
||||
enable_bluetooth()
|
||||
enable_endpoints()
|
||||
|
|
|
|||
67
src/config/config.lua.d/30-bluez-monitor.lua
Normal file
67
src/config/config.lua.d/30-bluez-monitor.lua
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
-- Bluez monitor config file --
|
||||
|
||||
local properties = {
|
||||
-- MSBC is not expected to work on all headset + adapter combinations.
|
||||
--["bluez5.msbc-support"] = true,
|
||||
--["bluez5.sbc-xq-support"] = true,
|
||||
|
||||
-- Enabled headset roles (default: [ hsp_hs hfp_ag ]), this
|
||||
-- property only applies to native backend. Currently some headsets
|
||||
-- (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag
|
||||
-- enabled, disable either hsp_ag or hfp_ag to work around it.
|
||||
--
|
||||
-- Supported headset roles: hsp_hs (HSP Headset),
|
||||
-- hsp_ag (HSP Audio Gateway),
|
||||
-- hfp_ag (HFP Audio Gateway)
|
||||
--["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_ag ]",
|
||||
|
||||
-- Enabled A2DP codecs (default: all).
|
||||
--["bluez5.codecs"] = "[ sbc aac ldac aptx aptx_hd ]",
|
||||
}
|
||||
|
||||
local rules = {
|
||||
-- An array of matches/actions to evaluate.
|
||||
{
|
||||
-- Rules for matching a device or node. It is an array of
|
||||
-- properties that all need to match the regexp. If any of the
|
||||
-- matches work, the actions are executed for the object.
|
||||
matches = {
|
||||
{
|
||||
-- This matches all cards.
|
||||
{ "device.name", "matches", "bluez_card.*" },
|
||||
},
|
||||
},
|
||||
-- Apply properties on the matched object.
|
||||
apply_properties = {
|
||||
-- ["device.nick"] = "My Device",
|
||||
},
|
||||
},
|
||||
{
|
||||
matches = {
|
||||
{
|
||||
-- Matches all sources.
|
||||
{ "node.name", "matches", "bluez_input.*" },
|
||||
},
|
||||
{
|
||||
-- Matches all sinks.
|
||||
{ "node.name", "matches", "bluez_output.*" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
--["node.nick"] = "My Node",
|
||||
--["priority.driver"] = 100,
|
||||
--["priority.session"] = 100,
|
||||
--["node.pause-on-idle"] = false,
|
||||
--["resample.quality"] = 4,
|
||||
--["channelmix.normalize"] = false,
|
||||
--["channelmix.mix-lfe"] = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
function enable_bluetooth()
|
||||
load_monitor("bluez5", {
|
||||
properties = properties,
|
||||
rules = rules,
|
||||
})
|
||||
end
|
||||
2
src/config/config.lua.d/90-enable-audio-all.lua
Normal file
2
src/config/config.lua.d/90-enable-audio-all.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
enable_audio()
|
||||
enable_bluetooth()
|
||||
Loading…
Add table
Reference in a new issue