set LIBASOUND_THREAD_SAFE=0 for 4a 37/16437/1
authorThierry Bultel <thierry.bultel@iot.bzh>
Fri, 31 Aug 2018 14:45:44 +0000 (16:45 +0200)
committerThierry Bultel <thierry.bultel@iot.bzh>
Fri, 31 Aug 2018 14:45:44 +0000 (16:45 +0200)
Since the integration of bluez-alsa support in softmixer,
and as warned by the readme of bluez-alsa, there are potential
(and effective !) deadlocks in libasound. These deadlocks come
especially when uing ioplug PCMs.
This hack disables the calls to snd_pcm_lock/unlock in libasound.

Notice that the design that consists in using such PCM plugs
for communicating with the bluealsa daemon is just a short term
solution. When the direct support of bluezalsa communication
is integrated in the softmixer, that hack should be removed.

Change-Id: Ib6376fd2e145b3240ab1a68b9c760ff9e4c063c4
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb

index 8aa50ef..63d2bdb 100644 (file)
@@ -30,6 +30,7 @@ while ! ls $svcfile > /dev/null; do
 done
 sed -i '/\[Unit\]/ a Before=pulseaudio.service' $svcfile;
 sed -i '/\[Unit\]/ a ConditionPathExistsGlob=/dev/snd/control*' $svcfile;
+sed -i '/ExecStartPre=/ a Environment=LIBASOUND_THREAD_SAFE=0' $svcfile;
 
 sed -i -e 's|/usr/bin/afb-daemon\>|& --ldpath=/usr/libexec/agl/4a-alsa-core/lib:/usr/libexec/agl/4a-hal/lib:/usr/libexec/agl/afb-aaaa/lib:/usr/libexec/agl/smixer/lib|' $svcfile