diff --git a/0001-conf-start-media-session-through-pipewire.patch b/0001-conf-start-media-session-through-pipewire.patch index 6a42ce5..31f93f1 100644 --- a/0001-conf-start-media-session-through-pipewire.patch +++ b/0001-conf-start-media-session-through-pipewire.patch @@ -1,4 +1,4 @@ -From cb5a1841e4fdad320e85021ef1c66e5cf52cfc5a Mon Sep 17 00:00:00 2001 +From 5d64bc8d5691323be7edf45b81c18be6322d0997 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Mar 2021 15:38:16 +0100 Subject: [PATCH 01/10] conf: start media-session through pipewire @@ -8,10 +8,10 @@ Subject: [PATCH 01/10] conf: start media-session through pipewire 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in -index 281671c7c..af89fdc05 100644 +index 394b2e10..3837ac51 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in -@@ -204,7 +204,7 @@ context.exec = [ +@@ -210,7 +210,7 @@ context.exec = [ # but it is better to start it as a systemd service. # Run the session manager with -h for options. # @@ -21,5 +21,5 @@ index 281671c7c..af89fdc05 100644 # You can optionally start the pulseaudio-server here as well # but it is better to start it as a systemd service. -- -2.26.3 +2.30.2 diff --git a/0002-acp-sync-with-pulseaudio.patch b/0002-acp-sync-with-pulseaudio.patch index 7628b00..02678cd 100644 --- a/0002-acp-sync-with-pulseaudio.patch +++ b/0002-acp-sync-with-pulseaudio.patch @@ -1,7 +1,7 @@ From cd4a47666d537fce00e736dde5a0170f93260f10 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 22 Apr 2021 12:25:48 +0200 -Subject: [PATCH 2/6] acp: sync with pulseaudio +Subject: [PATCH 02/10] acp: sync with pulseaudio Remove our custom hack to work around missing duplex and use upstream fix. diff --git a/0003-media-session-fix-match-rule.patch b/0003-media-session-fix-match-rule.patch index 425d6dd..b0dad55 100644 --- a/0003-media-session-fix-match-rule.patch +++ b/0003-media-session-fix-match-rule.patch @@ -1,7 +1,7 @@ From 87b30e280e1e36cecd57422d9c619293feef2307 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 25 Apr 2021 13:47:23 +0200 -Subject: [PATCH 3/6] media-session: fix match rule +Subject: [PATCH 03/10] media-session: fix match rule When matching without regex, don't just to a startswith check but also check that the sizes of the strings match. diff --git a/0004-media-session-keep-track-of-seq-in-pw_-_enum_params.patch b/0004-media-session-keep-track-of-seq-in-pw_-_enum_params.patch index 28e270e..2fc8e15 100644 --- a/0004-media-session-keep-track-of-seq-in-pw_-_enum_params.patch +++ b/0004-media-session-keep-track-of-seq-in-pw_-_enum_params.patch @@ -1,7 +1,7 @@ From a193bf7e1faa03d1907ebecac097f9ccc3420310 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 25 Apr 2021 19:11:43 +0300 -Subject: [PATCH 4/6] media-session: keep track of seq in pw_*_enum_params +Subject: [PATCH 04/10] media-session: keep track of seq in pw_*_enum_params If multiple async enum param are running at the same time, take results only from the latest one. diff --git a/0005-pulse-server-keep-track-of-seq-in-pw_-_enum_params.patch b/0005-pulse-server-keep-track-of-seq-in-pw_-_enum_params.patch index a6602c4..2ccc291 100644 --- a/0005-pulse-server-keep-track-of-seq-in-pw_-_enum_params.patch +++ b/0005-pulse-server-keep-track-of-seq-in-pw_-_enum_params.patch @@ -1,7 +1,7 @@ From f6cbb05aa95f0580bded97c194d928296cc0e874 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 25 Apr 2021 20:42:03 +0300 -Subject: [PATCH 5/6] pulse-server: keep track of seq in pw_*_enum_params +Subject: [PATCH 05/10] pulse-server: keep track of seq in pw_*_enum_params If multiple async enum param are running at the same time, take results only from the latest one. diff --git a/0006-bluez5-don-t-unregister-HFP-HSP-profiles-when-shutti.patch b/0006-bluez5-don-t-unregister-HFP-HSP-profiles-when-shutti.patch index 5a3c714..265423a 100644 --- a/0006-bluez5-don-t-unregister-HFP-HSP-profiles-when-shutti.patch +++ b/0006-bluez5-don-t-unregister-HFP-HSP-profiles-when-shutti.patch @@ -1,7 +1,7 @@ From b6d6800fc39538db50753df35d117b7b6a8c3311 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 25 Apr 2021 21:18:45 +0300 -Subject: [PATCH 6/6] bluez5: don't unregister HFP/HSP profiles when shutting +Subject: [PATCH 06/10] bluez5: don't unregister HFP/HSP profiles when shutting down This apparently causes delays in shutdown under some conditions, and diff --git a/0007-audioconvert-run-lr4-on-tagged-channels-in-generic-c.patch b/0007-audioconvert-run-lr4-on-tagged-channels-in-generic-c.patch new file mode 100644 index 0000000..8528747 --- /dev/null +++ b/0007-audioconvert-run-lr4-on-tagged-channels-in-generic-c.patch @@ -0,0 +1,68 @@ +From 86654f2bc9f4b3de114107008bb98e5f526dfe8c Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Mon, 26 Apr 2021 17:34:14 +0200 +Subject: [PATCH 07/10] audioconvert: run lr4 on tagged channels in generic + case + +Mark the LFE channels and run the lowpass filter on them in +the generic case. Generates LFE correctly in 2.1 upmix case. + +See #1095 +--- + spa/plugins/audioconvert/channelmix-ops-c.c | 4 ++++ + spa/plugins/audioconvert/channelmix-ops.c | 9 +++++++-- + spa/plugins/audioconvert/channelmix-ops.h | 1 + + 3 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/spa/plugins/audioconvert/channelmix-ops-c.c b/spa/plugins/audioconvert/channelmix-ops-c.c +index 588cff19..e7359a93 100644 +--- a/spa/plugins/audioconvert/channelmix-ops-c.c ++++ b/spa/plugins/audioconvert/channelmix-ops-c.c +@@ -78,6 +78,10 @@ channelmix_f32_n_m_c(struct channelmix *mix, uint32_t n_dst, void * SPA_RESTRICT + d[i][n] = sum; + } + } ++ for (i = 0; i < n_dst; i++) { ++ if (mix->lr4_info[i] > 0) ++ lr4_process(&mix->lr4[i], d[i], n_samples); ++ } + } + } + +diff --git a/spa/plugins/audioconvert/channelmix-ops.c b/spa/plugins/audioconvert/channelmix-ops.c +index c669c58b..7c98e645 100644 +--- a/spa/plugins/audioconvert/channelmix-ops.c ++++ b/spa/plugins/audioconvert/channelmix-ops.c +@@ -422,10 +422,15 @@ done: + continue; + mix->matrix_orig[ic][jc++] = matrix[i][j]; + sum += fabs(matrix[i][j]); +- if (i == _CH(LFE)) +- lr4_set(&mix->lr4[ic], BQ_LOWPASS, mix->lfe_cutoff / mix->freq); + } + maxsum = SPA_MAX(maxsum, sum); ++ if (i == _CH(LFE)) { ++ spa_log_debug(mix->log, "channel %d is LFE", ic); ++ lr4_set(&mix->lr4[ic], BQ_LOWPASS, mix->lfe_cutoff / mix->freq); ++ mix->lr4_info[ic] = 1; ++ } else { ++ mix->lr4_info[ic] = 0; ++ } + ic++; + } + if (SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_NORMALIZE) && +diff --git a/spa/plugins/audioconvert/channelmix-ops.h b/spa/plugins/audioconvert/channelmix-ops.h +index 3dd600e4..8fc15c4f 100644 +--- a/spa/plugins/audioconvert/channelmix-ops.h ++++ b/spa/plugins/audioconvert/channelmix-ops.h +@@ -65,6 +65,7 @@ struct channelmix { + + float freq; /* sample frequency */ + float lfe_cutoff; /* in Hz, 0 is disabled */ ++ uint32_t lr4_info[SPA_AUDIO_MAX_CHANNELS]; + struct lr4 lr4[SPA_AUDIO_MAX_CHANNELS]; + + void (*process) (struct channelmix *mix, uint32_t n_dst, void * SPA_RESTRICT dst[n_dst], +-- +2.30.2 + diff --git a/0008-conf-remove-X-bit-from-config-files.patch b/0008-conf-remove-X-bit-from-config-files.patch new file mode 100644 index 0000000..284df62 --- /dev/null +++ b/0008-conf-remove-X-bit-from-config-files.patch @@ -0,0 +1,26 @@ +From ca5f08e701b9a8f271637c51040fdfb8e8daf0f5 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 27 Apr 2021 15:38:31 +0200 +Subject: [PATCH 08/10] conf: remove X bit from config files + +Fixes #1107 +--- + src/pipewire/conf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pipewire/conf.c b/src/pipewire/conf.c +index 50e0b0f9..24b15ffb 100644 +--- a/src/pipewire/conf.c ++++ b/src/pipewire/conf.c +@@ -193,7 +193,7 @@ int pw_conf_save_state(const char *prefix, const char *name, struct pw_propertie + + tmp_name = alloca(strlen(name)+5); + sprintf(tmp_name, "%s.tmp", name); +- if ((fd = openat(sfd, tmp_name, O_CLOEXEC | O_CREAT | O_WRONLY | O_TRUNC, 0700)) < 0) { ++ if ((fd = openat(sfd, tmp_name, O_CLOEXEC | O_CREAT | O_WRONLY | O_TRUNC, 0600)) < 0) { + pw_log_error("can't open file '%s': %m", tmp_name); + res = -errno; + goto error; +-- +2.30.2 + diff --git a/0009-Revert-acp-use-the-right-profile-name-and-descriptio.patch b/0009-Revert-acp-use-the-right-profile-name-and-descriptio.patch new file mode 100644 index 0000000..f802f69 --- /dev/null +++ b/0009-Revert-acp-use-the-right-profile-name-and-descriptio.patch @@ -0,0 +1,63 @@ +From 3a04f6d90ebda0f982ea7da59f28502d20c0bec1 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 27 Apr 2021 16:42:52 +0200 +Subject: [PATCH 09/10] Revert "acp: use the right profile name and + description" + +This reverts commit 09106151d3a829ab6108260136b3a4f79f23797d. + +We need the actual name and description of the mapping, not the +profile or else we end up with the full profile description in the +node description instead of the part of the profile that applies to +the device. +--- + spa/plugins/alsa/acp/acp.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c +index 2dc1591f..bf84a2ed 100644 +--- a/spa/plugins/alsa/acp/acp.c ++++ b/spa/plugins/alsa/acp/acp.c +@@ -199,8 +199,8 @@ static void device_free(void *data) + pa_hashmap_free(dev->ports); + } + +-static void init_device(pa_card *impl, pa_alsa_profile *ap, pa_alsa_device *dev, +- pa_alsa_direction_t direction, pa_alsa_mapping *m, uint32_t index) ++static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t direction, ++ pa_alsa_mapping *m, uint32_t index) + { + uint32_t i; + +@@ -231,8 +231,8 @@ static void init_device(pa_card *impl, pa_alsa_profile *ap, pa_alsa_device *dev, + dev->device.direction = ACP_DIRECTION_CAPTURE; + pa_proplist_update(dev->proplist, PA_UPDATE_REPLACE, m->input_proplist); + } +- pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_NAME, ap->name); +- pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, ap->description); ++ pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_NAME, m->name); ++ pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, m->description); + pa_proplist_setf(dev->proplist, "card.profile.device", "%u", index); + pa_proplist_as_dict(dev->proplist, &dev->device.props); + +@@ -430,7 +430,7 @@ static void add_profiles(pa_card *impl) + PA_IDXSET_FOREACH(m, ap->output_mappings, idx) { + dev = &m->output; + if (dev->mapping == NULL) { +- init_device(impl, ap, dev, PA_ALSA_DIRECTION_OUTPUT, m, n_devices++); ++ init_device(impl, dev, PA_ALSA_DIRECTION_OUTPUT, m, n_devices++); + pa_dynarray_append(&impl->out.devices, dev); + } + if (impl->use_ucm) { +@@ -451,7 +451,7 @@ static void add_profiles(pa_card *impl) + PA_IDXSET_FOREACH(m, ap->input_mappings, idx) { + dev = &m->input; + if (dev->mapping == NULL) { +- init_device(impl, ap, dev, PA_ALSA_DIRECTION_INPUT, m, n_devices++); ++ init_device(impl, dev, PA_ALSA_DIRECTION_INPUT, m, n_devices++); + pa_dynarray_append(&impl->out.devices, dev); + } + +-- +2.30.2 + diff --git a/0010-client-node-use-the-right-port-for-io.patch b/0010-client-node-use-the-right-port-for-io.patch new file mode 100644 index 0000000..4d3da1e --- /dev/null +++ b/0010-client-node-use-the-right-port-for-io.patch @@ -0,0 +1,30 @@ +From b136b3e2e34f9efb410a4041fa1c6f780217e0bf Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Wed, 28 Apr 2021 17:04:36 +0200 +Subject: [PATCH 10/10] client-node: use the right port for io + +To set the io on the mixer ports, we need to use the same id that +was used to add the port, not the id we use to identify the mixer +structure. + +Fixes #759 +--- + src/modules/module-client-node/remote-node.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c +index ac9fae12..61919aab 100644 +--- a/src/modules/module-client-node/remote-node.c ++++ b/src/modules/module-client-node/remote-node.c +@@ -793,7 +793,7 @@ client_node_port_set_io(void *object, + } + + if ((res = spa_node_port_set_io(mix->port->mix, +- direction, mix_id, id, ptr, size)) < 0) { ++ direction, mix->mix.port.port_id, id, ptr, size)) < 0) { + if (res == -ENOTSUP) + res = 0; + else +-- +2.30.2 + diff --git a/pipewire.spec b/pipewire.spec index 34c8c98..3e04776 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -8,7 +8,7 @@ %global libversion %{soversion}.%(bash -c '((intversion = (%{minorversion} * 100) + %{microversion})); echo ${intversion}').0 # For rpmdev-bumpspec and releng automation -%global baserelease 3 +%global baserelease 4 #global snapdate 20210107 #global gitcommit b17db2cebc1a5ab2c01851d29c05f79cd2f262bb @@ -58,6 +58,10 @@ Patch0002: 0003-media-session-fix-match-rule.patch Patch0003: 0004-media-session-keep-track-of-seq-in-pw_-_enum_params.patch Patch0004: 0005-pulse-server-keep-track-of-seq-in-pw_-_enum_params.patch Patch0005: 0006-bluez5-don-t-unregister-HFP-HSP-profiles-when-shutti.patch +Patch0006: 0007-audioconvert-run-lr4-on-tagged-channels-in-generic-c.patch +Patch0007: 0008-conf-remove-X-bit-from-config-files.patch +Patch0008: 0009-Revert-acp-use-the-right-profile-name-and-descriptio.patch +Patch0009: 0010-client-node-use-the-right-port-for-io.patch ## upstreamable patches @@ -477,7 +481,10 @@ systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : %endif %changelog -* Tue Apr 26 2021 Wim Taymans - 0.3.26-3 +* Thu Apr 29 2021 Wim Taymans - 0.3.26-4 +- Add some more important upstream patches. + +* Mon Apr 26 2021 Wim Taymans - 0.3.26-3 - Add some important upstream patches. * Sat Apr 24 2021 Neal Gompa - 0.3.26-2