Experiencing Stuttering and Audio Interruptions in Bluetooth Calls with Pulseaudio

Hello @ferranmc,

In our tests, we are running PulseAudio without the --system flag and with the root user.
This is not ideal for production, but we are trying to get to a working baseline.
From this working baseline the permissions can be limited and a user created to run PulseAudio.

This is the current, non-working configuration, in case it is useful to you:

See More
  • Additions to local.conf:
ACCEPT_FSL_EULA = "1"

IMAGE_INSTALL:append = " pulseaudio-server pulseaudio-module-loopback pulseaudio-module-bluez5-discover pulseaudio-module-bluetooth-discover pulseaudio-module-bluetooth-policy pulseaudio-module-bluez5-device pulseaudio-module-cli pulseaudio-module-echo-cancel ofono pulseaudio pulseaudio-misc webrtc-audio-processing"

DISTRO_FEATURES:append = " pulseaudio"
PACKAGECONFIG:append:pn-pulseaudio = " webrtc"
  • /etc/dbus-1/system.d/pulse.conf:
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
​<busconfig>
  ​<policy user="root">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  </policy>
  ​<policy user="pulse">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  </policy>
  ​<policy context="default">
    <deny own="org.pulseaudio.Server"/>
    <deny send_destination="org.bluez"/>
    <deny send_interface="org.bluez.Manager"/>
  </policy>
</busconfig>
  • Addition to /etc/dbus-1/system.d/ofono.conf, at the end of ​, before ​
​<!-- add permissions for the pulse user, necessary for HFP -->
  ​<policy user="pulse">
    <allow send_destination="org.ofono"/>
  </policy>
  • Disable bluealsa:
systemctl stop bluealsa
systemctl disable bluealsa

After this setup, the board is rebooted and the linked script is used.

Best Regards,
Bruno