summaryrefslogtreecommitdiffstats
path: root/meta-audio-4a-framework/recipes-connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'meta-audio-4a-framework/recipes-connectivity')
-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"