summaryrefslogtreecommitdiffstats
path: root/meta-audio-4a-framework
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2019-02-12 13:10:31 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-02-13 13:30:47 +0000
commitb8eb563087ff8d4dcb945f5c2b6c56e5c68abab8 (patch)
tree631fd1bc37553f0cdcdaf0b9e2693c573d19c8ae /meta-audio-4a-framework
parent1ab369904c23937c9fc54c39046f627071adc3d6 (diff)
bluez-alsa: added a patch of bug fix in the ioplug
This adds an early patch for fixing the "stuck poll" issue when using the PCM ioplug. This patch has already been discussed with the bluez-alsa maintainer, and submitted as a pull request: https://github.com/Arkq/bluez-alsa/pull/184 Change-Id: I3cec6625b501025286878d9da2c782014b224d41 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'meta-audio-4a-framework')
-rw-r--r--meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch35
-rw-r--r--meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend3
2 files changed, 37 insertions, 1 deletions
diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch
new file mode 100644
index 00000000..7befe733
--- /dev/null
+++ b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa/0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch
@@ -0,0 +1,35 @@
+From ba292e82928a6a0ea663039ba2d5c030c4cfa80d Mon Sep 17 00:00:00 2001
+From: Thierry Bultel <thierry.bultel@iot.bzh>
+Date: Fri, 8 Feb 2019 10:21:55 +0100
+Subject: [PATCH] bluealsa-pcm: bump the trigger after pcm prepare
+
+When a sound application recovers from a EPIPE by calling
+snd_pcm_prepare, and goes immediately after to a call to poll,
+it would be stuck forever unless the internal event trigger
+is bumped.
+
+Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
+---
+ src/asound/bluealsa-pcm.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c
+index 42cb61d..4ccbf0d 100644
+--- a/src/asound/bluealsa-pcm.c
++++ b/src/asound/bluealsa-pcm.c
+@@ -351,6 +351,12 @@ static int bluealsa_prepare(snd_pcm_ioplug_t *io) {
+ pcm->io_ptr = 0;
+
+ debug("Prepared: %d", pcm->fd);
++
++ /* When the sound application calls poll just after snd_pcm_prepare,
++ * it would block forever unless the internal trigger is bumped
++ * */
++ eventfd_write(pcm->event_fd, 1);
++
+ return 0;
+ }
+
+--
+2.16.4
+
diff --git a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend
index 70c731a6..ece43824 100644
--- a/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend
+++ b/meta-audio-4a-framework/recipes-connectivity/bluez-alsa/bluez-alsa_git.bbappend
@@ -4,6 +4,7 @@
# the list of audio transports from bluez-alsa
# - patch 2 makes the "debug" macro always display the caller name
# - patch 3 asks dbus for a name like 'org.bluez-alsa.hciX' where hciX
+# - patch 4 is a bug fix
# name of the HCI interface that the bluealsa daemon instance is handling
#
# Notice that patch 2 will very likely be replaced by a full dbus interface
@@ -15,4 +16,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-build-and-link-with-a-shared-library.patch"
SRC_URI += "file://0002-log-add-calling-function-name.patch"
SRC_URI += "file://0003-dbus-request-a-name-on-startup.patch"
-
+SRC_URI += "file://0004-bluealsa-pcm-bump-the-trigger-after-pcm-prepare.patch"