summaryrefslogtreecommitdiff
path: root/media-video/pipewire/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-25 10:31:10 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-25 10:31:10 +0000
commit2900e684ae4bdce1f20652587728095cd01a30a1 (patch)
treedb7b5054b7d0de362a2960a0a7268ffc37b8e1f9 /media-video/pipewire/files
parentff8c6e4babf1a2911b8d61b6bb7e80290355cb70 (diff)
gentoo auto-resync : 25:11:2023 - 10:31:10
Diffstat (limited to 'media-video/pipewire/files')
-rw-r--r--media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch83
-rw-r--r--media-video/pipewire/files/0.3.75/0002-thread-loop-only-signal-when-option-set.patch68
-rw-r--r--media-video/pipewire/files/0.3.75/0003-missing-include-version.h.patch21
-rw-r--r--media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch69
-rw-r--r--media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch27
-rw-r--r--media-video/pipewire/files/0.3.82/0003-context-relax-quantum-change-conditions.patch37
-rw-r--r--media-video/pipewire/files/0.3.83/0001-stream-improve-queued_buffers-reporting.patch53
-rw-r--r--media-video/pipewire/files/0.3.83/0002-module-echo-cancel-playback-source-async.patch36
-rw-r--r--media-video/pipewire/files/0.3.83/0003-alsa-guard-against-null-areas.patch52
9 files changed, 0 insertions, 446 deletions
diff --git a/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch b/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch
deleted file mode 100644
index 8885eb8a564f..000000000000
--- a/media-video/pipewire/files/0.3.75/0001-module-rt-error-out-on-load-no-bus.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-https://bugs.gentoo.org/910714
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/55812195ce3b77317e7a2dc642b78271f3a45c8e
-
-From 55812195ce3b77317e7a2dc642b78271f3a45c8e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com>
-Date: Sat, 22 Jul 2023 01:20:58 +0000
-Subject: [PATCH] module-rt: error out on load if no bus is available
-
-Since the recent changes to the RT module in Pipewire 0.3.75, some
-applications such as those using OpenAL-Soft crash on startup if
-neither the session nor the system bus is available. For example:
-
- bwrap --dev-bind / / \
- --bind /dev/null /run/dbus/system_bus_socket \
- --bind /dev/null $XDG_RUNTIME_DIR/bus \
- openal-info
-
-Will result in a crash with the following error message:
-
- dbus[1626147]: arguments to dbus_message_new_method_call() were
- incorrect, assertion "path != NULL" failed in file dbus-message.c
- line 1373.
- This is normally a bug in some application using the D-Bus library.
-
-The RT module previously failed to load if no bus was available, but
-after the recent changes, the init. logic runs in a thread, and failing
-to obtain the bus no longer causes the module to fail to load.
-
-Then, functions called later such as `pw_rtkit_make_realtime` assume
-the bus is available and try to use it, causing the error above.
-
-Put the logic for obtaining and checking the bus back to `module_init`,
-so the module fails to load again if no bus is available.
---- a/src/modules/module-rt.c
-+++ b/src/modules/module-rt.c
-@@ -923,14 +923,11 @@ static int check_rtkit(struct impl *impl, struct pw_context *context, bool *can_
- return 0;
- }
-
--static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
-- const void *data, size_t size, void *user_data)
-+static int rtkit_get_bus(struct impl *impl)
- {
-- struct impl *impl = user_data;
- int res;
-- long long retval;
-
-- pw_log_debug("enter rtkit setup");
-+ pw_log_debug("enter rtkit get bus");
-
- /* Checking xdg-desktop-portal. It works fine in all situations. */
- if (impl->rtportal_enabled)
-@@ -967,6 +964,18 @@ static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
- return res;
- }
- }
-+
-+ return 0;
-+}
-+
-+static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
-+ const void *data, size_t size, void *user_data)
-+{
-+ struct impl *impl = user_data;
-+ long long retval;
-+
-+ pw_log_debug("enter rtkit setup");
-+
- /* get some properties */
- if (rtkit_get_int_property(impl, "MaxRealtimePriority", &retval) < 0) {
- retval = 1;
-@@ -1076,6 +1085,9 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
- #ifdef HAVE_DBUS
- impl->use_rtkit = use_rtkit;
- if (impl->use_rtkit) {
-+ if ((res = rtkit_get_bus(impl)) < 0)
-+ goto error;
-+
- impl->thread_loop = pw_thread_loop_new("module-rt", NULL);
- if (impl->thread_loop == NULL) {
- res = -errno;
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.75/0002-thread-loop-only-signal-when-option-set.patch b/media-video/pipewire/files/0.3.75/0002-thread-loop-only-signal-when-option-set.patch
deleted file mode 100644
index 670847b2f86a..000000000000
--- a/media-video/pipewire/files/0.3.75/0002-thread-loop-only-signal-when-option-set.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-https://github.com/mpv-player/mpv/issues/11995
-https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3374
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/920bb7160e0be0ce5729d9538f6dea966f297603
-
-From 920bb7160e0be0ce5729d9538f6dea966f297603 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Sun, 23 Jul 2023 18:16:00 +0200
-Subject: [PATCH] thread-loop: only signal when option is set
-
-Add a thead-loop.start-signal option that will do a signal before
-entering the thread loop. Doing the signal in all cases can confuse
-apps that don't expect the signal.
-
-Make module-rt use the thread-loop.start-signal.
-
-Fixes #3374
---- a/src/modules/module-rt.c
-+++ b/src/modules/module-rt.c
-@@ -1085,10 +1085,14 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
- #ifdef HAVE_DBUS
- impl->use_rtkit = use_rtkit;
- if (impl->use_rtkit) {
-+ struct spa_dict_item items[] = {
-+ { "thread-loop.start-signal", "true" }
-+ };
- if ((res = rtkit_get_bus(impl)) < 0)
- goto error;
-
-- impl->thread_loop = pw_thread_loop_new("module-rt", NULL);
-+ impl->thread_loop = pw_thread_loop_new("module-rt",
-+ &SPA_DICT_INIT_ARRAY(items));
- if (impl->thread_loop == NULL) {
- res = -errno;
- goto error;
---- a/src/pipewire/thread-loop.c
-+++ b/src/pipewire/thread-loop.c
-@@ -43,6 +43,7 @@ struct pw_thread_loop {
- int n_waiting_for_accept;
- unsigned int created:1;
- unsigned int running:1;
-+ unsigned int start_signal:1;
- };
- /** \endcond */
-
-@@ -143,6 +144,11 @@ static struct pw_thread_loop *loop_new(struct pw_loop *loop,
- return NULL;
-
- pw_log_debug("%p: new name:%s", this, name);
-+ if (props != NULL) {
-+ const char *str = spa_dict_lookup(props, "thread-loop.start-signal");
-+ if (str != NULL)
-+ this->start_signal = spa_atob(str);
-+ }
-
- if (loop == NULL) {
- loop = pw_loop_new(props);
-@@ -282,7 +288,8 @@ static void *do_loop(void *user_data)
- pw_log_debug("%p: enter thread", this);
- pw_loop_enter(this->loop);
-
-- pw_thread_loop_signal(this, false);
-+ if (this->start_signal)
-+ pw_thread_loop_signal(this, false);
-
- while (this->running) {
- if ((res = pw_loop_iterate(this->loop, -1)) < 0) {
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.75/0003-missing-include-version.h.patch b/media-video/pipewire/files/0.3.75/0003-missing-include-version.h.patch
deleted file mode 100644
index b1c688bba343..000000000000
--- a/media-video/pipewire/files/0.3.75/0003-missing-include-version.h.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/193384b26aba3917d086ac3f009aa2cab9d197d2
-
-From 193384b26aba3917d086ac3f009aa2cab9d197d2 Mon Sep 17 00:00:00 2001
-From: "Tom A. Wagner" <tom.a.wagner@protonmail.com>
-Date: Mon, 24 Jul 2023 12:48:33 +0200
-Subject: [PATCH] pipewire: add missing stdbool.h include to version.h.in
-
-The header file only works when included in a file where stdbool.h was already included otherwise.
---- a/src/pipewire/version.h.in
-+++ b/src/pipewire/version.h.in
-@@ -11,6 +11,8 @@
- extern "C" {
- #endif
-
-+#include <stdbool.h>
-+
- /** Return the version of the header files. Keep in mind that this is
- a macro and not a function, so it is impossible to get the pointer of
- it. */
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch b/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch
deleted file mode 100644
index 12192fc8678a..000000000000
--- a/media-video/pipewire/files/0.3.82/0001-alsa-Ignore-PCM-devices-with-udev-env-ACP_IGNORE.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/fd969dab2878836fd8e9ac7d8fb92d1ede594f37
-
-From fd969dab2878836fd8e9ac7d8fb92d1ede594f37 Mon Sep 17 00:00:00 2001
-From: Hector Martin <marcan@marcan.st>
-Date: Sat, 14 Oct 2023 14:11:15 +0900
-Subject: [PATCH] alsa: Ignore PCM devices with udev env ACP_IGNORE
-
-When checking that a card has all of its PCM devices available, ignore
-any specific device with the ACP_IGNORE udev environment variable. This
-mirrors how we ignore whole cards, but specifically allows non-PipeWire
-software to own specific PCM devices.
-
-Note that this does not actually stop PipeWire from using those
-subdevices right now, we assume UCM configs take care of that. This
-should probably be implemented later to ensure PipeWire always stays
-away from them, but for now this fixes the issue where it refuses to
-probe the entire card.
-
-Fixes: #3570
-
-Signed-off-by: Hector Martin <marcan@marcan.st>
----
- spa/plugins/alsa/alsa-udev.c | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
-diff --git a/spa/plugins/alsa/alsa-udev.c b/spa/plugins/alsa/alsa-udev.c
-index 3048d7363..58ff5032d 100644
---- a/spa/plugins/alsa/alsa-udev.c
-+++ b/spa/plugins/alsa/alsa-udev.c
-@@ -329,6 +329,27 @@ static int get_num_compress_offload_devices(unsigned int card_nr)
- return errno != 0 ? -errno : num_dev;
- }
-
-+static int check_udev_environment(struct udev *udev, const char *devname)
-+{
-+ char path[PATH_MAX];
-+ struct udev_device *dev;
-+ int ret = 0;
-+
-+ /* Check for ACP_IGNORE on a specific PCM device (not the whole card) */
-+ spa_scnprintf(path, sizeof(path), "/sys/class/sound/%s", devname);
-+
-+ dev = udev_device_new_from_syspath(udev, path);
-+ if (dev == NULL)
-+ return 0;
-+
-+ if (udev_device_get_property_value(dev, "ACP_IGNORE"))
-+ ret = -ENXIO;
-+
-+ udev_device_unref(dev);
-+
-+ return ret;
-+}
-+
- static int check_pcm_device_availability(struct impl *this, struct card *card,
- int *num_pcm_devices)
- {
-@@ -376,6 +397,9 @@ static int check_pcm_device_availability(struct impl *this, struct card *card,
- card->card_nr, entry->d_name+3);
- if (check_device_pcm_class(path) < 0)
- continue;
-+ /* Check udev environment */
-+ if (check_udev_environment(this->udev, path) < 0)
-+ continue;
-
- /* Check busy status */
- spa_scnprintf(path, sizeof(path), "/proc/asound/card%u/%s",
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch b/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch
deleted file mode 100644
index c24b63036315..000000000000
--- a/media-video/pipewire/files/0.3.82/0002-alsa-don-t-try-to-link-when-prepare-fails.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/840a9487a404916b18bf945662720e8a6d5b3716
-
-From 840a9487a404916b18bf945662720e8a6d5b3716 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Mon, 16 Oct 2023 10:32:51 +0200
-Subject: [PATCH] alsa: don't try to link when prepare fails
-
----
- spa/plugins/alsa/alsa-pcm.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
-index fbd67cf86..df40ea9e5 100644
---- a/spa/plugins/alsa/alsa-pcm.c
-+++ b/spa/plugins/alsa/alsa-pcm.c
-@@ -3042,7 +3042,8 @@ 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 (spa_alsa_prepare(follower) < 0)
-+ continue;
- if (!follower->linked && state->auto_link)
- do_link(state, follower);
- }
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.82/0003-context-relax-quantum-change-conditions.patch b/media-video/pipewire/files/0.3.82/0003-context-relax-quantum-change-conditions.patch
deleted file mode 100644
index 5827c25c9afc..000000000000
--- a/media-video/pipewire/files/0.3.82/0003-context-relax-quantum-change-conditions.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/19b02003b051878e46e93584a0eb60420a38abe1
-
-From 19b02003b051878e46e93584a0eb60420a38abe1 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Mon, 16 Oct 2023 16:18:18 +0200
-Subject: [PATCH] context: relax quantum change conditions
-
-We can change the quantum of a node while it is running just fine so
-relax the check.
-
-This was copied from the rate change logic, which is avoided while the
-node is running.
-
-This fixes a regression in dynamic quantum switching.
-
-Fixes #3574
----
- src/pipewire/context.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/pipewire/context.c b/src/pipewire/context.c
-index 1f5eaf296..e5ac4076a 100644
---- a/src/pipewire/context.c
-+++ b/src/pipewire/context.c
-@@ -1473,9 +1473,7 @@ again:
- }
-
- current_quantum = n->target_quantum;
-- if (!restore_quantum &&
-- (lock_quantum || need_resume || !running ||
-- (!force_quantum && (n->info.state > PW_NODE_STATE_IDLE)))) {
-+ if (!restore_quantum && (lock_quantum || need_resume || !running)) {
- pw_log_debug("%p: keep quantum:%u restore:%u lock:%u resume:%u "
- "running:%u force:%u state:%s", context,
- current_quantum, restore_quantum, lock_quantum, need_resume,
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.83/0001-stream-improve-queued_buffers-reporting.patch b/media-video/pipewire/files/0.3.83/0001-stream-improve-queued_buffers-reporting.patch
deleted file mode 100644
index 029a7930a60e..000000000000
--- a/media-video/pipewire/files/0.3.83/0001-stream-improve-queued_buffers-reporting.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3592
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/3d8c7c40b5cc16eaf7bd1fb72c17783ce42e2d0e
-
-From 3d8c7c40b5cc16eaf7bd1fb72c17783ce42e2d0e Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Fri, 20 Oct 2023 09:57:52 +0200
-Subject: [PATCH] stream: improve queued_buffers reporting
-
-Also add the queued buffers in the converter to the pw_time.queued_buffers
-field. This means that queued_buffers + avail_buffers always equal the
-total amount of allocated buffers, which makes more sense.
-
-Fixes #3592
---- a/src/pipewire/stream.c
-+++ b/src/pipewire/stream.c
-@@ -2340,6 +2340,7 @@ int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t
- struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
- uintptr_t seq1, seq2;
- uint32_t buffered, quantum, index;
-+ int32_t avail_buffers;
-
- do {
- seq1 = SPA_SEQ_READ(impl->seq);
-@@ -2358,19 +2359,23 @@ int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t
- time->delay += (impl->latency.min_rate + impl->latency.max_rate) / 2;
- time->delay += ((impl->latency.min_ns + impl->latency.max_ns) / 2) * time->rate.denom / SPA_NSEC_PER_SEC;
-
-+ avail_buffers = spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index);
-+ avail_buffers = SPA_CLAMP(avail_buffers, 0, (int32_t)impl->n_buffers);
-+
- if (size >= offsetof(struct pw_time, queued_buffers))
- time->buffered = buffered;
- if (size >= offsetof(struct pw_time, avail_buffers))
-- time->queued_buffers = spa_ringbuffer_get_read_index(&impl->queued.ring, &index);
-+ time->queued_buffers = impl->n_buffers - avail_buffers;
- if (size >= sizeof(struct pw_time))
-- time->avail_buffers = spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index);
-+ time->avail_buffers = avail_buffers;
-
- pw_log_trace_fp("%p: %"PRIi64" %"PRIi64" %"PRIu64" %d/%d %"PRIu64" %"
-- PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, stream,
-+ PRIu64" %"PRIu64" %"PRIu64" %"PRIu64" %d/%d", stream,
- time->now, time->delay, time->ticks,
- time->rate.num, time->rate.denom, time->queued,
- impl->dequeued.outcount, impl->dequeued.incount,
-- impl->queued.outcount, impl->queued.incount);
-+ impl->queued.outcount, impl->queued.incount,
-+ avail_buffers, impl->n_buffers);
- return 0;
- }
-
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.83/0002-module-echo-cancel-playback-source-async.patch b/media-video/pipewire/files/0.3.83/0002-module-echo-cancel-playback-source-async.patch
deleted file mode 100644
index ee96f949a2bb..000000000000
--- a/media-video/pipewire/files/0.3.83/0002-module-echo-cancel-playback-source-async.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3593
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/93d5848031cd9101d830fb4c37c5a7404ac5f276
-
-From 93d5848031cd9101d830fb4c37c5a7404ac5f276 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Sat, 21 Oct 2023 09:27:43 +0200
-Subject: [PATCH] module-echo-cancel: playback and source are async
-
-The playback and source streams don't dequeue/queue buffers from
-the process function and so need to be marked async.
-
-Fixes #3593
---- a/src/modules/module-echo-cancel.c
-+++ b/src/modules/module-echo-cancel.c
-@@ -1002,7 +1002,8 @@ static int setup_streams(struct impl *impl)
- PW_DIRECTION_OUTPUT,
- PW_ID_ANY,
- PW_STREAM_FLAG_MAP_BUFFERS |
-- PW_STREAM_FLAG_RT_PROCESS,
-+ PW_STREAM_FLAG_RT_PROCESS |
-+ PW_STREAM_FLAG_ASYNC,
- params, n_params)) < 0) {
- spa_pod_dynamic_builder_clean(&b);
- return res;
-@@ -1036,7 +1037,8 @@ static int setup_streams(struct impl *impl)
- PW_ID_ANY,
- PW_STREAM_FLAG_AUTOCONNECT |
- PW_STREAM_FLAG_MAP_BUFFERS |
-- PW_STREAM_FLAG_RT_PROCESS,
-+ PW_STREAM_FLAG_RT_PROCESS |
-+ PW_STREAM_FLAG_ASYNC,
- params, n_params)) < 0) {
- spa_pod_dynamic_builder_clean(&b);
- return res;
---
-GitLab
diff --git a/media-video/pipewire/files/0.3.83/0003-alsa-guard-against-null-areas.patch b/media-video/pipewire/files/0.3.83/0003-alsa-guard-against-null-areas.patch
deleted file mode 100644
index e16b44538b1b..000000000000
--- a/media-video/pipewire/files/0.3.83/0003-alsa-guard-against-null-areas.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3600
-https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/920beea3eb55ee7156bd8c00a201bdcafa0df5b0
-
-From 920beea3eb55ee7156bd8c00a201bdcafa0df5b0 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Sun, 22 Oct 2023 17:26:25 +0200
-Subject: [PATCH] alsa: guard agaist NULL areas
-
-snd_pcm_ioplug_mmap_areas() can fail and return NULL
-
-Fixes #3600
---- a/pipewire-alsa/alsa-plugins/pcm_pipewire.c
-+++ b/pipewire-alsa/alsa-plugins/pcm_pipewire.c
-@@ -309,21 +309,21 @@ snd_pcm_pipewire_process(snd_pcm_pipewire_t *pw, struct pw_buffer *b,
- xfer = nframes;
- if (xfer > 0) {
- const snd_pcm_channel_area_t *areas = snd_pcm_ioplug_mmap_areas(io);
-- const snd_pcm_uframes_t offset = hw_ptr % io->buffer_size;
--
-- if (io->stream == SND_PCM_STREAM_PLAYBACK)
-- snd_pcm_areas_copy_wrap(pwareas, 0, nframes,
-- areas, offset,
-- io->buffer_size,
-- io->channels, xfer,
-- io->format);
-- else
-- snd_pcm_areas_copy_wrap(areas, offset,
-- io->buffer_size,
-- pwareas, 0, nframes,
-- io->channels, xfer,
-- io->format);
--
-+ if (areas != NULL) {
-+ const snd_pcm_uframes_t offset = hw_ptr % io->buffer_size;
-+ if (io->stream == SND_PCM_STREAM_PLAYBACK)
-+ snd_pcm_areas_copy_wrap(pwareas, 0, nframes,
-+ areas, offset,
-+ io->buffer_size,
-+ io->channels, xfer,
-+ io->format);
-+ else
-+ snd_pcm_areas_copy_wrap(areas, offset,
-+ io->buffer_size,
-+ pwareas, 0, nframes,
-+ io->channels, xfer,
-+ io->format);
-+ }
- hw_ptr += xfer;
- if (hw_ptr >= pw->boundary)
- hw_ptr -= pw->boundary;
---
-GitLab