diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2019-10-07 18:28:10 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2019-10-07 18:28:10 +0300 |
commit | a349a7d85434679a7d62fe5affe7074c33f0cb8a (patch) | |
tree | c2c80d2e61740de2131b126af003a49d219f3a44 | |
parent | c5b99b7e8608c1201293d84ba06e4a3ca501d9e8 (diff) |
pipewire: update to latest master
Update patches:
* remove merged patches
* remove the alsa algorithm correction that was needed for qemu,
as it seems to cause severe underruns on other platforms now;
I will recheck qemu to see if this is still an issue
* add a workaround needed to get the audioconvert plugin running
in merge+split mode (needed to get all the channels out instead
of just the front left channel that we were getting before)
Update version to 0.2.91 to reflect the fact that we are now tracking
the master branch instead of the work branch.
Enable the spa audiomixer plugin which is now required to mix audio on ports
Bug-AGL: SPEC-2837
Change-Id: I2558aa5487b9c9918e077bf450230c143abf7e6c
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
19 files changed, 71 insertions, 528 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire.inc b/meta-pipewire/recipes-multimedia/pipewire/pipewire.inc index de6d9b86..b3081ca4 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire.inc +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire.inc @@ -19,7 +19,7 @@ DEPENDS = "dbus" PACKAGECONFIG ??= "\ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'bluez5', d)} \ - alsa audioconvert \ + alsa audioconvert audiomixer \ pipewire-alsa \ gstreamer \ " @@ -32,6 +32,7 @@ PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd" # SPA plugins PACKAGECONFIG[alsa] = "-Dalsa=true,-Dalsa=false,udev alsa-lib" PACKAGECONFIG[audioconvert] = "-Daudioconvert=true,-Daudioconvert=false," +PACKAGECONFIG[audiomixer] = "-Daudiomixer=true,-Daudiomixer=false," PACKAGECONFIG[audiotestsrc] = "-Daudiotestsrc=true,-Daudiotestsrc=false, " PACKAGECONFIG[bluez5] = "-Dbluez5=true,-Dbluez5=false,bluez5 sbc" PACKAGECONFIG[jack] = "-Djack=true,-Djack=false,jack" diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-arm-build-with-mno-unaligned-access.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-arm-build-with-mno-unaligned-access.patch index 3309836a..b42c3330 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-arm-build-with-mno-unaligned-access.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0001-arm-build-with-mno-unaligned-access.patch @@ -1,4 +1,4 @@ -From e1d8927b7963a9bf2c09e50cd95943c3139313cf Mon Sep 17 00:00:00 2001 +From 9bf3ae655b4cb7a3a91a9c77e006ec72864a6e1a Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Mon, 24 Jun 2019 12:19:20 +0300 Subject: [PATCH] arm: build with -mno-unaligned-access @@ -10,10 +10,10 @@ See also https://github.com/PipeWire/pipewire/issues/161 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build -index aa60db35..5cd61fde 100644 +index 74455378..c0bb7470 100644 --- a/meson.build +++ b/meson.build -@@ -50,6 +50,11 @@ if cc.get_id() == 'gcc' +@@ -52,6 +52,11 @@ if cc.get_id() == 'gcc' language : 'c') endif diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-logger-print-timestamps-on-logged-messages.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-logger-print-timestamps-on-logged-messages.patch index 6012aa56..714ceb9a 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-logger-print-timestamps-on-logged-messages.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0002-logger-print-timestamps-on-logged-messages.patch @@ -1,4 +1,4 @@ -From 289f58b815badd54a32f2409bae7abd7e5474327 Mon Sep 17 00:00:00 2001 +From aef31f71f7dd458b5c26509cea09f81bab89ee84 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Wed, 3 Jul 2019 17:47:46 +0300 Subject: [PATCH] logger: print timestamps on logged messages diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-alsa-make-corrections-on-the-timeout-based-on-how-fa.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-alsa-make-corrections-on-the-timeout-based-on-how-fa.patch deleted file mode 100644 index 17280da0..00000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-alsa-make-corrections-on-the-timeout-based-on-how-fa.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 0c232229f3dc6b0cdf02ef44ae212b256c1828a3 Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis <george.kiagiadakis@collabora.com> -Date: Tue, 9 Jul 2019 18:06:18 +0300 -Subject: [PATCH] alsa: make corrections on the timeout based on how fast ALSA - consumes samples - -This feels a bit hacky, but it actually makes huge difference when pipewire is -running in qemu. - -The idea is that it keeps track of how much samples are in the device -(fill level) and calculates how many are consumed when a timeout occurs. -Then it converts that into a time based on the sample rate and compares it to -the system clock time that elapsed since the last write to the device. -The division between the two gives a rate (drift) that can be used to shorten -the timeout window. - -So for instance, if the timeout window was 21.3 ms, but the device actually -consumed an equivalent of 28 ms in samples, the drift will be 21.3/28 = 0.76 -and the next timeout window will be approximately 21.3 * 0.76 = 16.1 ms - -To avoid making things worse, the drift is clamped between 0.6 and 1.0. -Min 0.6 was arbitrarily chosen, but sometimes alsa does report strange numbers, -causing the drift to be very low, which in turn causes an early wakeup. -Max 1.0 basically means that we don't care if the device is consuming samples -slower. In that case, the early wakeup mechanism will throttle pipewire. - -Fixes #163 - -Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/166] ---- - spa/plugins/alsa/alsa-utils.c | 29 +++++++++++++++++++++++++---- - spa/plugins/alsa/alsa-utils.h | 2 ++ - 2 files changed, 27 insertions(+), 4 deletions(-) - -diff --git a/spa/plugins/alsa/alsa-utils.c b/spa/plugins/alsa/alsa-utils.c -index 7cf1d0d2..e8548345 100644 ---- a/spa/plugins/alsa/alsa-utils.c -+++ b/spa/plugins/alsa/alsa-utils.c -@@ -624,7 +624,21 @@ static int get_status(struct state *state, snd_pcm_uframes_t *delay, snd_pcm_ufr - static int update_time(struct state *state, uint64_t nsec, snd_pcm_sframes_t delay, - snd_pcm_sframes_t target, bool slave) - { -- double err, corr; -+ double err, corr, drift; -+ snd_pcm_sframes_t consumed; -+ -+ consumed = state->fill_level - delay; -+ if (state->alsa_started && consumed > 0) { -+ double sysclk_diff = nsec - state->last_time; -+ double devclk_diff = ((double) consumed) * 1e9 / state->rate; -+ drift = sysclk_diff / devclk_diff; -+ drift = SPA_CLAMP(drift, 0.6, 1.0); -+ -+ spa_log_trace_fp(state->log, "cons:%ld sclk:%f dclk:%f drift:%f", -+ consumed, sysclk_diff, devclk_diff, drift); -+ } else { -+ drift = 1.0; -+ } - - if (state->stream == SND_PCM_STREAM_PLAYBACK) - err = delay - target; -@@ -677,11 +691,11 @@ static int update_time(struct state *state, uint64_t nsec, snd_pcm_sframes_t del - state->clock->next_nsec = state->next_time; - } - -- spa_log_trace_fp(state->log, "slave:%d %"PRIu64" %f %ld %f %f %d", slave, nsec, -- corr, delay, err, state->threshold * corr, -+ spa_log_trace_fp(state->log, "slave:%d %"PRIu64" %f %ld %f %f %f %d", slave, nsec, -+ corr, delay, err, state->threshold * corr, drift, - state->threshold); - -- state->next_time += state->threshold / corr * 1e9 / state->rate; -+ state->next_time += state->threshold / corr * drift * 1e9 / state->rate; - state->last_threshold = state->threshold; - - return 0; -@@ -812,6 +826,10 @@ again: - goto again; - - state->sample_count += total_written; -+ state->fill_level += total_written; -+ -+ clock_gettime(CLOCK_MONOTONIC, &state->now); -+ state->last_time = SPA_TIMESPEC_TO_NSEC (&state->now); - - if (!state->alsa_started && total_written > 0) { - spa_log_trace(state->log, "snd_pcm_start %lu", written); -@@ -981,6 +999,8 @@ static int handle_play(struct state *state, uint64_t nsec, - if ((res = update_time(state, nsec, delay, target, false)) < 0) - return res; - -+ state->fill_level = delay; -+ - if (spa_list_is_empty(&state->ready)) { - struct spa_io_buffers *io = state->io; - -@@ -1120,6 +1140,7 @@ int spa_alsa_start(struct state *state) - - state->threshold = (state->duration * state->rate + state->rate_denom-1) / state->rate_denom; - state->last_threshold = state->threshold; -+ state->fill_level = 0; - - init_loop(state); - state->safety = 0.0; -diff --git a/spa/plugins/alsa/alsa-utils.h b/spa/plugins/alsa/alsa-utils.h -index 110d4204..bab0f67b 100644 ---- a/spa/plugins/alsa/alsa-utils.h -+++ b/spa/plugins/alsa/alsa-utils.h -@@ -141,7 +141,9 @@ struct state { - int64_t sample_time; - uint64_t next_time; - uint64_t base_time; -+ uint64_t last_time; - -+ snd_pcm_uframes_t fill_level; - uint64_t underrun; - double safety; - --- -2.23.0 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch index 84b35e64..b8ffbde5 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0003-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch @@ -1,4 +1,4 @@ -From 2570b2f404ce094098e2244833ab7dddf62d02a0 Mon Sep 17 00:00:00 2001 +From e2426512322768a2d386740845c80e282aba5a6a Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Tue, 19 Feb 2019 18:23:19 +0200 Subject: [PATCH] gst: Implement new pwaudio{src,sink} elements, based on diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0005-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch index 7d0bc5a2..bc6559f9 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0005-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch @@ -1,4 +1,4 @@ -From 9a01115acc2316908afaed004e2f042125b7f5e3 Mon Sep 17 00:00:00 2001 +From d2cd5c499528dcd0b6c25a4050a6b4d76c4aa459 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 11 Jul 2019 16:21:17 +0300 Subject: [PATCH] gst/pwaudioringbuffer: request pause/play on the appropriate diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0005-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch index 124a3804..eef08af8 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0005-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch @@ -1,4 +1,4 @@ -From f4903fe9c356b58737eb33fcfa389e006d18f801 Mon Sep 17 00:00:00 2001 +From df47442f5396897f8bdba5a37699d21f0e4da85f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 11 Jul 2019 16:34:35 +0300 Subject: [PATCH] gst/pwaudioringbuffer: wait only for STREAM_STATE_CONFIGURE diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0007-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch index 9ae8eab3..1f56b1c4 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0007-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch @@ -1,4 +1,4 @@ -From 4d8e0de16717f250d22b24f335df8f27c67f2c52 Mon Sep 17 00:00:00 2001 +From 30622ed39774d3a2d3133effbc73caac5fb12596 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 11 Jul 2019 17:07:15 +0300 Subject: [PATCH] gst/pwaudiosink: set the default latency time (buffer size) diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0008-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0007-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch index a6d7724f..c42e56b1 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0008-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0007-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch @@ -1,4 +1,4 @@ -From a9fb1fa9ce662ee3f06afda5fd9eb2182520ea4d Mon Sep 17 00:00:00 2001 +From 23e8913172cb50d8023aaa7522e196d087f9c785 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Tue, 20 Aug 2019 18:33:35 +0300 Subject: [PATCH] gst: pwaudioringbuffer: set node.latency to get scheduled diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0011-meson-revert-version-check-to-require-meson-0.47-not.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0008-meson-revert-version-check-to-require-meson-0.47-not.patch index 8471276b..462a680e 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0011-meson-revert-version-check-to-require-meson-0.47-not.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0008-meson-revert-version-check-to-require-meson-0.47-not.patch @@ -1,4 +1,4 @@ -From 544adb27b33843c0bb970ddb07485f57c2dad7a9 Mon Sep 17 00:00:00 2001 +From 6b65e729e7609b75f10cbb8e9db736f6273ea01b Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Sun, 22 Sep 2019 17:59:19 +0300 Subject: [PATCH] meson: revert version check to require meson 0.47, not 0.50 @@ -13,7 +13,7 @@ Upstream-Status: Inappropriate [workaround] 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 5cd61fde..51a839fa 100644 +index c0bb7470..07117cbb 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0009-alsa-do-not-expose-non-interleaved-formats-since-the.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0009-alsa-do-not-expose-non-interleaved-formats-since-the.patch deleted file mode 100644 index 8d8d4d11..00000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0009-alsa-do-not-expose-non-interleaved-formats-since-the.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b80645ad1b348a99b2cbdc170e122dc06d367ea9 Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis <george.kiagiadakis@collabora.com> -Date: Wed, 18 Sep 2019 12:31:36 +0300 -Subject: [PATCH] alsa: do not expose non-interleaved formats, since they won't - work - -This bug appeared when testing bluez-alsa nodes with pipewire. -bluez-alsa exposes also non-interleaved formats and if such a format -is picked, then nothing works because the converters are not working - -Upstream-Status: Inappropriate [workaround] ---- - spa/plugins/alsa/alsa-utils.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/spa/plugins/alsa/alsa-utils.c b/spa/plugins/alsa/alsa-utils.c -index e8548345..76c81c7c 100644 ---- a/spa/plugins/alsa/alsa-utils.c -+++ b/spa/plugins/alsa/alsa-utils.c -@@ -289,12 +289,14 @@ spa_alsa_enum_format(struct state *state, int seq, uint32_t start, uint32_t num, - spa_pod_builder_id(&b, fi->spa_format); - spa_pod_builder_id(&b, fi->spa_format); - } -+ /* - if (snd_pcm_access_mask_test(amask, SND_PCM_ACCESS_MMAP_NONINTERLEAVED) && - fi->spa_pformat != SPA_AUDIO_FORMAT_UNKNOWN) { - if (j++ == 0) - spa_pod_builder_id(&b, fi->spa_pformat); - spa_pod_builder_id(&b, fi->spa_pformat); - } -+ */ - } - } - if (j > 1) --- -2.23.0 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-extensions-implement-new-session-manager-extension.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0009-extensions-implement-new-session-manager-extension.patch index cdb030e1..325ade7a 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-extensions-implement-new-session-manager-extension.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0009-extensions-implement-new-session-manager-extension.patch @@ -1,4 +1,4 @@ -From acbce75de9587917cfa659ebc0e3404b6b1d4c29 Mon Sep 17 00:00:00 2001 +From cc47e191c42b836811c5fca1122505375a4e080b Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Thu, 23 May 2019 18:59:05 +0300 Subject: [PATCH] extensions: implement new session manager extension @@ -1102,10 +1102,10 @@ index 00000000..a7167510 + +#endif /* PIPEWIRE_EXT_SESSION_MANAGER_KEYS_H */ diff --git a/src/modules/meson.build b/src/modules/meson.build -index 9e1e94bd..da2684b6 100644 +index bec6f558..23e8bba3 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build -@@ -100,3 +100,20 @@ pipewire_module_adapter = shared_library('pipewire-module-adapter', +@@ -99,3 +99,20 @@ pipewire_module_adapter = shared_library('pipewire-module-adapter', install_dir : modules_install_dir, dependencies : [mathlib, dl_lib, rt_lib, pipewire_dep], ) @@ -5676,10 +5676,10 @@ index 00000000..ad0b9b1b + +#endif /* MODULE_SESSION_MANAGER_SESSION_H */ diff --git a/src/pipewire/pipewire.c b/src/pipewire/pipewire.c -index a7012ab2..ec5f1f85 100644 +index c556a1db..06ccccc3 100644 --- a/src/pipewire/pipewire.c +++ b/src/pipewire/pipewire.c -@@ -575,6 +575,12 @@ static const struct spa_type_info type_info[] = { +@@ -577,6 +577,12 @@ static const struct spa_type_info type_info[] = { { PW_TYPE_INTERFACE_Module, SPA_TYPE_Pointer, PW_TYPE_INFO_INTERFACE_BASE "Module", NULL }, { PW_TYPE_INTERFACE_ClientNode, SPA_TYPE_Pointer, PW_TYPE_INFO_INTERFACE_BASE "ClientNode", NULL }, { PW_TYPE_INTERFACE_Device, SPA_TYPE_Pointer, PW_TYPE_INFO_INTERFACE_BASE "Device", NULL }, diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-bluez-monitor-fix-usage-of-pw_properties_setf-withou.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-bluez-monitor-fix-usage-of-pw_properties_setf-withou.patch deleted file mode 100644 index 284d01d0..00000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-bluez-monitor-fix-usage-of-pw_properties_setf-withou.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6f3335cfc06053e3ea5598058e0a2581e7ffa4af Mon Sep 17 00:00:00 2001 -From: George Kiagiadakis <george.kiagiadakis@collabora.com> -Date: Sun, 22 Sep 2019 17:37:49 +0300 -Subject: [PATCH] bluez-monitor: fix usage of pw_properties_setf without a - format string - -Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/189] ---- - src/examples/bluez-monitor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/examples/bluez-monitor.c b/src/examples/bluez-monitor.c -index 1ae5ffe0..4bdfeb0d 100644 ---- a/src/examples/bluez-monitor.c -+++ b/src/examples/bluez-monitor.c -@@ -123,7 +123,7 @@ static struct bluez5_node *bluez5_create_node(struct bluez5_object *obj, uint32_ - - pw_properties_setf(node->props, PW_KEY_NODE_NAME, "%s.%s", info->factory_name, str); - pw_properties_set(node->props, PW_KEY_NODE_DESCRIPTION, str); -- pw_properties_setf(node->props, "factory.name", info->factory_name); -+ pw_properties_set(node->props, "factory.name", info->factory_name); - - node->monitor = monitor; - node->object = obj; --- -2.23.0 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0013-pipewire-cli-add-support-for-printing-endpoint-info-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-pipewire-cli-add-support-for-printing-endpoint-info-.patch index 8c71afb3..0456f84a 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0013-pipewire-cli-add-support-for-printing-endpoint-info-.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-pipewire-cli-add-support-for-printing-endpoint-info-.patch @@ -1,4 +1,4 @@ -From 1249a42d1380945fd8dc7924c1ac912570bef501 Mon Sep 17 00:00:00 2001 +From 76865803c2db13b753e1261e01de22760c7b398b Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Tue, 28 May 2019 11:46:36 +0300 Subject: [PATCH] pipewire-cli: add support for printing endpoint info & params diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0014-daemon-config-remote-load-module-session-manager-by-.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0011-daemon-config-remote-load-module-session-manager-by-.patch index 30066451..e42e62a2 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0014-daemon-config-remote-load-module-session-manager-by-.patch +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0011-daemon-config-remote-load-module-session-manager-by-.patch @@ -1,4 +1,4 @@ -From a7379880b3cb14ce81cbb3475b1b251df60c86f8 Mon Sep 17 00:00:00 2001 +From f451147ffc1f89f4c0f705ac5c444e614dbff22a Mon Sep 17 00:00:00 2001 From: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Fri, 9 Aug 2019 13:26:15 +0300 Subject: [PATCH] daemon config & remote: load module-session-manager by @@ -11,17 +11,17 @@ Upstream-Status: Pending 2 files changed, 2 insertions(+) diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in -index 079ec730..19c898b9 100644 +index 174ae97d..bf64c574 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in -@@ -21,4 +21,5 @@ load-module libpipewire-module-client-device +@@ -23,4 +23,5 @@ load-module libpipewire-module-client-device load-module libpipewire-module-access load-module libpipewire-module-adapter load-module libpipewire-module-link-factory +load-module libpipewire-module-session-manager exec build/src/examples/media-session diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c -index 2b545f79..62841e58 100644 +index fe62582c..e89474b0 100644 --- a/src/pipewire/remote.c +++ b/src/pipewire/remote.c @@ -242,6 +242,7 @@ struct pw_remote *pw_remote_new(struct pw_core *core, diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-audioconvert-always-assume-that-output-ports-are-NOT.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-audioconvert-always-assume-that-output-ports-are-NOT.patch new file mode 100644 index 00000000..06ffb3d7 --- /dev/null +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0012-audioconvert-always-assume-that-output-ports-are-NOT.patch @@ -0,0 +1,35 @@ +From a95e87cd47de3585d9f4ef77b75c4a077bd95f78 Mon Sep 17 00:00:00 2001 +From: George Kiagiadakis <george.kiagiadakis@collabora.com> +Date: Wed, 2 Oct 2019 21:40:34 +0300 +Subject: [PATCH] audioconvert: always assume that output ports are NOT monitor + ports + +Otherwise, when we setup audioconvert in merge+split mode, +it assumes that the splitter's ports are monitor ports and +belong to the merger. + +Upstream-Status: Inappropriate [workaround] +--- + spa/plugins/audioconvert/audioconvert.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c +index 0859bf73..ac4dceef 100644 +--- a/spa/plugins/audioconvert/audioconvert.c ++++ b/spa/plugins/audioconvert/audioconvert.c +@@ -109,8 +109,12 @@ struct impl { + unsigned int add_listener:1; + }; + ++#if 0 + #define IS_MONITOR_PORT(this,dir,port_id) (dir == SPA_DIRECTION_OUTPUT && port_id > 0 && \ + this->mode[SPA_DIRECTION_INPUT] == SPA_PARAM_PORT_CONFIG_MODE_dsp) ++#else ++#define IS_MONITOR_PORT(this,dir,port_id) (false) ++#endif + + static void emit_node_info(struct impl *this, bool full) + { +-- +2.23.0 + diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0015-connection-move-remaining-data-and-fds.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0015-connection-move-remaining-data-and-fds.patch deleted file mode 100644 index 925dff78..00000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0015-connection-move-remaining-data-and-fds.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 1b739247dcab62d1da45109cf805b8a840307ccc Mon Sep 17 00:00:00 2001 -From: Wim Taymans <wtaymans@redhat.com> -Date: Tue, 1 Oct 2019 10:43:48 +0200 -Subject: [PATCH] connection: move remaining data and fds - -If we can't send all of the data, move the remaining data to the -start of the buffer so that we can send it again later. - -See #111 - -Upstream-Status: Backport [3d48ba8394396fc8d8cadb1bff3514217ddd70e6] ---- - .../module-protocol-native/connection.c | 23 +++++++++++-------- - 1 file changed, 14 insertions(+), 9 deletions(-) - -diff --git a/src/modules/module-protocol-native/connection.c b/src/modules/module-protocol-native/connection.c -index f51129df..7b6cf112 100644 ---- a/src/modules/module-protocol-native/connection.c -+++ b/src/modules/module-protocol-native/connection.c -@@ -500,8 +500,12 @@ int pw_protocol_native_connection_flush(struct pw_protocol_native_connection *co - if (sent < 0) { - if (errno == EINTR) - continue; -- else -- goto send_error; -+ else { -+ res = -errno; -+ pw_log_error("could not sendmsg on fd:%d n_fds:%d: %s", -+ conn->fd, n_fds, spa_strerror(res)); -+ goto exit; -+ } - } - break; - } -@@ -513,15 +517,16 @@ int pw_protocol_native_connection_flush(struct pw_protocol_native_connection *co - n_fds -= outfds; - fds += outfds; - } -- buf->buffer_size = size; -- buf->n_fds = n_fds; - -- return 0; -+ res = 0; - -- /* ERRORS */ --send_error: -- res = -errno; -- pw_log_error("could not sendmsg on fd:%d n_fds:%d: %s", conn->fd, n_fds, strerror(errno)); -+exit: -+ if (size > 0) -+ memmove(buf->buffer_data, data, size); -+ buf->buffer_size = size; -+ if (n_fds > 0) -+ memmove(buf->fds, fds, n_fds * sizeof(int)); -+ buf->n_fds = n_fds; - return res; - } - --- -2.23.0 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0016-protocol-improve-flushing.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0016-protocol-improve-flushing.patch deleted file mode 100644 index 124434e2..00000000 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0016-protocol-improve-flushing.patch +++ /dev/null @@ -1,243 +0,0 @@ -From dffeeeb74f5b0a0385c4131b7ff349ff04fcebce Mon Sep 17 00:00:00 2001 -From: Wim Taymans <wtaymans@redhat.com> -Date: Tue, 1 Oct 2019 12:53:56 +0200 -Subject: [PATCH] protocol: improve flushing - -Use the IO_OUT flag to schedule flushing instead of a flush_event. - -Handle EGAIN and wait for IO_OUT to try again. - -Fixes #111 - -Upstream-Status: Backport [cc8e992cd155b4f19312a5036c7b744fc547410f] ---- - src/modules/module-protocol-native.c | 99 ++++++++++++------- - .../module-protocol-native/connection.c | 2 - - 2 files changed, 62 insertions(+), 39 deletions(-) - -diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c -index cc8501d5..be2d4f57 100644 ---- a/src/modules/module-protocol-native.c -+++ b/src/modules/module-protocol-native.c -@@ -82,9 +82,8 @@ struct client { - struct pw_protocol_native_connection *connection; - struct spa_hook conn_listener; - -- struct spa_source *flush_event; - unsigned int disconnecting:1; -- unsigned int flush_signaled:1; -+ unsigned int flushing:1; - }; - - struct server { -@@ -106,6 +105,7 @@ struct client_data { - struct spa_source *source; - struct pw_protocol_native_connection *connection; - unsigned int busy:1; -+ unsigned int need_flush:1; - }; - - static void -@@ -200,12 +200,14 @@ client_busy_changed(void *data, bool busy) - { - struct client_data *c = data; - struct pw_client *client = c->client; -- uint32_t mask = SPA_IO_ERR | SPA_IO_HUP; -+ uint32_t mask = c->source->mask; - - c->busy = busy; - -- if (!busy) -- mask |= SPA_IO_IN; -+ if (busy) -+ SPA_FLAG_UNSET(mask, SPA_IO_IN); -+ else -+ SPA_FLAG_SET(mask, SPA_IO_IN); - - pw_log_debug(NAME" %p: busy changed %d", client->protocol, busy); - pw_loop_update_io(client->core->main_loop, c->source, mask); -@@ -220,13 +222,32 @@ connection_data(void *data, int fd, uint32_t mask) - { - struct client_data *this = data; - struct pw_client *client = this->client; -+ int res; - -- if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { -+ if (mask & SPA_IO_HUP) { - pw_log_info(NAME" %p: client %p disconnected", client->protocol, client); - pw_client_destroy(client); - return; - } -- -+ if (mask & SPA_IO_ERR) { -+ pw_log_error(NAME" %p: client %p error", client->protocol, client); -+ pw_client_destroy(client); -+ return; -+ } -+ if (mask & SPA_IO_OUT) { -+ res = pw_protocol_native_connection_flush(this->connection); -+ if (res >= 0) { -+ int mask = this->source->mask; -+ SPA_FLAG_UNSET(mask, SPA_IO_OUT); -+ pw_loop_update_io(client->protocol->core->main_loop, -+ this->source, mask); -+ } else if (res != EAGAIN) { -+ pw_log_error("client %p: could not flush: %s", -+ client, spa_strerror(res)); -+ pw_client_destroy(client); -+ return; -+ } -+ } - if (mask & SPA_IO_IN) - process_messages(this); - } -@@ -296,7 +317,8 @@ static struct pw_client *client_new(struct server *s, int fd) - - this->client = client; - this->source = pw_loop_add_io(pw_core_get_main_loop(core), -- fd, SPA_IO_ERR | SPA_IO_HUP, true, connection_data, this); -+ fd, SPA_IO_ERR | SPA_IO_HUP, true, -+ connection_data, this); - if (this->source == NULL) - goto cleanup_client; - -@@ -408,7 +430,7 @@ socket_data(void *data, int fd, uint32_t mask) - - if (!client->busy) - pw_loop_update_io(client->protocol->core->main_loop, -- c->source, SPA_IO_IN | SPA_IO_ERR | SPA_IO_HUP); -+ c->source, c->source->mask | SPA_IO_IN); - } - - static int add_socket(struct pw_protocol *protocol, struct server *s) -@@ -514,6 +536,17 @@ on_remote_data(void *data, int fd, uint32_t mask) - res = -EPIPE; - goto error; - } -+ if (mask & SPA_IO_OUT) { -+ res = pw_protocol_native_connection_flush(conn); -+ if (res >= 0) { -+ int mask = impl->source->mask; -+ SPA_FLAG_UNSET(mask, SPA_IO_OUT); -+ pw_loop_update_io(core->main_loop, -+ impl->source, mask); -+ impl->flushing = false; -+ } else if (res != EAGAIN) -+ goto error; -+ } - - if (mask & SPA_IO_IN) { - const struct pw_protocol_native_message *msg; -@@ -588,23 +621,17 @@ error: - } - - --static void do_flush_event(void *data, uint64_t count) --{ -- struct client *impl = data; -- impl->flush_signaled = false; -- if (impl->connection) -- if (pw_protocol_native_connection_flush(impl->connection) < 0) -- impl->this.disconnect(&impl->this); --} -- - static void on_need_flush(void *data) - { - struct client *impl = data; - struct pw_remote *remote = impl->this.remote; - -- if (!impl->flush_signaled) { -- impl->flush_signaled = true; -- pw_loop_signal_event(remote->core->main_loop, impl->flush_event); -+ if (!impl->flushing) { -+ int mask = impl->source->mask; -+ impl->flushing = true; -+ SPA_FLAG_SET(mask, SPA_IO_OUT); -+ pw_loop_update_io(remote->core->main_loop, -+ impl->source, mask); - } - } - -@@ -669,12 +696,9 @@ static void impl_disconnect(struct pw_protocol_client *client) - static void impl_destroy(struct pw_protocol_client *client) - { - struct client *impl = SPA_CONTAINER_OF(client, struct client, this); -- struct pw_remote *remote = client->remote; - - impl_disconnect(client); - -- pw_loop_destroy_source(remote->core->main_loop, impl->flush_event); -- - spa_list_remove(&client->link); - free(impl); - } -@@ -687,7 +711,6 @@ impl_new_client(struct pw_protocol *protocol, - struct client *impl; - struct pw_protocol_client *this; - const char *str = NULL; -- int res; - - if ((impl = calloc(1, sizeof(struct client))) == NULL) - return NULL; -@@ -711,20 +734,9 @@ impl_new_client(struct pw_protocol *protocol, - this->disconnect = impl_disconnect; - this->destroy = impl_destroy; - -- impl->flush_event = pw_loop_add_event(remote->core->main_loop, do_flush_event, impl); -- if (impl->flush_event == NULL) { -- res = -errno; -- goto error_cleanup; -- } -- - spa_list_append(&protocol->client_list, &this->link); - - return this; -- --error_cleanup: -- free(impl); -- errno = -res; -- return NULL; - } - - static void destroy_server(struct pw_protocol_server *server) -@@ -757,10 +769,23 @@ static void on_before_hook(void *_data) - struct pw_protocol_server *this = &server->this; - struct pw_client *client, *tmp; - struct client_data *data; -+ int res; - - spa_list_for_each_safe(client, tmp, &this->client_list, protocol_link) { - data = client->user_data; -- pw_protocol_native_connection_flush(data->connection); -+ -+ res = pw_protocol_native_connection_flush(data->connection); -+ if (res == -EAGAIN) { -+ int mask = data->source->mask; -+ SPA_FLAG_SET(mask, SPA_IO_OUT); -+ pw_loop_update_io(client->protocol->core->main_loop, -+ data->source, mask); -+ } else if (res < 0) { -+ pw_log_warn("client %p: could not flush: %s", -+ data->client, spa_strerror(res)); -+ pw_client_destroy(client); -+ } -+ - } - } - -diff --git a/src/modules/module-protocol-native/connection.c b/src/modules/module-protocol-native/connection.c -index 7b6cf112..116457e3 100644 ---- a/src/modules/module-protocol-native/connection.c -+++ b/src/modules/module-protocol-native/connection.c -@@ -502,8 +502,6 @@ int pw_protocol_native_connection_flush(struct pw_protocol_native_connection *co - continue; - else { - res = -errno; -- pw_log_error("could not sendmsg on fd:%d n_fds:%d: %s", -- conn->fd, n_fds, spa_strerror(res)); - goto exit; - } - } --- -2.23.0 - diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb index e006f14a..ce7e523c 100644 --- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb +++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb @@ -1,27 +1,23 @@ require pipewire.inc -SRC_URI = "gitsm://github.com/PipeWire/pipewire;protocol=https;branch=work \ +SRC_URI = "gitsm://github.com/PipeWire/pipewire;protocol=https;branch=master \ file://0001-arm-build-with-mno-unaligned-access.patch \ file://0002-logger-print-timestamps-on-logged-messages.patch \ - file://0003-alsa-make-corrections-on-the-timeout-based-on-how-fa.patch \ - file://0004-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch \ - file://0005-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch \ - file://0006-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch \ - file://0007-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch \ - file://0008-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch \ - file://0009-alsa-do-not-expose-non-interleaved-formats-since-the.patch \ - file://0010-bluez-monitor-fix-usage-of-pw_properties_setf-withou.patch \ - file://0011-meson-revert-version-check-to-require-meson-0.47-not.patch \ - file://0012-extensions-implement-new-session-manager-extension.patch \ - file://0013-pipewire-cli-add-support-for-printing-endpoint-info-.patch \ - file://0014-daemon-config-remote-load-module-session-manager-by-.patch \ - file://0015-connection-move-remaining-data-and-fds.patch \ - file://0016-protocol-improve-flushing.patch \ + file://0003-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch \ + file://0004-gst-pwaudioringbuffer-request-pause-play-on-the-appr.patch \ + file://0005-gst-pwaudioringbuffer-wait-only-for-STREAM_STATE_CON.patch \ + file://0006-gst-pwaudiosink-set-the-default-latency-time-buffer-.patch \ + file://0007-gst-pwaudioringbuffer-set-node.latency-to-get-schedu.patch \ + file://0008-meson-revert-version-check-to-require-meson-0.47-not.patch \ + file://0009-extensions-implement-new-session-manager-extension.patch \ + file://0010-pipewire-cli-add-support-for-printing-endpoint-info-.patch \ + file://0011-daemon-config-remote-load-module-session-manager-by-.patch \ + file://0012-audioconvert-always-assume-that-output-ports-are-NOT.patch \ " -SRCREV = "d3c7acb137134bddff3bc8a8964600252d3fb674" +SRCREV = "5693d72fcb0a0290faedcce64c57a3820a5cc660" -PV = "0.2.90+git${SRCPV}+2" +PV = "0.2.91+git${SRCPV}+1" S = "${WORKDIR}/git" RDEPENDS_${PN} += "virtual/pipewire-sessionmanager virtual/pipewire-config" |