summaryrefslogtreecommitdiff
path: root/media-video/wireplumber/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-07 22:48:01 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-07 22:48:01 +0000
commitc3bc61051d7f12b4c682efa7a5460bbc8815649e (patch)
treeb6d19e96ba3c397fb8278eeb9b68170db92630ba /media-video/wireplumber/files
parent3517852e3b8a68d1e997770fc0650c5053bafc6c (diff)
gentoo resync : 07.01.2022
Diffstat (limited to 'media-video/wireplumber/files')
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch81
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch229
2 files changed, 310 insertions, 0 deletions
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
new file mode 100644
index 000000000000..423a1fcb6139
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.5-default-routes.lua-reevaluate-current-profile-only-f.patch
@@ -0,0 +1,81 @@
+https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/22fd4292ab35786b09561508778ab49cc6488dc6
+
+From 22fd4292ab35786b09561508778ab49cc6488dc6 Mon Sep 17 00:00:00 2001
+From: Julian Bouzas <julian.bouzas@collabora.com>
+Date: Tue, 7 Dec 2021 14:10:32 -0500
+Subject: [PATCH] default-routes.lua: reevaluate current profile only for its
+ own routes
+
+Only check the current active profile when some routes changed that are part of
+the profile. If some other route changed, just ignore it.
+---
+ src/scripts/default-routes.lua | 39 +++++++++++++++++++---------------
+ 1 file changed, 22 insertions(+), 17 deletions(-)
+
+diff --git a/src/scripts/default-routes.lua b/src/scripts/default-routes.lua
+index 1840989f..953cba33 100644
+--- a/src/scripts/default-routes.lua
++++ b/src/scripts/default-routes.lua
+@@ -352,6 +352,12 @@ function handleDevice(device)
+ local dev_info = dev_infos[device["bound-id"]]
+ local new_route_infos = {}
+ local avail_routes_changed = false
++ local profile = nil
++
++ -- get current profile
++ for p in device:iterate_params("Profile") do
++ profile = parseParam(p, "Profile")
++ end
+
+ -- look at all the routes and update/reset cached information
+ for p in device:iterate_params("EnumRoute") do
+@@ -370,7 +376,9 @@ function handleDevice(device)
+ Log.info(device, "route " .. route.name .. " available changed " ..
+ route_info.available .. " -> " .. route.available)
+ route_info.available = route.available
+- avail_routes_changed = true
++ if profile and arrayContains(route.profiles, profile.index) then
++ avail_routes_changed = true
++ end
+ end
+ route_info.prev_active = route_info.active
+ route_info.active = false
+@@ -419,23 +427,20 @@ function handleDevice(device)
+ ::skip_route::
+ end
+
+- -- now get the profile and restore routes for it
+- for p in device:iterate_params("Profile") do
+- local profile = parseParam(p, "Profile")
+- if profile then
+- local profile_changed = (dev_info.active_profile ~= profile.index)
+-
+- -- if the profile changed, restore routes for that profile
+- -- if any of the routes of the current profile changed in availability,
+- -- then try to select a new "best" route for each device and ignore
+- -- what was stored
+- if profile_changed or avail_routes_changed then
+- dev_info.active_profile = profile.index
+- restoreProfileRoutes(device, dev_info, profile, profile_changed)
+- end
+-
+- saveProfile(dev_info, profile.name)
++ -- restore routes for profile
++ if profile then
++ local profile_changed = (dev_info.active_profile ~= profile.index)
++
++ -- if the profile changed, restore routes for that profile
++ -- if any of the routes of the current profile changed in availability,
++ -- then try to select a new "best" route for each device and ignore
++ -- what was stored
++ if profile_changed or avail_routes_changed then
++ dev_info.active_profile = profile.index
++ restoreProfileRoutes(device, dev_info, profile, profile_changed)
+ end
++
++ saveProfile(dev_info, profile.name)
+ end
+ end
+
+--
+GitLab
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
new file mode 100644
index 000000000000..9b8bba93a8ab
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.6-endianness-fixes.patch
@@ -0,0 +1,229 @@
+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 */