Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
Date: Thu, 06 Jan 2022 20:53:43
Message-Id: 1641502411.26754e7d4280639fb756a8340e0de7d29b8de78a.sam@gentoo
1 commit: 26754e7d4280639fb756a8340e0de7d29b8de78a
2 Author: Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
3 AuthorDate: Tue Jan 4 06:38:20 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 6 20:53:31 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26754e7d
7
8 media-video/wireplumber: add fix to stop stream move on HDMI suspend
9
10 The patch looks like it might fix other things too but the best known
11 issue it should be resolving is that without it having a display
12 suspend or enter power off state would make audio streams be moved
13 to the next highest priority device. Such behavior might be
14 PulseAudio default but for PipeWire it's considered undesirable and
15 a bug to fix.
16
17 Bug: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/94
18
19 Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
20 Signed-off-by: Sam James <sam <AT> gentoo.org>
21
22 ...tes.lua-reevaluate-current-profile-only-f.patch | 81 ++++++++++++++++++++++
23 ...0.4.5-r3.ebuild => wireplumber-0.4.5-r4.ebuild} | 1 +
24 2 files changed, 82 insertions(+)
25
26 diff --git a/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch b/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch
27 new file mode 100644
28 index 000000000000..423a1fcb6139
29 --- /dev/null
30 +++ b/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch
31 @@ -0,0 +1,81 @@
32 +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/22fd4292ab35786b09561508778ab49cc6488dc6
33 +
34 +From 22fd4292ab35786b09561508778ab49cc6488dc6 Mon Sep 17 00:00:00 2001
35 +From: Julian Bouzas <julian.bouzas@×××××××××.com>
36 +Date: Tue, 7 Dec 2021 14:10:32 -0500
37 +Subject: [PATCH] default-routes.lua: reevaluate current profile only for its
38 + own routes
39 +
40 +Only check the current active profile when some routes changed that are part of
41 +the profile. If some other route changed, just ignore it.
42 +---
43 + src/scripts/default-routes.lua | 39 +++++++++++++++++++---------------
44 + 1 file changed, 22 insertions(+), 17 deletions(-)
45 +
46 +diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua
47 +index 1840989f..953cba33 100644
48 +--- a/src/scripts/default-routes.lua
49 ++++ b/src/scripts/default-routes.lua
50 +@@ -352,6 +352,12 @@ function handleDevice(device)
51 + local dev_info = dev_infos[device["bound-id"]]
52 + local new_route_infos = {}
53 + local avail_routes_changed = false
54 ++ local profile = nil
55 ++
56 ++ -- get current profile
57 ++ for p in device:iterate_params("Profile") do
58 ++ profile = parseParam(p, "Profile")
59 ++ end
60 +
61 + -- look at all the routes and update/reset cached information
62 + for p in device:iterate_params("EnumRoute") do
63 +@@ -370,7 +376,9 @@ function handleDevice(device)
64 + Log.info(device, "route " .. route.name .. " available changed " ..
65 + route_info.available .. " -> " .. route.available)
66 + route_info.available = route.available
67 +- avail_routes_changed = true
68 ++ if profile and arrayContains(route.profiles, profile.index) then
69 ++ avail_routes_changed = true
70 ++ end
71 + end
72 + route_info.prev_active = route_info.active
73 + route_info.active = false
74 +@@ -419,23 +427,20 @@ function handleDevice(device)
75 + ::skip_route::
76 + end
77 +
78 +- -- now get the profile and restore routes for it
79 +- for p in device:iterate_params("Profile") do
80 +- local profile = parseParam(p, "Profile")
81 +- if profile then
82 +- local profile_changed = (dev_info.active_profile ~= profile.index)
83 +-
84 +- -- if the profile changed, restore routes for that profile
85 +- -- if any of the routes of the current profile changed in availability,
86 +- -- then try to select a new "best" route for each device and ignore
87 +- -- what was stored
88 +- if profile_changed or avail_routes_changed then
89 +- dev_info.active_profile = profile.index
90 +- restoreProfileRoutes(device, dev_info, profile, profile_changed)
91 +- end
92 +-
93 +- saveProfile(dev_info, profile.name)
94 ++ -- restore routes for profile
95 ++ if profile then
96 ++ local profile_changed = (dev_info.active_profile ~= profile.index)
97 ++
98 ++ -- if the profile changed, restore routes for that profile
99 ++ -- if any of the routes of the current profile changed in availability,
100 ++ -- then try to select a new "best" route for each device and ignore
101 ++ -- what was stored
102 ++ if profile_changed or avail_routes_changed then
103 ++ dev_info.active_profile = profile.index
104 ++ restoreProfileRoutes(device, dev_info, profile, profile_changed)
105 + end
106 ++
107 ++ saveProfile(dev_info, profile.name)
108 + end
109 + end
110 +
111 +--
112 +GitLab
113
114 diff --git a/media-video/wireplumber/wireplumber-0.4.5-r3.ebuild b/media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
115 similarity index 97%
116 rename from media-video/wireplumber/wireplumber-0.4.5-r3.ebuild
117 rename to media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
118 index e39673240df7..faf7c563e19f 100644
119 --- a/media-video/wireplumber/wireplumber-0.4.5-r3.ebuild
120 +++ b/media-video/wireplumber/wireplumber-0.4.5-r4.ebuild
121 @@ -64,6 +64,7 @@ PATCHES=(
122 "${FILESDIR}"/${P}-lib-don-t-read-hidden-files-from-the-config-director.patch
123 "${FILESDIR}"/${P}-alsa-handle-the-release-requested-signal.patch
124 "${FILESDIR}"/${P}-access-config-add-restricted-access-permissions.patch
125 + "${FILESDIR}"/${P}-default-routes.lua-reevaluate-current-profile-only-f.patch
126 "${WORKDIR}"/${P}-endianness-fixes.patch
127 )