diff --git a/0001-alsa-add-api.alsa.auto-link-option.patch b/0001-alsa-add-api.alsa.auto-link-option.patch deleted file mode 100644 index 434d506..0000000 --- a/0001-alsa-add-api.alsa.auto-link-option.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 896fea62c2072c836e6d821f7bdafe840ce8540e Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch b/0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch deleted file mode 100644 index 22ce1ba..0000000 --- a/0001-alsa-dont-check-early-wakeup-when-PCM-stopped.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e940361c947cf8519b11c7e6792441c86fc59042 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0002-acp-fix-compilation.patch b/0002-acp-fix-compilation.patch deleted file mode 100644 index 7c3d246..0000000 --- a/0002-acp-fix-compilation.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 063805ccb49af859bd06a342ed107e61c9e11af4 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch b/0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch deleted file mode 100644 index ce3313d..0000000 --- a/0003-acp-only-join-and-link-when-1-capture-and-1-playback.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 945be16617dce4254b8a4793e9431d248b43b9c1 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/0004-acp-only-disable-tsched-when-linking.patch b/0004-acp-only-disable-tsched-when-linking.patch deleted file mode 100644 index 14cd602..0000000 --- a/0004-acp-only-disable-tsched-when-linking.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2278dd1460e37fd011ca9b1101de478092fd1d74 Mon Sep 17 00:00:00 2001 -From: Wim Taymans -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 - diff --git a/_service b/_service index 2b620ae..cba53af 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ git https://gitlab.freedesktop.org/pipewire/pipewire.git - 0.3.81 + 0.3.82 @PARENT_TAG@