diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-01-16 20:27:28 +0000 |
commit | 2fd57282f0262ca084e05b0f2c63fbada395d02b (patch) | |
tree | 4e0f23cea9ce9fd972e70ebc5214bf36fed465cc /media-video/wireplumber/files | |
parent | c3bc61051d7f12b4c682efa7a5460bbc8815649e (diff) |
gentoo resync : 16.01.2021
Diffstat (limited to 'media-video/wireplumber/files')
6 files changed, 216 insertions, 229 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/files/wireplumber-0.4.7-default-nodes-handle-nodes-without-Routes.patch b/media-video/wireplumber/files/wireplumber-0.4.7-default-nodes-handle-nodes-without-Routes.patch new file mode 100644 index 000000000000..3451ea73f74b --- /dev/null +++ b/media-video/wireplumber/files/wireplumber-0.4.7-default-nodes-handle-nodes-without-Routes.patch @@ -0,0 +1,51 @@ +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/211f1e6b6cd4898121e4c2b821fae4dea6cc3317 +https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/163 + +From 211f1e6b6cd4898121e4c2b821fae4dea6cc3317 Mon Sep 17 00:00:00 2001 +From: Wim Taymans <wtaymans@redhat.com> +Date: Fri, 14 Jan 2022 16:28:48 +0100 +Subject: [PATCH] default-nodes: handle nodes without Routes + +When a node has not part of any EnumRoute, we must assume it is +available. + +Fixes selection of Pro Audio nodes as default nodes. +--- + modules/module-default-nodes.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c +index 32b2725b..15aadeaa 100644 +--- a/modules/module-default-nodes.c ++++ b/modules/module-default-nodes.c +@@ -108,6 +108,7 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + gint dev_id = dev_id_str ? atoi (dev_id_str) : -1; + gint cpd = cpd_str ? atoi (cpd_str) : -1; + g_autoptr (WpDevice) device = NULL; ++ gint found = 0; + + if (dev_id == -1 || cpd == -1) + return TRUE; +@@ -168,6 +169,7 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + for (; wp_iterator_next (it, &v); g_value_unset (&v)) { + gint32 *d = (gint32 *)g_value_get_pointer (&v); + if (d && *d == cpd) { ++ found++; + if (route_avail != SPA_PARAM_AVAILABILITY_no) + return TRUE; + } +@@ -175,6 +177,10 @@ node_has_available_routes (WpDefaultNodes * self, WpNode *node) + } + } + } ++ /* The node is part of a profile without routes so we assume it ++ * is available. This can happen for Pro Audio profiles */ ++ if (found == 0) ++ return TRUE; + + return FALSE; + } +-- +GitLab + +https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/211f1e6b6cd4898121e4c2b821fae4dea6cc3317 |