meta-core/recipes-graphics/mesa: Backport a fix from 22.2.5
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber / 0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch
1 From 61dcf8b203f26a7c25ffaccdfdd94c233c0440e9 Mon Sep 17 00:00:00 2001
2 From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
3 Date: Wed, 2 Mar 2022 06:55:37 +0530
4 Subject: [PATCH] policy-endpoint-device: Fix endpoints not connected with
5  devices
6
7 -if device linkables are created ahead of the endpoints,
8  endpoints are not connected with the devices.
9
10 -rescan the endpoints on an endpoint creation.
11 ---
12  src/scripts/policy-endpoint-device.lua | 4 ++++
13  1 file changed, 4 insertions(+)
14
15  Upstream-Status: Submitted [https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/337]
16
17 diff --git a/src/scripts/policy-endpoint-device.lua b/src/scripts/policy-endpoint-device.lua
18 index c9c6ceb..0ba39b0 100644
19 --- a/src/scripts/policy-endpoint-device.lua
20 +++ b/src/scripts/policy-endpoint-device.lua
21 @@ -221,6 +221,10 @@ linkables_om:connect("objects-changed", function (om)
22    scheduleRescan ()
23  end)
24  
25 +endpoints_om:connect("object-added", function (om)
26 +  scheduleRescan ()
27 +end)
28 +
29  linkables_om:connect("object-removed", function (om, si)
30    unhandleLinkable (si)
31  end)
32 -- 
33 2.35.1
34