From b4fc0d073dfc62c9ac182daf1be957740d3aa136 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 4 Jun 2025 04:04:24 +0100 Subject: [PATCH] media-video/pipewire: backport 5.1 channels fix to 1.4.4-r1 Signed-off-by: Sam James --- .../files/1.4.4/0001-adapter-default.patch | 58 +++++++++++++++++++ ...-1.4.4.ebuild => pipewire-1.4.4-r1.ebuild} | 0 2 files changed, 58 insertions(+) create mode 100644 media-video/pipewire/files/1.4.4/0001-adapter-default.patch rename media-video/pipewire/{pipewire-1.4.4.ebuild => pipewire-1.4.4-r1.ebuild} (100%) diff --git a/media-video/pipewire/files/1.4.4/0001-adapter-default.patch b/media-video/pipewire/files/1.4.4/0001-adapter-default.patch new file mode 100644 index 0000000000000..2bc5daca71f2f --- /dev/null +++ b/media-video/pipewire/files/1.4.4/0001-adapter-default.patch @@ -0,0 +1,58 @@ +https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4722#note_2940847 +https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/889d069b4630ec6aa1e0f098ae575d8d625af2da + +From 889d069b4630ec6aa1e0f098ae575d8d625af2da Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 3 Jun 2025 10:50:10 +0200 +Subject: [PATCH] adapter: use the right default when filtering default + +Before fixating the format, we try to add as many of the PortConfig +fields as we can as defaults. However, when we already have a property +that intersects, prefer to use the original negotiated one prefered by +the follower. + +This got changed when the default for the pod filter changed to the +filter value. + +The effect is, for example, when the follower asks for FL FR FC LFE SL +SR and the sink is using FL FR SL SR FC LFE, the PortConfig (and the +default) would then be FL FR SL SR FC LFE. After negotiation, we would +get FL FR FC LFE SL SR as the format but then with the filter and the +wrong default we would fixate to FL FR SL SR FC LFE, which does not +match what the follower wanted and either results in wrong channels +or an error of the follower. + +See #4722 +--- + spa/plugins/audioconvert/audioadapter.c | 2 +- + spa/plugins/videoconvert/videoadapter.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c +index 95ec85e0dd..2e42b6f432 100644 +--- a/spa/plugins/audioconvert/audioadapter.c ++++ b/spa/plugins/audioconvert/audioadapter.c +@@ -904,7 +904,7 @@ static struct spa_pod *merge_objects(struct impl *this, struct spa_pod_builder * + p2 = spa_pod_object_find_prop(o2, p2, p1->key); + if (p2 != NULL) { + spa_pod_builder_get_state(b, &state); +- res = spa_pod_filter_prop(b, p1, p2); ++ res = spa_pod_filter_prop(b, p2, p1); + if (res < 0) + spa_pod_builder_reset(b, &state); + } +diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c +index 5111b93801..5b101ff3d9 100644 +--- a/spa/plugins/videoconvert/videoadapter.c ++++ b/spa/plugins/videoconvert/videoadapter.c +@@ -871,7 +871,7 @@ static struct spa_pod *merge_objects(struct impl *this, struct spa_pod_builder * + p2 = spa_pod_object_find_prop(o2, p2, p1->key); + if (p2 != NULL) { + spa_pod_builder_get_state(b, &state); +- res = spa_pod_filter_prop(b, p1, p2); ++ res = spa_pod_filter_prop(b, p2, p1); + if (res < 0) + spa_pod_builder_reset(b, &state); + } +-- +GitLab diff --git a/media-video/pipewire/pipewire-1.4.4.ebuild b/media-video/pipewire/pipewire-1.4.4-r1.ebuild similarity index 100% rename from media-video/pipewire/pipewire-1.4.4.ebuild rename to media-video/pipewire/pipewire-1.4.4-r1.ebuild