summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/wireplumber/wireplumber/0004-policy-endpoint-device-Fix-endpoints-not-connected-w.patch
blob: be1e0a52795883451beb7c18d48bae96ba6e7bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 61dcf8b203f26a7c25ffaccdfdd94c233c0440e9 Mon Sep 17 00:00:00 2001
From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
Date: Wed, 2 Mar 2022 06:55:37 +0530
Subject: [PATCH] policy-endpoint-device: Fix endpoints not connected with
 devices

-if device linkables are created ahead of the endpoints,
 endpoints are not connected with the devices.

-rescan the endpoints on an endpoint creation.
---
 src/scripts/policy-endpoint-device.lua | 4 ++++
 1 file changed, 4 insertions(+)

 Upstream-Status: Submitted [https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/337]

diff --git a/src/scripts/policy-endpoint-device.lua b/src/scripts/policy-endpoint-device.lua
index c9c6ceb..0ba39b0 100644
--- a/src/scripts/policy-endpoint-device.lua
+++ b/src/scripts/policy-endpoint-device.lua
@@ -221,6 +221,10 @@ linkables_om:connect("objects-changed", function (om)
   scheduleRescan ()
 end)
 
+endpoints_om:connect("object-added", function (om)
+  scheduleRescan ()
+end)
+
 linkables_om:connect("object-removed", function (om, si)
   unhandleLinkable (si)
 end)
-- 
2.35.1