From e4f628e84d935e16b785eaad0f3313dadd2d224d28c4604c49f25aef15ecbcb3 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Fri, 25 Aug 2023 09:41:45 +0000 Subject: [PATCH] Accepting request 1105883 from home:alarrosa:branches:multimedia:libs - Update to version 0.3.78: * Highlights - An old regression was fixed with where some nodes would not run. - A regression was fixed where removed events would not be shown in some cases. This would result in duplicate entries in audio clients. - Fix an off-by-one in the vban audio receiver. Tweak the rate adaption a little. - ACP will now set a UCM verb before probing the pro-audio devices. - More bugfixes and improvements. * PipeWire - An old regression was fixed with where some nodes would not run. (#3405) - Suspend was improved a little to avoid races when the session manager would suspend right when a driver was starting. * Modules - module-rtp-sap does not use the deprecated inet_aton anymore. - Fix an off-by-one in the vban audio receiver. Tweak the rate adaption a little. (#3380) * SPA - ACP will now set a UCM verb before probing the pro-audio devices. (#3407) - The mandatory flag will be set now on the video modifiers. - EVL was updated to Xenomai4 r46 and xbuf creation was improved. - An option was added to force colors in the log even when logging to !tty. - The return type of spa_pod_builder_control() was fixed. OBS-URL: https://build.opensuse.org/request/show/1105883 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=150 --- ...dioconvert-fix-typo-in-neon-function.patch | 28 +++++ 0001-bluez5-fix-BAP-profiles-showing.patch | 36 ++++++ ...ng-runnable-when-meeting-the-driving.patch | 117 ------------------ ...-crash-when-stopping-device-provider.patch | 38 ------ 0001-impl-node-improve-suspend.patch | 44 +++++++ ...ure-we-can-always-find-our-own-ports.patch | 42 +++++++ ...ible-when-the-registration-is-queued.patch | 54 -------- ...-all-change_mask-flags-when-removing.patch | 32 ----- ...de.always-process-=-false-jack-nodes.patch | 44 ------- _service | 2 +- pipewire-0.3.77.obscpio | 3 - pipewire-0.3.78.obscpio | 3 + pipewire.changes | 66 ++++++++++ pipewire.obsinfo | 6 +- pipewire.spec | 12 +- 15 files changed, 228 insertions(+), 299 deletions(-) create mode 100644 0001-audioconvert-fix-typo-in-neon-function.patch create mode 100644 0001-bluez5-fix-BAP-profiles-showing.patch delete mode 100644 0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch delete mode 100644 0001-gst-Prevent-a-crash-when-stopping-device-provider.patch create mode 100644 0001-impl-node-improve-suspend.patch create mode 100644 0001-jack-make-sure-we-can-always-find-our-own-ports.patch delete mode 100644 0001-jack-ports-become-visible-when-the-registration-is-queued.patch delete mode 100644 0001-pulse-server-set-all-change_mask-flags-when-removing.patch delete mode 100644 0002-jack-handle-node.always-process-=-false-jack-nodes.patch delete mode 100644 pipewire-0.3.77.obscpio create mode 100644 pipewire-0.3.78.obscpio diff --git a/0001-audioconvert-fix-typo-in-neon-function.patch b/0001-audioconvert-fix-typo-in-neon-function.patch new file mode 100644 index 0000000..8dac3e2 --- /dev/null +++ b/0001-audioconvert-fix-typo-in-neon-function.patch @@ -0,0 +1,28 @@ +From b54f7fe90dd16b0f7a7e1e5bb1ef921212236029 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 24 Aug 2023 13:44:10 +0200 +Subject: [PATCH] audioconvert: fix typo in neon function + +Thanks to Shengjiu Wang + +fixes #3463 +--- + spa/plugins/audioconvert/fmt-ops-neon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/spa/plugins/audioconvert/fmt-ops-neon.c b/spa/plugins/audioconvert/fmt-ops-neon.c +index 0006456fc4..55be55fa58 100644 +--- a/spa/plugins/audioconvert/fmt-ops-neon.c ++++ b/spa/plugins/audioconvert/fmt-ops-neon.c +@@ -294,7 +294,7 @@ conv_f32d_to_s16_2s_neon(void *data, void * SPA_RESTRICT dst, const void * SPA_R + " beq 4f\n" + "3:" + " ld1 { v0.s }[0], [%[s0]], #4\n" +- " ld1 { v2.s }[0], [%[s1]], #4\n" ++ " ld1 { v1.s }[0], [%[s1]], #4\n" + " subs %[remainder], %[remainder], #1\n" + " sqadd v0.4s, v0.4s, v2.4s\n" + " sqadd v1.4s, v1.4s, v2.4s\n" +-- +GitLab + diff --git a/0001-bluez5-fix-BAP-profiles-showing.patch b/0001-bluez5-fix-BAP-profiles-showing.patch new file mode 100644 index 0000000..92524b8 --- /dev/null +++ b/0001-bluez5-fix-BAP-profiles-showing.patch @@ -0,0 +1,36 @@ +From dbd97020da06450366dca7020eeb62afcd135d83 Mon Sep 17 00:00:00 2001 +From: Pauli Virtanen +Date: Tue, 22 Aug 2023 21:59:52 +0300 +Subject: [PATCH] bluez5: fix BAP profiles showing + +Now that we only show codec profiles, the logic that showed codecless +profile for BAP has to be removed. + +This fixes BAP only showing off profile. +--- + spa/plugins/bluez5/bluez5-device.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/spa/plugins/bluez5/bluez5-device.c b/spa/plugins/bluez5/bluez5-device.c +index 3dec1e0aa..ced1d8dc8 100644 +--- a/spa/plugins/bluez5/bluez5-device.c ++++ b/spa/plugins/bluez5/bluez5-device.c +@@ -1661,15 +1661,6 @@ static struct spa_pod *build_profile(struct impl *this, struct spa_pod_builder * + + name = spa_bt_profile_name(profile); + +- /* If we can't codec switch, emit codecless profile */ +- if (current && !can_bap_codec_switch(this)) { +- codec = 0; +- index = get_index_from_profile(this, profile_index, codec); +- } else if ((codec != 0) != can_bap_codec_switch(this)) { +- errno = -EINVAL; +- return NULL; +- } +- + if (codec) { + media_codec = get_supported_media_codec(this, codec, &idx); + if (media_codec == NULL) { +-- +GitLab + diff --git a/0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch b/0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch deleted file mode 100644 index d9edcfc..0000000 --- a/0001-context-Dont-stop-setting-runnable-when-meeting-the-driving.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 1daae4c369f464c8677696890e2eeb431c0f72a1 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Fri, 4 Aug 2023 17:42:04 +0200 -Subject: [PATCH] context: Don't stop setting runnable when meeting the driving - node - -Start scanning from a non-driving runnable node in one direction and set -all linked intermedia nodes runnable as well. - -This ensure that play -> driving_sink -> effect -> sink also sets the -effect and sink nodes to running. - -Fixes #3405 ---- - src/pipewire/context.c | 60 ++++++++++++++++++++++-------------------- - 1 file changed, 31 insertions(+), 29 deletions(-) - -diff --git a/src/pipewire/context.c b/src/pipewire/context.c -index 8f9745b3f..9d9b629ae 100644 ---- a/src/pipewire/context.c -+++ b/src/pipewire/context.c -@@ -787,44 +787,44 @@ static int ensure_state(struct pw_impl_node *node, bool running) - return pw_impl_node_set_state(node, state); - } - --/* From a node (that is runnable) follow all prepared links and groups to -- * active nodes up to the driver and make them recursively runnable as well. -- * -- * We stop at driver nodes so that other paths linked to the driver will stay -- * unrunnable when no other runnable path exists. -+/* From a node (that is runnable) follow all prepared links in the given direction -+ * and groups to active nodes and make them recursively runnable as well. - */ --static inline int run_nodes(struct pw_context *context, struct pw_impl_node *node, struct spa_list *nodes) -+static inline int run_nodes(struct pw_context *context, struct pw_impl_node *node, -+ struct spa_list *nodes, enum pw_direction direction) - { - struct pw_impl_node *t; - struct pw_impl_port *p; - struct pw_impl_link *l; - -- pw_log_debug("node %p: '%s'", node, node->name); -+ pw_log_debug("node %p: '%s' direction:%s", node, node->name, -+ pw_direction_as_string(direction)); - -- spa_list_for_each(p, &node->input_ports, link) { -- spa_list_for_each(l, &p->links, input_link) { -- t = l->output->node; -+ if (direction == PW_DIRECTION_INPUT) { -+ spa_list_for_each(p, &node->input_ports, link) { -+ spa_list_for_each(l, &p->links, input_link) { -+ t = l->output->node; - -- if (!t->active || !l->prepared || t->runnable) -- continue; -+ if (!t->active || !l->prepared || (!t->driving && t->runnable)) -+ continue; - -- pw_log_debug(" peer %p: '%s'", t, t->name); -- t->runnable = true; -- if (!t->driving) -- run_nodes(context, t, nodes); -+ pw_log_debug(" peer %p: '%s'", t, t->name); -+ t->runnable = true; -+ run_nodes(context, t, nodes, direction); -+ } - } -- } -- spa_list_for_each(p, &node->output_ports, link) { -- spa_list_for_each(l, &p->links, output_link) { -- t = l->input->node; -+ } else { -+ spa_list_for_each(p, &node->output_ports, link) { -+ spa_list_for_each(l, &p->links, output_link) { -+ t = l->input->node; - -- if (!t->active || !l->prepared || t->runnable) -- continue; -+ if (!t->active || !l->prepared || (!t->driving && t->runnable)) -+ continue; - -- pw_log_debug(" peer %p: '%s'", t, t->name); -- t->runnable = true; -- if (!t->driving) -- run_nodes(context, t, nodes); -+ pw_log_debug(" peer %p: '%s'", t, t->name); -+ t->runnable = true; -+ run_nodes(context, t, nodes, direction); -+ } - } - } - /* now go through all the nodes that have the same link group and -@@ -842,7 +842,7 @@ static inline int run_nodes(struct pw_context *context, struct pw_impl_node *nod - pw_log_debug(" group %p: '%s'", t, t->name); - t->runnable = true; - if (!t->driving) -- run_nodes(context, t, nodes); -+ run_nodes(context, t, nodes, direction); - } - } - return 0; -@@ -944,8 +944,10 @@ static int collect_nodes(struct pw_context *context, struct pw_impl_node *node, - pw_log_debug(" next node %p: '%s' runnable:%u", n, n->name, n->runnable); - } - spa_list_for_each(n, collect, sort_link) -- if (!n->driving && n->runnable) -- run_nodes(context, n, collect); -+ if (!n->driving && n->runnable) { -+ run_nodes(context, n, collect, PW_DIRECTION_OUTPUT); -+ run_nodes(context, n, collect, PW_DIRECTION_INPUT); -+ } - - return 0; - } --- -GitLab - diff --git a/0001-gst-Prevent-a-crash-when-stopping-device-provider.patch b/0001-gst-Prevent-a-crash-when-stopping-device-provider.patch deleted file mode 100644 index 4992754..0000000 --- a/0001-gst-Prevent-a-crash-when-stopping-device-provider.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 140374d2071e6204fded4ca65645d4e9a3dd053e Mon Sep 17 00:00:00 2001 -From: Philippe Normand -Date: Fri, 4 Aug 2023 10:01:07 +0100 -Subject: [PATCH] gst: Prevent a crash when stopping device provider - -The provider might fail to connect to the PipeWire core when starting up, so -when stopping we need to check the core is valid before attempting to acquire a -mutex on its loop. ---- - src/gst/gstpipewiredeviceprovider.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/gst/gstpipewiredeviceprovider.c b/src/gst/gstpipewiredeviceprovider.c -index a9d8dd8b2..9f82507b3 100644 ---- a/src/gst/gstpipewiredeviceprovider.c -+++ b/src/gst/gstpipewiredeviceprovider.c -@@ -665,11 +665,16 @@ gst_pipewire_device_provider_stop (GstDeviceProvider * provider) - { - GstPipeWireDeviceProvider *self = GST_PIPEWIRE_DEVICE_PROVIDER (provider); - -- pw_thread_loop_lock (self->core->loop); -+ /* core might be NULL if we failed to connect in _start. */ -+ if (self->core != NULL) { -+ pw_thread_loop_lock (self->core->loop); -+ } - GST_DEBUG_OBJECT (self, "stopping provider"); - - g_clear_pointer ((struct pw_proxy**)&self->registry, pw_proxy_destroy); -- pw_thread_loop_unlock (self->core->loop); -+ if (self->core != NULL) { -+ pw_thread_loop_unlock (self->core->loop); -+ } - g_clear_pointer (&self->core, gst_pipewire_core_release); - } - --- -GitLab - diff --git a/0001-impl-node-improve-suspend.patch b/0001-impl-node-improve-suspend.patch new file mode 100644 index 0000000..da16999 --- /dev/null +++ b/0001-impl-node-improve-suspend.patch @@ -0,0 +1,44 @@ +From 3b052eaa9986c2f5182eb8a1b2f2b5c10be31a12 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 24 Aug 2023 09:50:28 +0200 +Subject: [PATCH] impl-node: improve suspend + +Make sure we can only suspend when the node is (going to) IDLE. We don't +really want to allow applications to suspend a node that is running or +starting up. + +This might fix a race when a node is suspended at the same time it is +started and cause silence. It also fixes the issue of total silence when +doing "pactl suspend 1" on a running node. + +See #3378 +--- + src/pipewire/impl-node.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c +index ca431c389..ff9effedc 100644 +--- a/src/pipewire/impl-node.c ++++ b/src/pipewire/impl-node.c +@@ -591,6 +591,7 @@ static int node_send_command(void *object, const struct spa_command *command) + { + struct resource_data *data = object; + struct pw_impl_node *node = data->node; ++ struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this); + uint32_t id = SPA_NODE_COMMAND_ID(command); + + pw_log_debug("%p: got command %d (%s)", node, id, +@@ -598,7 +599,9 @@ static int node_send_command(void *object, const struct spa_command *command) + + switch (id) { + case SPA_NODE_COMMAND_Suspend: +- suspend_node(node); ++ if (node->info.state == PW_NODE_STATE_ERROR || ++ impl->pending_state == PW_NODE_STATE_IDLE) ++ suspend_node(node); + break; + default: + spa_node_send_command(node->node, command); +-- +GitLab + diff --git a/0001-jack-make-sure-we-can-always-find-our-own-ports.patch b/0001-jack-make-sure-we-can-always-find-our-own-ports.patch new file mode 100644 index 0000000..566a053 --- /dev/null +++ b/0001-jack-make-sure-we-can-always-find-our-own-ports.patch @@ -0,0 +1,42 @@ +From c41c812325ca1b0db1efc2fc06a3c90355be59d9 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 24 Aug 2023 19:28:57 +0200 +Subject: [PATCH] jack: make sure we can always find our own ports + +find_port_by_name() is used to find our own ports before they become +visible so make sure we can always find them. + +Fixes #3485 +--- + pipewire-jack/src/pipewire-jack.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c +index b93422bd3..ff5b6881d 100644 +--- a/pipewire-jack/src/pipewire-jack.c ++++ b/pipewire-jack/src/pipewire-jack.c +@@ -719,12 +719,20 @@ static bool is_port_default(struct client *c, struct object *o) + return false; + } + ++static inline bool client_port_visible(struct client *c, struct object *o) ++{ ++ if (o->port.port != NULL && o->port.port->client == c) ++ return true; ++ return o->visible; ++} ++ + static struct object *find_port_by_name(struct client *c, const char *name) + { + struct object *o; + + spa_list_for_each(o, &c->context.objects, link) { +- if (o->type != INTERFACE_Port || o->removed || !o->visible) ++ if (o->type != INTERFACE_Port || o->removed || ++ (!client_port_visible(c, o))) + continue; + if (spa_streq(o->port.name, name) || + spa_streq(o->port.alias1, name) || +-- +GitLab + diff --git a/0001-jack-ports-become-visible-when-the-registration-is-queued.patch b/0001-jack-ports-become-visible-when-the-registration-is-queued.patch deleted file mode 100644 index 17d1958..0000000 --- a/0001-jack-ports-become-visible-when-the-registration-is-queued.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 31f91ce9f4302cea55244ab741022e40bbd4e716 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Mon, 7 Aug 2023 19:57:01 +0200 -Subject: [PATCH] jack: ports become visible when the registration is queued - -As soon as the port registration is queued (but not yet emited) the port -becomes visible. - -See #3416 ---- - pipewire-jack/src/pipewire-jack.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c -index 3d71f67be..7547d6ffb 100644 ---- a/pipewire-jack/src/pipewire-jack.c -+++ b/pipewire-jack/src/pipewire-jack.c -@@ -171,6 +171,7 @@ struct object { - struct spa_hook proxy_listener; - struct spa_hook object_listener; - int registered; -+ unsigned int visible; - unsigned int removing:1; - unsigned int removed:1; - }; -@@ -723,7 +724,7 @@ static struct object *find_port_by_name(struct client *c, const char *name) - struct object *o; - - spa_list_for_each(o, &c->context.objects, link) { -- if (o->type != INTERFACE_Port || o->removed) -+ if (o->type != INTERFACE_Port || o->removed || !o->visible) - continue; - if (spa_streq(o->port.name, name) || - spa_streq(o->port.alias1, name) || -@@ -1056,6 +1057,7 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1, - break; - case NOTIFY_TYPE_PORTREGISTRATION: - emit = c->portregistration_callback != NULL && o != NULL; -+ o->visible = arg1; - break; - case NOTIFY_TYPE_CONNECT: - emit = c->connect_callback != NULL && o != NULL; -@@ -5989,7 +5991,7 @@ const char ** jack_get_ports (jack_client_t *client, - count = 0; - - spa_list_for_each(o, &c->context.objects, link) { -- if (o->type != INTERFACE_Port || o->removed) -+ if (o->type != INTERFACE_Port || o->removed || !o->visible) - continue; - pw_log_debug("%p: check port type:%d flags:%08lx name:\"%s\"", c, - o->port.type_id, o->port.flags, o->port.name); --- -GitLab - diff --git a/0001-pulse-server-set-all-change_mask-flags-when-removing.patch b/0001-pulse-server-set-all-change_mask-flags-when-removing.patch deleted file mode 100644 index 49338cf..0000000 --- a/0001-pulse-server-set-all-change_mask-flags-when-removing.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 820ca90705ae78124958f1b96de3bdc7889c2d1e Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Tue, 8 Aug 2023 13:01:30 +0200 -Subject: [PATCH] pulse-server: set all change_mask flags when removing - -So that the logic to emit events will select sink and source objects. - -Fixes #3414 ---- - src/modules/module-protocol-pulse/manager.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/modules/module-protocol-pulse/manager.c b/src/modules/module-protocol-pulse/manager.c -index 91594ce62..76517f112 100644 ---- a/src/modules/module-protocol-pulse/manager.c -+++ b/src/modules/module-protocol-pulse/manager.c -@@ -641,9 +641,10 @@ static void registry_event_global_remove(void *data, uint32_t id) - - o->this.removing = true; - -- if (!o->this.creating) -+ if (!o->this.creating) { -+ o->this.change_mask = ~0; - manager_emit_removed(m, &o->this); -- -+ } - object_destroy(o); - } - --- -GitLab - diff --git a/0002-jack-handle-node.always-process-=-false-jack-nodes.patch b/0002-jack-handle-node.always-process-=-false-jack-nodes.patch deleted file mode 100644 index e6d493a..0000000 --- a/0002-jack-handle-node.always-process-=-false-jack-nodes.patch +++ /dev/null @@ -1,44 +0,0 @@ -From cbf97d4b00e8fb9d46eb4c53bf64073871d7ce87 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Mon, 7 Aug 2023 19:58:20 +0200 -Subject: [PATCH] jack: handle node.always-process = false jack nodes - -Node that have the node.always-process = false property do not conform -to the jack API because they will be suspended even when they don't -inactivate themselves. Don't hide the ports for those clients when -inactive. - -Fixes #3416 ---- - pipewire-jack/src/pipewire-jack.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c -index 7547d6ffb..051eb1675 100644 ---- a/pipewire-jack/src/pipewire-jack.c -+++ b/pipewire-jack/src/pipewire-jack.c -@@ -3075,11 +3075,18 @@ static void node_info(void *data, const struct pw_node_info *info) - { - struct object *n = data; - struct client *c = n->client; -+ const char *str; -+ -+ if (info->change_mask & PW_NODE_CHANGE_MASK_PROPS) { -+ str = spa_dict_lookup(info->props, PW_KEY_NODE_ALWAYS_PROCESS); -+ n->node.is_jack = str ? spa_atob(str) : false; -+ } - -- pw_log_info("DSP node %d state change %s", info->id, -- pw_node_state_as_string(info->state)); -+ n->node.is_running = !n->node.is_jack || (info->state == PW_NODE_STATE_RUNNING); - -- n->node.is_running = (info->state == PW_NODE_STATE_RUNNING); -+ pw_log_debug("DSP node %d %08"PRIx64" jack:%u state change %s running:%d", info->id, -+ info->change_mask, n->node.is_jack, -+ pw_node_state_as_string(info->state), n->node.is_running); - - if (info->change_mask & PW_NODE_CHANGE_MASK_STATE) { - struct object *p; --- -GitLab - diff --git a/_service b/_service index 314e933..d557ab1 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ git https://gitlab.freedesktop.org/pipewire/pipewire.git - 0.3.77 + 0.3.78 @PARENT_TAG@