aboutsummaryrefslogtreecommitdiffstats
path: root/community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2022-05-02 08:47:23 +0200
committerBart Ribbers <bribbers@disroot.org>2022-05-02 08:47:23 +0200
commita5beb293f4dc60964ca7c2cb8bb9309826c0456b (patch)
treebe1922c31391a80c939e5d8be4ef5f085ae872e0 /community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
parent754e78145f8713a959bd1fd7a681927c2cae8e37 (diff)
downloadaports-a5beb293f4dc60964ca7c2cb8bb9309826c0456b.tar.gz
aports-a5beb293f4dc60964ca7c2cb8bb9309826c0456b.tar.bz2
aports-a5beb293f4dc60964ca7c2cb8bb9309826c0456b.tar.xz
community/pipewire: upgrade to 0.3.51
Diffstat (limited to 'community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch')
-rw-r--r--community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch b/community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
new file mode 100644
index 0000000000..97d8e24b34
--- /dev/null
+++ b/community/pipewire/0001-Revert-pulse-tunnel-use-format-channels-and-rate-pro.patch
@@ -0,0 +1,67 @@
+diff --git a/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c b/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c
+index 064c09812..134dfc601 100644
+--- a/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c
++++ b/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c
+@@ -202,15 +202,6 @@ struct module *create_module_tunnel_sink(struct impl *impl, const char *argument
+ }
+
+ audio_info_to_props(&info, stream_props);
+- if ((str = pw_properties_get(props, "format")) != NULL) {
+- uint32_t id = format_paname2id(str, strlen(str));
+- if (id == SPA_AUDIO_FORMAT_UNKNOWN) {
+- res = -EINVAL;
+- goto out;
+- }
+-
+- pw_properties_set(stream_props, PW_KEY_AUDIO_FORMAT, format_id2name(id));
+- }
+
+ module = module_new(impl, sizeof(*d));
+ if (module == NULL) {
+diff --git a/src/modules/module-pulse-tunnel.c b/src/modules/module-pulse-tunnel.c
+index 84e969a04..203de371e 100644
+--- a/src/modules/module-pulse-tunnel.c
++++ b/src/modules/module-pulse-tunnel.c
+@@ -52,7 +52,6 @@
+ #include <pipewire/private.h>
+
+ #include <pulse/pulseaudio.h>
+-#include "module-protocol-pulse/format.h"
+
+ /** \page page_module_pulse_tunnel PipeWire Module: Pulse Tunnel
+ */
+@@ -325,6 +324,13 @@ static int create_stream(struct impl *impl)
+ &playback_stream_events, impl);
+ }
+
++ impl->info = SPA_AUDIO_INFO_RAW_INIT(
++ .format = SPA_AUDIO_FORMAT_S16,
++ .rate = 48000,
++ .channels = 2,
++ .position = { SPA_AUDIO_CHANNEL_FL, SPA_AUDIO_CHANNEL_FR });
++ impl->frame_size = 2 * 2;
++
+ n_params = 0;
+ spa_pod_builder_init(&b, buffer, sizeof(buffer));
+ params[n_params++] = spa_format_audio_raw_build(&b,
+@@ -538,9 +544,9 @@ static int create_pulse_stream(struct impl *impl)
+ pa_threaded_mainloop_wait(impl->pa_mainloop);
+ }
+
+- ss.format = (pa_sample_format_t) format_id2pa(impl->info.format);
+- ss.channels = impl->info.channels;
+- ss.rate = impl->info.rate;
++ ss.format = PA_SAMPLE_S16NE;
++ ss.channels = 2;
++ ss.rate = 48000;
+
+ snprintf(stream_name, sizeof(stream_name), _("Tunnel for %s@%s"),
+ pw_get_user_name(), pw_get_host_name());
+@@ -862,7 +858,6 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
+ if ((str = pw_properties_get(props, "stream.props")) != NULL)
+ pw_properties_update_string(impl->stream_props, str, strlen(str));
+
+- copy_props(impl, props, PW_KEY_AUDIO_FORMAT);
+ copy_props(impl, props, PW_KEY_AUDIO_RATE);
+ copy_props(impl, props, PW_KEY_AUDIO_CHANNELS);
+ copy_props(impl, props, SPA_KEY_AUDIO_POSITION);