From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1356421-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E39F7158086
	for <garchives@archives.gentoo.org>; Sun,  9 Jan 2022 07:56:55 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0D98C2BC009;
	Sun,  9 Jan 2022 07:56:55 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C581C2BC009
	for <gentoo-commits@lists.gentoo.org>; Sun,  9 Jan 2022 07:56:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 67228342A8A
	for <gentoo-commits@lists.gentoo.org>; Sun,  9 Jan 2022 07:56:53 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C3F1E21E
	for <gentoo-commits@lists.gentoo.org>; Sun,  9 Jan 2022 07:56:51 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1641714999.39651aab61fdc7770b13aaf18edee284c54a8818.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/wireplumber/files/, media-video/wireplumber/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch media-video/wireplumber/files/wireplumber-0.4.6-policy-node-find-best-linkable-if-default-one-cannot.patch media-video/wireplumber/files/wireplumber-0.4.6-policy-node-fix-typo-when-finding-best-target.patch media-video/wireplumber/files/wireplumber-0.4.6-policy-node-schedule-a-rescan-without-timeout-if-def.patch media-video/wireplumber/files/wireplumber-0.4.6-spa-pod-fix-different-architecture-errors-for-boolea.patch media-video/wireplumber/wireplumber-0.4.6-r1.ebuild media-video/wireplumber/wireplumber-0.4.6.ebuild
X-VCS-Directories: media-video/wireplumber/files/ media-video/wireplumber/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 39651aab61fdc7770b13aaf18edee284c54a8818
X-VCS-Branch: master
Date: Sun,  9 Jan 2022 07:56:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 47e8e64b-96af-40a5-a59e-3532bee048a7
X-Archives-Hash: bf27144e89a80e15ad7c5eb5049a4f88

commit:     39651aab61fdc7770b13aaf18edee284c54a8818
Author:     Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Fri Jan  7 20:54:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  9 07:56:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39651aab

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 <AT> relay.firefox.com>
Closes: https://github.com/gentoo/gentoo/pull/23690
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/wireplumber-0.4.6-endianness-fixes.patch | 229 ---------------------
 ...-find-best-linkable-if-default-one-cannot.patch |  48 +++++
 ...cy-node-fix-typo-when-finding-best-target.patch |  27 +++
 ...-schedule-a-rescan-without-timeout-if-def.patch |  50 +++++
 ...-different-architecture-errors-for-boolea.patch |  40 ++++
 ...er-0.4.6.ebuild => wireplumber-0.4.6-r1.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
similarity index 89%
rename from media-video/wireplumber/wireplumber-0.4.6.ebuild
rename to 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() {