summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2020-01-10 12:27:14 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2020-01-10 13:07:52 +0200
commitddb82bacfdadbe9c7ab5050b50d20cc5f1c14c35 (patch)
treec43e1c56835c73a74c90c268679424516cad8b00 /meta-pipewire/recipes-multimedia
parentc10611502bc47f8d92593b8cebe8a3057aa74ef5 (diff)
pipewire: add patch to fix random underruns
Bug-AGL: SPEC-3098 Change-Id: Id304bf6d1adcf7cd739b705a23772c25ce5258e8 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'meta-pipewire/recipes-multimedia')
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-alsa-pcm-call-reuse_buffers-when-resetting-the-state.patch30
-rw-r--r--meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb3
2 files changed, 32 insertions, 1 deletions
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-alsa-pcm-call-reuse_buffers-when-resetting-the-state.patch b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-alsa-pcm-call-reuse_buffers-when-resetting-the-state.patch
new file mode 100644
index 00000000..cae4d70f
--- /dev/null
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire/0006-alsa-pcm-call-reuse_buffers-when-resetting-the-state.patch
@@ -0,0 +1,30 @@
+From 5946fbd2ca3a7f892b4ebc10090f62df6bb1ec88 Mon Sep 17 00:00:00 2001
+From: George Kiagiadakis <george.kiagiadakis@collabora.com>
+Date: Thu, 9 Jan 2020 19:27:23 +0200
+Subject: [PATCH] alsa-pcm: call reuse_buffers when resetting the state of the
+ buffers
+
+This allows the upstream node to put buffers back to its pool in case
+they were left around in the ready list locally when the alsa-pcm-sink
+was last paused.
+
+Fixes #203
+---
+ spa/plugins/alsa/alsa-pcm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c
+index 63d75549..a6f22cf0 100644
+--- a/spa/plugins/alsa/alsa-pcm.c
++++ b/spa/plugins/alsa/alsa-pcm.c
+@@ -1115,6 +1115,7 @@ static void reset_buffers(struct state *this)
+ struct buffer *b = &this->buffers[i];
+ if (this->stream == SND_PCM_STREAM_PLAYBACK) {
+ SPA_FLAG_SET(b->flags, BUFFER_FLAG_OUT);
++ spa_node_call_reuse_buffer(&this->callbacks, 0, b->id);
+ } else {
+ spa_list_append(&this->free, &b->link);
+ SPA_FLAG_CLEAR(b->flags, BUFFER_FLAG_OUT);
+--
+2.24.1
+
diff --git a/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb b/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb
index 68eb3d1e..1a4e4eb9 100644
--- a/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb
+++ b/meta-pipewire/recipes-multimedia/pipewire/pipewire_git.bb
@@ -6,11 +6,12 @@ SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;protocol=https;bra
file://0003-gst-Implement-new-pwaudio-src-sink-elements-based-on.patch \
file://0004-audioconvert-always-assume-that-output-ports-are-NOT.patch \
file://0005-module-access-add-same-sec-label-mode.patch \
+ file://0006-alsa-pcm-call-reuse_buffers-when-resetting-the-state.patch \
"
SRCREV = "b0932e687fc47e0872ca291531f2291d99042d70"
-PV = "0.2.91+git${SRCPV}+1"
+PV = "0.2.91+git${SRCPV}+2"
S = "${WORKDIR}/git"
RDEPENDS_${PN} += "virtual/pipewire-sessionmanager virtual/pipewire-config"