monitors/bluez: request device ports take loopback nodes into account

Take the loopback nodes into account also in device Routes.

Some Pulseaudio applications (eg GNOME) determine what to do based on
device ports, so make sure they are consistent with what nodes will be
emitted.
This commit is contained in:
Pauli Virtanen 2026-01-04 23:23:25 +02:00
parent 84429b4794
commit b60b2f4ece

View file

@ -546,6 +546,14 @@ function checkProfiles (dev)
return
end
-- Setup Route/Port correctly for loopback nodes
local param = Pod.Object ({
"Spa:Pod:Object:Param:Props",
"Props",
params = Pod.Struct ({ "bluez5.autoswitch-routes", true })
})
dev:set_param("Props", param)
-- Create the source loopback device if never created before
local source_loopback = spa_device:get_managed_object (LOOPBACK_SOURCE_ID)
if source_loopback == nil then