Accepting request 1117943 from multimedia:libs

- Update to version 0.3.82:
  * Highlights
    - Fix a regression in some devices when the Pro-Audio profile
      was selected.
      Only enable the IRQ based scheduling and device linking in
      specific safe cases.
    - Improve rate switching. In some cases the graph rate would
      not switch correctly.
    - Fix regression in alsa wakeups that would cause silence in
      VMs.
    - Fix a leak in the SBC codecs for SCO.
    - More improvements to the RAOP module.
    - Other small improvements and fixes.
  * PipeWire
    - Improve client property checks.
    - Allow non-power-of-2 quantums when forced.
    - Improve rate switching. In some cases the graph rate would
      not switch correctly.
    - The PIPEWIRE_QUANTUM env variable now forces the size and
      rate in the graph for the duration of the application.
      The softer PIPEWIRE_LATENCY and PIPEWIRE_RATE can still be
      used to merely suggest a maximum latency and a rate.
  * modules
    - Remove the RTSP FLUSH request in RAOP because it does not
      seem necessary.
    - The RAOP module now uses the common RTP stream functions.
    - Add sockets option to protocol-native to make pipewire listen
      on multiple sockets.
  *  SPA
    - Clean up some of the log functions.

OBS-URL: https://build.opensuse.org/request/show/1117943
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pipewire?expand=0&rev=97
This commit is contained in:
Ana Guerrero 2023-10-16 20:32:46 +00:00 committed by Git OBS Bridge
commit a38bbe5276
11 changed files with 74 additions and 305 deletions

View File

@ -1,73 +0,0 @@
From 896fea62c2072c836e6d821f7bdafe840ce8540e Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 9 Oct 2023 10:10:46 +0200
Subject: [PATCH] alsa: add api.alsa.auto-link option
Add an option to automatically use snd_pcm_link when the follower clock
is matching the driver. Only set this to true in pro-audio and when
nodes are scheduled together.
See #3556
---
spa/plugins/alsa/acp/acp.c | 2 ++
spa/plugins/alsa/alsa-pcm.c | 4 +++-
spa/plugins/alsa/alsa-pcm.h | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
index 67b1e4654..127379fc4 100644
--- a/spa/plugins/alsa/acp/acp.c
+++ b/spa/plugins/alsa/acp/acp.c
@@ -390,6 +390,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_proplist_setf(m->output_proplist, "device.profile.pro", "true");
pa_proplist_setf(m->output_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->output_proplist, "node.link-group", "pro-audio-%u", index);
+ pa_proplist_set(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->output_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
@@ -423,6 +424,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_proplist_setf(m->input_proplist, "device.profile.pro", "true");
pa_proplist_setf(m->input_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->input_proplist, "node.link-group", "pro-audio-%u", index);
+ pa_proplist_set(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->input_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
index ef148d76b..87dba34b0 100644
--- a/spa/plugins/alsa/alsa-pcm.c
+++ b/spa/plugins/alsa/alsa-pcm.c
@@ -131,6 +131,8 @@ static int alsa_set_param(struct state *state, const char *k, const char *s)
state->multi_rate = spa_atob(s);
} else if (spa_streq(k, "api.alsa.htimestamp")) {
state->htimestamp = spa_atob(s);
+ } else if (spa_streq(k, "api.alsa.auto-link")) {
+ state->auto_link = spa_atob(s);
} else if (spa_streq(k, "latency.internal.rate")) {
state->process_latency.rate = atoi(s);
} else if (spa_streq(k, "latency.internal.ns")) {
@@ -3034,7 +3036,7 @@ int spa_alsa_prepare(struct state *state)
spa_list_for_each(follower, &state->followers, driver_link) {
if (follower != state && !follower->matching) {
spa_alsa_prepare(follower);
- if (!follower->linked)
+ if (!follower->linked && state->auto_link)
do_link(state, follower);
}
}
diff --git a/spa/plugins/alsa/alsa-pcm.h b/spa/plugins/alsa/alsa-pcm.h
index c770eeabb..ae4574526 100644
--- a/spa/plugins/alsa/alsa-pcm.h
+++ b/spa/plugins/alsa/alsa-pcm.h
@@ -214,6 +214,7 @@ struct state {
unsigned int htimestamp:1;
unsigned int is_pro:1;
unsigned int sources_added:1;
+ unsigned int auto_link:1;
unsigned int linked:1;
uint64_t iec958_codecs;
--
GitLab

View File

@ -1,43 +0,0 @@
From e940361c947cf8519b11c7e6792441c86fc59042 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 12 Oct 2023 15:28:53 +0200
Subject: [PATCH] alsa: don't check early wakeup when PCM stopped
When the PCM is stopped, don't check for early wakeup because if we
are early, we will never be on time in the next iteration either because the
PCM is stopped and doesn't advance.
Also don't try to align when stopped.
See #3565
---
spa/plugins/alsa/alsa-pcm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
index 57e7911e7..ddf79f05a 100644
--- a/spa/plugins/alsa/alsa-pcm.c
+++ b/spa/plugins/alsa/alsa-pcm.c
@@ -2408,7 +2408,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
# return res;
# }
if (SPA_UNLIKELY((res = get_status(state, current_time, &avail, &delay, &target)) < 0))
return res;
- if (SPA_UNLIKELY(!following && delay > target + state->max_error)) {
+ if (SPA_UNLIKELY(!following && state->alsa_started && delay > target + state->max_error)) {
spa_log_trace(state->log, "%p: early wakeup %ld %lu %lu", state,
avail, delay, target);
if (delay > target * 3)
@@ -2419,7 +2419,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
if (SPA_UNLIKELY((res = update_time(state, current_time, delay, target, following)) < 0))
return res;
- if (following && !state->linked) {
+ if (following && state->alsa_started && !state->linked) {
if (SPA_UNLIKELY(state->alsa_sync)) {
enum spa_log_level lev;
--
GitLab

View File

@ -1,34 +0,0 @@
From 063805ccb49af859bd06a342ed107e61c9e11af4 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 9 Oct 2023 10:15:10 +0200
Subject: [PATCH] acp: fix compilation
---
spa/plugins/alsa/acp/acp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
index 127379fc4..1dbc0c2d7 100644
--- a/spa/plugins/alsa/acp/acp.c
+++ b/spa/plugins/alsa/acp/acp.c
@@ -390,7 +390,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_proplist_setf(m->output_proplist, "device.profile.pro", "true");
pa_proplist_setf(m->output_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->output_proplist, "node.link-group", "pro-audio-%u", index);
- pa_proplist_set(m->input_proplist, "api.alsa.auto-link", "true");
+ pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->output_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
@@ -424,7 +424,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_proplist_setf(m->input_proplist, "device.profile.pro", "true");
pa_proplist_setf(m->input_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->input_proplist, "node.link-group", "pro-audio-%u", index);
- pa_proplist_set(m->input_proplist, "api.alsa.auto-link", "true");
+ pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->input_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
--
GitLab

View File

@ -1,85 +0,0 @@
From 945be16617dce4254b8a4793e9431d248b43b9c1 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 9 Oct 2023 10:35:30 +0200
Subject: [PATCH] acp: only join and link when 1 capture and 1 playback
Only schedule nodes together when there is just 1 capture and 1 playback
device. Devices might be mutually exclusive or require special setup
that would break otherwise.
See #3556
---
spa/plugins/alsa/acp/acp.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
index 1dbc0c2d7..e2e0b3eb5 100644
--- a/spa/plugins/alsa/acp/acp.c
+++ b/spa/plugins/alsa/acp/acp.c
@@ -296,7 +296,7 @@ static const char *find_best_verb(pa_card *impl)
static int add_pro_profile(pa_card *impl, uint32_t index)
{
snd_ctl_t *ctl_hndl;
- int err, dev, count = 0;
+ int err, dev, count = 0, n_capture = 0, n_playback = 0;
pa_alsa_profile *ap;
pa_alsa_profile_set *ps = impl->profile_set;
pa_alsa_mapping *m;
@@ -304,6 +304,7 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
snd_pcm_info_t *pcminfo;
pa_sample_spec ss;
snd_pcm_uframes_t try_period_size, try_buffer_size;
+ uint32_t idx;
if (impl->use_ucm) {
const char *verb = find_best_verb(impl);
@@ -388,12 +389,10 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_alsa_init_proplist_pcm(NULL, m->output_proplist, m->output_pcm);
pa_proplist_setf(m->output_proplist, "clock.name", "api.alsa.%u", index);
pa_proplist_setf(m->output_proplist, "device.profile.pro", "true");
- pa_proplist_setf(m->output_proplist, "node.group", "pro-audio-%u", index);
- pa_proplist_setf(m->output_proplist, "node.link-group", "pro-audio-%u", index);
- pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->output_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
+ n_playback++;
}
pa_idxset_put(ap->output_mappings, m, NULL);
free(name);
@@ -422,12 +421,10 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_alsa_init_proplist_pcm(NULL, m->input_proplist, m->input_pcm);
pa_proplist_setf(m->input_proplist, "clock.name", "api.alsa.%u", index);
pa_proplist_setf(m->input_proplist, "device.profile.pro", "true");
- pa_proplist_setf(m->input_proplist, "node.group", "pro-audio-%u", index);
- pa_proplist_setf(m->input_proplist, "node.link-group", "pro-audio-%u", index);
- pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
pa_alsa_close(&m->input_pcm);
m->supported = true;
pa_channel_map_init_auto(&m->channel_map, m->sample_spec.channels, PA_CHANNEL_MAP_AUX);
+ n_capture++;
}
pa_idxset_put(ap->input_mappings, m, NULL);
free(name);
@@ -435,6 +432,18 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
}
snd_ctl_close(ctl_hndl);
+ if (n_capture == 1 && n_playback == 1) {
+ PA_IDXSET_FOREACH(m, ap->output_mappings, idx) {
+ pa_proplist_setf(m->output_proplist, "node.group", "pro-audio-%u", index);
+ pa_proplist_setf(m->output_proplist, "node.link-group", "pro-audio-%u", index);
+ pa_proplist_setf(m->output_proplist, "api.alsa.auto-link", "true");
+ }
+ PA_IDXSET_FOREACH(m, ap->input_mappings, idx) {
+ pa_proplist_setf(m->input_proplist, "node.group", "pro-audio-%u", index);
+ pa_proplist_setf(m->input_proplist, "node.link-group", "pro-audio-%u", index);
+ pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
+ }
+ }
return 0;
}
--
GitLab

View File

@ -1,47 +0,0 @@
From 2278dd1460e37fd011ca9b1101de478092fd1d74 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 9 Oct 2023 12:28:10 +0200
Subject: [PATCH] acp: only disable tsched when linking
Disable timer based scheduling only if we are going to link the devices
together.
See #3556
---
spa/plugins/alsa/acp/acp.c | 2 ++
spa/plugins/alsa/alsa-pcm.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
index e2e0b3eb5..98f6326d1 100644
--- a/spa/plugins/alsa/acp/acp.c
+++ b/spa/plugins/alsa/acp/acp.c
@@ -437,11 +437,13 @@ static int add_pro_profile(pa_card *impl, uint32_t index)
pa_proplist_setf(m->output_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->output_proplist, "node.link-group", "pro-audio-%u", index);
pa_proplist_setf(m->output_proplist, "api.alsa.auto-link", "true");
+ pa_proplist_setf(m->output_proplist, "api.alsa.disable-tsched", "true");
}
PA_IDXSET_FOREACH(m, ap->input_mappings, idx) {
pa_proplist_setf(m->input_proplist, "node.group", "pro-audio-%u", index);
pa_proplist_setf(m->input_proplist, "node.link-group", "pro-audio-%u", index);
pa_proplist_setf(m->input_proplist, "api.alsa.auto-link", "true");
+ pa_proplist_setf(m->input_proplist, "api.alsa.disable-tsched", "true");
}
}
return 0;
diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
index 87dba34b0..ffcf4d5d0 100644
--- a/spa/plugins/alsa/alsa-pcm.c
+++ b/spa/plugins/alsa/alsa-pcm.c
@@ -514,7 +514,6 @@ int spa_alsa_init(struct state *state, const struct spa_dict *info)
state->multi_rate = true;
state->htimestamp = false;
- state->disable_tsched = state->is_pro;
for (i = 0; info && i < info->n_items; i++) {
const char *k = info->items[i].key;
const char *s = info->items[i].value;
--
GitLab

View File

@ -3,7 +3,7 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pipewire/pipewire.git</param>
<param name="revision">0.3.81</param>
<param name="revision">0.3.82</param>
<param name="versionformat">@PARENT_TAG@</param>
<!--
<param name="revision">master</param>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c25700316d7b3ed4008003a551ed6b71e52dd6afa6d50559460a2284b0b1920
size 12304397

3
pipewire-0.3.82.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:891c73f844ede7534fa71742ca698154b9c7a7c462133d66c7b0fd8ceced9db1
size 12318733

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Fri Oct 13 14:10:56 UTC 2023 - Alexei Sorokin <sor.alexei@meowr.ru>
- Update to version 0.3.82:
* Highlights
- Fix a regression in some devices when the Pro-Audio profile
was selected.
Only enable the IRQ based scheduling and device linking in
specific safe cases.
- Improve rate switching. In some cases the graph rate would
not switch correctly.
- Fix regression in alsa wakeups that would cause silence in
VMs.
- Fix a leak in the SBC codecs for SCO.
- More improvements to the RAOP module.
- Other small improvements and fixes.
* PipeWire
- Improve client property checks.
- Allow non-power-of-2 quantums when forced.
- Improve rate switching. In some cases the graph rate would
not switch correctly.
- The PIPEWIRE_QUANTUM env variable now forces the size and
rate in the graph for the duration of the application.
The softer PIPEWIRE_LATENCY and PIPEWIRE_RATE can still be
used to merely suggest a maximum latency and a rate.
* modules
- Remove the RTSP FLUSH request in RAOP because it does not
seem necessary.
- The RAOP module now uses the common RTP stream functions.
- Add sockets option to protocol-native to make pipewire listen
on multiple sockets.
* SPA
- Clean up some of the log functions.
- Add an option in ALSA to disable linking devices together.
- Only link pcms together when 1 capture and 1 playback pcm.
For more complex devices we can't be sure which ones can be
linked.
- Disable tsched only when using linked devices.
- Add some extra checks in ALSA to avoid segfaults.
- Add Tag support to alsa-sink and alsa-source.
- Use dynamic pod builder when we can.
- Set priority.driver on midi-bridge to allow it as a fallback
driver.
- Fix regression in alsa wakeups.
- The PTP clock can now be found from the interface in
node-driver.
* pulse-server
- Some small cleanups and internal improvements.
- Add some memory debugging messages.
- Add Tag messages to streams.
* Bluetooth
- Fix a leak in the SBC codecs for SCO.
* JACK
- Patch up midi events in the destination buffer instead of
writing to the source buffer.
- Group all jack clients together to avoid transport issues.
* ALSA-plugins
- Add also.deny option to block alsa clients from opening the
PCM.
- Drop patches already included upstream:
* 0001-alsa-add-api.alsa.auto-link-option.patch
* 0002-acp-fix-compilation.patch
* 0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch
* 0004-acp-only-disable-tsched-when-linking.patch
* 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
-------------------------------------------------------------------
Fri Oct 13 08:33:28 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>

View File

@ -1,4 +1,4 @@
name: pipewire
version: 0.3.81
mtime: 1696585026
commit: 181fbfee6d3fcc3afd3c93613f126a8346dad586
version: 0.3.82
mtime: 1697184500
commit: 8a9117567c0af38dc664f7b4e12cf0d525ded20a

View File

@ -60,7 +60,7 @@
%bcond_with aptx
Name: pipewire
Version: 0.3.81
Version: 0.3.82
Release: 0
Summary: A Multimedia Framework designed to be an audio and video server and more
License: MIT
@ -70,16 +70,6 @@ Source0: %{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-OPENSUSE reduce-meson-dependency.patch
Patch0: reduce-meson-dependency.patch
# PATCH-FIX-UPSTREAM 0001-alsa-add-api.alsa.auto-link-option.patch
Patch1: 0001-alsa-add-api.alsa.auto-link-option.patch
# PATCH-FIX-UPSTREAM 0002-acp-fix-compilation.patch
Patch2: 0002-acp-fix-compilation.patch
# PATCH-FIX-UPSTREAM 0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch
Patch3: 0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch
# PATCH-FIX-UPSTREAM 0004-acp-only-disable-tsched-when-linking.patch
Patch4: 0004-acp-only-disable-tsched-when-linking.patch
# PATCH-FIX-UPSTREAM 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
Patch5: 0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch
BuildRequires: docutils
BuildRequires: doxygen
@ -393,11 +383,6 @@ JACK libraries.
sed -ie "s/version : '0.3.72'/version : '%{version}'/" %{P:0}
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%if %{pkg_vcmp gcc < 8}