From 52893f6f6f649815c6b2b84745c1b4b26ebad2cd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 10 Nov 2022 12:54:35 +0100 Subject: [PATCH] Update version to 0.3.60 --- ...-attempt-to-get-more-data-in-timeout.patch | 31 -------- 0002-jack-set-port-valid-state-safely.patch | 78 ------------------- 0003-bluez5-stop-before-freeing-things.patch | 73 ----------------- ...et-timers-when-reassigning-followers.patch | 41 ---------- pipewire.spec | 11 ++- sources | 2 +- 6 files changed, 6 insertions(+), 230 deletions(-) delete mode 100644 0001-alsa-seq-attempt-to-get-more-data-in-timeout.patch delete mode 100644 0002-jack-set-port-valid-state-safely.patch delete mode 100644 0003-bluez5-stop-before-freeing-things.patch delete mode 100644 0004-bluez5-reset-timers-when-reassigning-followers.patch diff --git a/0001-alsa-seq-attempt-to-get-more-data-in-timeout.patch b/0001-alsa-seq-attempt-to-get-more-data-in-timeout.patch deleted file mode 100644 index 84bd390..0000000 --- a/0001-alsa-seq-attempt-to-get-more-data-in-timeout.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 79d688349becca7e3b145fc45cf1dacce637efbb Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Thu, 20 Oct 2022 17:44:42 +0200 -Subject: [PATCH 1/4] alsa-seq: attempt to get more data in timeout - -Also emit the NEED_DATA status so that the graph will pull in new -midi data even when we don't output anything. - -Fixes #2775 ---- - spa/plugins/alsa/alsa-seq.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/spa/plugins/alsa/alsa-seq.c b/spa/plugins/alsa/alsa-seq.c -index 381bbc5e1..8da724528 100644 ---- a/spa/plugins/alsa/alsa-seq.c -+++ b/spa/plugins/alsa/alsa-seq.c -@@ -803,8 +803,8 @@ static void alsa_on_timeout_event(struct spa_source *source) - update_time(state, state->current_time, false); - - res = process_read(state); -- if (res > 0) -- spa_node_call_ready(&state->callbacks, res); -+ if (res >= 0) -+ spa_node_call_ready(&state->callbacks, res | SPA_STATUS_NEED_DATA); - - set_timeout(state, state->next_time); - } --- -2.37.3 - diff --git a/0002-jack-set-port-valid-state-safely.patch b/0002-jack-set-port-valid-state-safely.patch deleted file mode 100644 index bfb2e06..0000000 --- a/0002-jack-set-port-valid-state-safely.patch +++ /dev/null @@ -1,78 +0,0 @@ -From efca9b9d7eb5c3cfc97475e94029f0af4cfdd418 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Thu, 20 Oct 2022 21:34:01 +0200 -Subject: [PATCH 2/4] jack: set port valid state safely - -When unregistering a port, set the port to invalid first and sync the -data loop so that it will not be used anymore from the data loop. - -See #2652 ---- - pipewire-jack/src/pipewire-jack.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c -index 7100a41b0..54551f309 100644 ---- a/pipewire-jack/src/pipewire-jack.c -+++ b/pipewire-jack/src/pipewire-jack.c -@@ -610,13 +610,9 @@ static void free_port(struct client *c, struct port *p) - { - struct mix *m; - -- if (!p->valid) -- return; -- - spa_list_consume(m, &p->mix, port_link) - free_mix(c, m); - -- p->valid = false; - pw_map_remove(&c->ports[p->direction], p->port_id); - free_object(c, p->object); - pw_properties_free(p->props); -@@ -1056,7 +1052,7 @@ static inline void *get_buffer_output(struct port *p, uint32_t frames, uint32_t - struct buffer *b; - struct spa_data *d; - -- if (frames == 0) -+ if (frames == 0 || !p->valid) - return NULL; - - if (SPA_UNLIKELY((mix = p->global_mix) == NULL)) -@@ -4369,6 +4365,15 @@ jack_port_t * jack_port_register (jack_client_t *client, - return (jack_port_t *) o; - } - -+static int -+do_invalidate_port(struct spa_loop *loop, -+ bool async, uint32_t seq, const void *data, size_t size, void *user_data) -+{ -+ struct port *p = user_data; -+ p->valid = false; -+ return 0; -+} -+ - SPA_EXPORT - int jack_port_unregister (jack_client_t *client, jack_port_t *port) - { -@@ -4389,6 +4394,9 @@ int jack_port_unregister (jack_client_t *client, jack_port_t *port) - res = -EINVAL; - goto done; - } -+ pw_data_loop_invoke(c->loop, -+ do_invalidate_port, 1, NULL, 0, !c->data_locked, p); -+ - pw_log_info("%p: port %p unregister \"%s\"", client, port, o->port.name); - - pw_client_node_port_update(c->node, -@@ -4566,6 +4574,8 @@ void * jack_port_get_buffer (jack_port_t *port, jack_nframes_t frames) - - return SPA_PTROFF(d->data, offset, void); - } -+ if (!p->valid) -+ return NULL; - - ptr = p->get_buffer(p, frames); - pw_log_trace_fp("%p: port %p buffer %p empty:%u", p->client, p, ptr, p->empty_out); --- -2.37.3 - diff --git a/0003-bluez5-stop-before-freeing-things.patch b/0003-bluez5-stop-before-freeing-things.patch deleted file mode 100644 index 1364902..0000000 --- a/0003-bluez5-stop-before-freeing-things.patch +++ /dev/null @@ -1,73 +0,0 @@ -From dec704d8e0a4acd972f4d8a596b4a8e653f4266b Mon Sep 17 00:00:00 2001 -From: Wim Taymans -Date: Thu, 20 Oct 2022 21:52:49 +0200 -Subject: [PATCH 3/4] bluez5: stop before freeing things - -Make sure all timers are stopped before we clear our state. - -See #2764 ---- - spa/plugins/bluez5/media-sink.c | 3 +-- - spa/plugins/bluez5/media-source.c | 4 ++-- - spa/plugins/bluez5/sco-sink.c | 2 ++ - spa/plugins/bluez5/sco-source.c | 2 ++ - 4 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/spa/plugins/bluez5/media-sink.c b/spa/plugins/bluez5/media-sink.c -index 255bd7a43..1e4c05669 100644 ---- a/spa/plugins/bluez5/media-sink.c -+++ b/spa/plugins/bluez5/media-sink.c -@@ -1663,8 +1663,7 @@ static int impl_clear(struct spa_handle *handle) - { - struct impl *this = (struct impl *) handle; - -- if (this->codec_data) -- this->codec->deinit(this->codec_data); -+ do_stop(this); - if (this->codec_props && this->codec->clear_props) - this->codec->clear_props(this->codec_props); - if (this->transport) -diff --git a/spa/plugins/bluez5/media-source.c b/spa/plugins/bluez5/media-source.c -index c03d767b1..b1387da49 100644 ---- a/spa/plugins/bluez5/media-source.c -+++ b/spa/plugins/bluez5/media-source.c -@@ -1452,8 +1452,8 @@ static int impl_clear(struct spa_handle *handle) - { - struct impl *this = (struct impl *) handle; - struct port *port = &this->port; -- if (this->codec_data) -- this->codec->deinit(this->codec_data); -+ -+ do_stop(this); - if (this->codec_props && this->codec->clear_props) - this->codec->clear_props(this->codec_props); - if (this->transport) -diff --git a/spa/plugins/bluez5/sco-sink.c b/spa/plugins/bluez5/sco-sink.c -index d92bada2a..d0578d202 100644 ---- a/spa/plugins/bluez5/sco-sink.c -+++ b/spa/plugins/bluez5/sco-sink.c -@@ -1236,6 +1236,8 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void - static int impl_clear(struct spa_handle *handle) - { - struct impl *this = (struct impl *) handle; -+ -+ do_stop(this); - if (this->transport) - spa_hook_remove(&this->transport_listener); - spa_system_close(this->data_system, this->timerfd); -diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c -index 52a1d27cc..81470d267 100644 ---- a/spa/plugins/bluez5/sco-source.c -+++ b/spa/plugins/bluez5/sco-source.c -@@ -1391,6 +1391,8 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void - static int impl_clear(struct spa_handle *handle) - { - struct impl *this = (struct impl *) handle; -+ -+ do_stop(this); - if (this->transport) - spa_hook_remove(&this->transport_listener); - spa_system_close(this->data_system, this->timerfd); --- -2.37.3 - diff --git a/0004-bluez5-reset-timers-when-reassigning-followers.patch b/0004-bluez5-reset-timers-when-reassigning-followers.patch deleted file mode 100644 index 469b6cc..0000000 --- a/0004-bluez5-reset-timers-when-reassigning-followers.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7aca980c4a7f60dbf5c28be6ab0b03986f5cdbb5 Mon Sep 17 00:00:00 2001 -From: Pauli Virtanen -Date: Wed, 19 Oct 2022 18:56:09 +0300 -Subject: [PATCH 4/4] bluez5: reset timers when reassigning followers - -Driver timeouts need to be started/stopped when we switch from follower -to driver or vice versa. - -The BT sources fail to do this, so fix it. Sinks already do it right. ---- - spa/plugins/bluez5/media-source.c | 1 + - spa/plugins/bluez5/sco-source.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/spa/plugins/bluez5/media-source.c b/spa/plugins/bluez5/media-source.c -index b1387da49..515eedbe6 100644 ---- a/spa/plugins/bluez5/media-source.c -+++ b/spa/plugins/bluez5/media-source.c -@@ -276,6 +276,7 @@ static int do_reassign_follower(struct spa_loop *loop, - struct impl *this = user_data; - struct port *port = &this->port; - -+ set_timers(this); - spa_bt_decode_buffer_recover(&port->buffer); - return 0; - } -diff --git a/spa/plugins/bluez5/sco-source.c b/spa/plugins/bluez5/sco-source.c -index 81470d267..11c126262 100644 ---- a/spa/plugins/bluez5/sco-source.c -+++ b/spa/plugins/bluez5/sco-source.c -@@ -248,6 +248,7 @@ static int do_reassign_follower(struct spa_loop *loop, - struct impl *this = user_data; - struct port *port = &this->port; - -+ set_timers(this); - spa_bt_decode_buffer_recover(&port->buffer); - return 0; - } --- -2.37.3 - diff --git a/pipewire.spec b/pipewire.spec index acfaa59..ce933f1 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -1,6 +1,6 @@ %global majorversion 0 %global minorversion 3 -%global microversion 59 +%global microversion 60 %global apiversion 0.3 %global spaversion 0.2 @@ -9,7 +9,7 @@ %global ms_version 0.4.1 # For rpmdev-bumpspec and releng automation -%global baserelease 3 +%global baserelease 1 #global snapdate 20210107 #global gitcommit b17db2cebc1a5ab2c01851d29c05f79cd2f262bb @@ -80,10 +80,6 @@ Source1: https://gitlab.freedesktop.org/pipewire/media-session/-/archive/ %endif ## upstream patches -Patch0001: 0001-alsa-seq-attempt-to-get-more-data-in-timeout.patch -Patch0002: 0002-jack-set-port-valid-state-safely.patch -Patch0003: 0003-bluez5-stop-before-freeing-things.patch -Patch0004: 0004-bluez5-reset-timers-when-reassigning-followers.patch ## upstreamable patches @@ -629,6 +625,9 @@ systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : %endif %changelog +* Thu Nov 10 2022 Wim Taymans - 0.3.60-1 +- Update version to 0.3.60 + * Mon Oct 24 2022 Jaroslav Škarvada - 0.3.59-3 - Enabled roc-toolkit support Resolves: rhbz#2041189 diff --git a/sources b/sources index bf010a6..e1b3b31 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pipewire-0.3.59.tar.gz) = 1183dc083553ece1f9157898f437996b88dc7d13ba69aa43886f5339f330130404274ceb08ac8ec05a5ccb84dfca56b524a1d4b3fb07e28a41741c5c3333eda0 +SHA512 (pipewire-0.3.60.tar.gz) = 33ef5a100107f07a2f42eb008af4dc4bc67c38f4d4929e7ab865c67f16750a3f8d9baca117dc035d5bb88e6f48ce535595435a14770e982c33c349a466508e98 SHA512 (media-session-0.4.1.tar.gz) = bfce472b7260b280c0d3cd74d917f48655b5be9976c89a109e94b81af2c3664e83446e97db573cedba6e5d54dedf77195b80eb0a76f6bfc0e96e342557469f99