summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>2022-01-07 22:54:44 +0200
committerSam James <sam@gentoo.org>2022-01-09 07:56:39 +0000
commit39651aab61fdc7770b13aaf18edee284c54a8818 (patch)
tree0bdc2d72d7788bf111184048648ee103425537a7 /media-video
parentnet-analyzer/tcpslice: add 1.5 (diff)
downloadgentoo-39651aab61fdc7770b13aaf18edee284c54a8818.tar.gz
gentoo-39651aab61fdc7770b13aaf18edee284c54a8818.tar.bz2
gentoo-39651aab61fdc7770b13aaf18edee284c54a8818.zip
media-video/wireplumber: bump to 0.4.6-r1 for two patches
Turns out the current BE fix was a WIP patch which was, apparently superseded by an entirely different patch fixing the same issue. Additionally include a recently upstreamed fix for random PA client delays on device rescan and a few minor fixes which have no associated upstream issue but look like they'd be good idea to have. Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> Closes: https://github.com/gentoo/gentoo/pull/23690 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch229
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch48
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch27
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch50
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch40
-rw-r--r--media-video/wireplumber/wireplumber-0.4.6-r1.ebuild (renamed from media-video/wireplumber/wireplumber-0.4.6.ebuild)5
6 files changed, 169 insertions, 230 deletions
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch b/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch
deleted file mode 100644
index 9b8bba93a8ab..000000000000
--- a/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch
+++ /dev/null
@@ -1,229 +0,0 @@
-Bunch of patches from https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/49
-Requires pipewire 0.3.42 for 03f0a7c9bac3e61126fc852e543b8ea254471eb7.
-
---- a/tests/wp/spa-pod.c
-+++ b/tests/wp/spa-pod.c
-@@ -6,6 +6,8 @@
- * SPDX-License-Identifier: MIT
- */
-
-+#include <stdbool.h>
-+
- #include <wp/wp.h>
-
- static void
-@@ -428,12 +430,12 @@ test_spa_pod_object (void)
- wp_spa_type_name (wp_spa_pod_get_spa_type (pod)));
-
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
- float vol = 0.0;
- gint32 frequency;
- const char *device;
- gint64 device_fd;
-- gboolean custom = FALSE;
-+ bool custom = false;
- g_assert_true (wp_spa_pod_get_object (pod,
- &id_name,
- "mute", "b", &mute,
-@@ -475,12 +477,12 @@ test_spa_pod_object (void)
- wp_spa_type_name (wp_spa_pod_get_spa_type (pod)));
-
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
- float vol = 0.0;
- gint32 frequency;
- const char *device;
- gint64 device_fd;
-- gboolean custom = FALSE;
-+ bool custom = false;
- g_autoptr (WpSpaPodParser) p = wp_spa_pod_parser_new_object (pod, &id_name);
- g_assert_nonnull (pod);
- g_assert_true (wp_spa_pod_parser_get (p, "mute", "b", &mute, NULL));
-@@ -603,7 +605,7 @@ test_spa_pod_struct (void)
- g_assert_true (wp_spa_pod_parser_get (p, "P", &value_object, NULL));
- g_assert_nonnull (value_object);
- const char *id_name;
-- gboolean mute = TRUE;
-+ bool mute = true;
-
- g_assert_true (wp_spa_pod_get_object (value_object,
- &id_name,
---- a/tests/wp/endpoint.c
-+++ b/tests/wp/endpoint.c
-@@ -499,7 +499,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -513,7 +513,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 1.0f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
-
- /* setup change signals */
-@@ -541,7 +541,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -556,14 +556,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -577,14 +577,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -598,7 +598,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, FALSE);
-+ g_assert_cmpint (boolean_value, ==, false);
- }
-
- /* change control on the impl */
-@@ -618,7 +618,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -633,14 +633,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -654,14 +654,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -675,7 +675,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.7f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
-
- /* change control on the node */
-@@ -695,7 +695,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->proxy_endpoint), "Props", NULL);
-@@ -709,14 +709,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (fixture->impl_endpoint), "Props", NULL);
-@@ -730,14 +730,14 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
- {
- g_autoptr (WpIterator) iterator = NULL;
- g_auto (GValue) item = G_VALUE_INIT;
- g_autoptr (WpSpaPod) pod = NULL;
- gfloat float_value = 0.0f;
-- gboolean boolean_value = TRUE;
-+ bool boolean_value = true;
-
- iterator = wp_pipewire_object_enum_params_sync (
- WP_PIPEWIRE_OBJECT (endpoint->node), "Props", NULL);
-@@ -751,7 +751,7 @@ test_endpoint_with_props (TestEndpointFixture *fixture, gconstpointer data)
- "mute", "b", &boolean_value,
- NULL));
- g_assert_cmpfloat_with_epsilon (float_value, 0.2f, 0.001);
-- g_assert_cmpint (boolean_value, ==, TRUE);
-+ g_assert_cmpint (boolean_value, ==, true);
- }
-
- /* destroy impl endpoint */
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch
new file mode 100644
index 000000000000..0cedea4ac6be
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch
@@ -0,0 +1,48 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/bee9827ae376b75feceea926b0afc727fecca51b
+
+From bee9827ae376b75feceea926b0afc727fecca51b Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Fri, 7 Jan 2022 15:35:10 -0500
+Subject: [PATCH] policy-node: find best linkable if default one cannot be
+ linked
+
+Fixes issue with echo cancellation pipewire module.
+---
+ src/scripts/policy-node.lua | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index c273c1fe..9df50072 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -477,13 +477,22 @@ function findBestLinkable (si)
+ end
+
+ function findUndefinedTarget (si)
+- -- Find the default linkable if the default nodes module is loaded, otherwise
+- -- just find the best linkable based on priority and routes
+- if default_nodes ~= nil then
+- return findDefaultlinkable (si)
+- else
++ -- Just find the best linkable if default nodes module is not loaded
++ if default_nodes == nil then
+ return findBestLinkable (si)
+ end
++
++ -- Otherwise find the default linkable. If the default linkabke cannot link,
++ -- we find the best one instead. We return nil if default does not exist.
++ local si_target, can_passthrough = findDefaultlinkable (si)
++ if si_target then
++ if canLink (si.properties, si_target) then
++ return si_target, can_passthrough
++ else
++ return findBestLinkable (si)
++ end
++ end
++ return nil, nil
+ end
+
+ function lookupLink (si_id, si_target_id)
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch
new file mode 100644
index 000000000000..f18920c475a8
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch
@@ -0,0 +1,27 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/23fc4d21a9cfad492f8d3a367e438115197dff4a
+
+From 23fc4d21a9cfad492f8d3a367e438115197dff4a Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Fri, 7 Jan 2022 10:12:04 -0500
+Subject: [PATCH] policy-node: fix typo when finding best target
+
+---
+ src/scripts/policy-node.lua | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index 0d716c1c..8ca5a695 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -482,7 +482,7 @@ function findUndefinedTarget (si)
+ if default_nodes ~= nil then
+ return findDefaultlinkable (si)
+ else
+- return findBestlinkable (si)
++ return findBestLinkable (si)
+ end
+ end
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch
new file mode 100644
index 000000000000..28b5a5ea22a4
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch
@@ -0,0 +1,50 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/afe71d7e48c28b0ae5cbd9327433e3c55c103fcb
+
+From afe71d7e48c28b0ae5cbd9327433e3c55c103fcb Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Thu, 6 Jan 2022 10:53:38 -0500
+Subject: [PATCH] policy-node: schedule a rescan without timeout if defined
+ target is not found
+
+Fixes #146
+---
+ src/scripts/policy-node.lua | 17 ++++-------------
+ 1 file changed, 4 insertions(+), 13 deletions(-)
+
+diff --git a/src/scripts/policy-node.lua b/src/scripts/policy-node.lua
+index 8ca5a695..c273c1fe 100644
+--- a/src/scripts/policy-node.lua
++++ b/src/scripts/policy-node.lua
+@@ -552,25 +552,16 @@ function handleLinkable (si)
+ si_target = nil
+ end
+
+- -- wait up to 2 seconds for the requested target to become available
+- -- this is because the client may have already "seen" a target that we haven't
+- -- yet prepared, which leads to a race condition
++ -- if the client has seen a target that we haven't yet prepared, schedule
++ -- a rescan one more time and hope for the best
+ local si_id = si.id
+ if si_props["node.target"] and si_props["node.target"] ~= "-1"
+ and not si_target
+ and not si_flags[si_id].was_handled
+ and not si_flags[si_id].done_waiting then
+- if not si_flags[si_id].timeout_source then
+- si_flags[si_id].timeout_source = Core.timeout_add(2000, function()
+- if si_flags[si_id] then
+- si_flags[si_id].done_waiting = true
+- si_flags[si_id].timeout_source = nil
+- scheduleRescan()
+- end
+- return false
+- end)
+- end
+ Log.info (si, "... waiting for target")
++ si_flags[si_id].done_waiting = true
++ scheduleRescan()
+ return
+ end
+
+--
+GitLab
+
diff --git a/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch b/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch
new file mode 100644
index 000000000000..b11a2f6f70f6
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch
@@ -0,0 +1,40 @@
+https://gitlab.freedesktop.org/julian/wireplumber/-/commit/5afd176698aee835c8812eb7944ba12da53ffeab
+
+From 5afd176698aee835c8812eb7944ba12da53ffeab Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Mon, 13 Dec 2021 12:01:52 -0500
+Subject: [PATCH] spa-pod: fix different architecture errors for boolean values
+
+---
+ lib/wp/spa-pod.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/lib/wp/spa-pod.c b/lib/wp/spa-pod.c
+index c1c22572..bd7b8876 100644
+--- a/lib/wp/spa-pod.c
++++ b/lib/wp/spa-pod.c
+@@ -2332,6 +2332,10 @@ wp_spa_pod_builder_add_valist (WpSpaPodBuilder *self, va_list args)
+ }
+ break;
+ }
++ case 'b':
++ spa_pod_builder_bool(&self->builder,
++ va_arg(args, gboolean) ? true : false);
++ break;
+ default:
+ SPA_POD_BUILDER_COLLECT(&self->builder, *format, args);
+ break;
+@@ -2778,6 +2782,10 @@ wp_spa_pod_parser_get_valist (WpSpaPodParser *self, va_list args)
+ }
+ break;
+ }
++ case 'b':
++ *va_arg(args, gboolean*) =
++ SPA_POD_VALUE(struct spa_pod_bool, pod) ? TRUE : FALSE;
++ break;
+ default:
+ SPA_POD_PARSER_COLLECT (pod, *format, args);
+ break;
+--
+GitLab
+
diff --git a/media-video/wireplumber/wireplumber-0.4.6.ebuild b/media-video/wireplumber/wireplumber-0.4.6-r1.ebuild
index 92ffe0cec0a2..16b0e2144871 100644
--- a/media-video/wireplumber/wireplumber-0.4.6.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.6-r1.ebuild
@@ -55,7 +55,10 @@ RDEPEND="${DEPEND}"
DOCS=( {NEWS,README}.rst )
PATCHES=(
- "${FILESDIR}"/${P}-endianness-fixes.patch
+ "${FILESDIR}"/${P}-policy-node-fix-typo-when-finding-best-target.patch
+ "${FILESDIR}"/${P}-policy-node-schedule-a-rescan-without-timeout-if-def.patch
+ "${FILESDIR}"/${P}-policy-node-find-best-linkable-if-default-one-cannot.patch
+ "${FILESDIR}"/${P}-spa-pod-fix-different-architecture-errors-for-boolea.patch
)
src_configure() {