I have been trying to build a working Balena sound device for 3 days now and I have been running into a consistent problem with bluetooth sound stuttering.
Here is my setup:
RPI 3b with the innomaker DAC, bluetooth 4 dongle.
RPI 4 with the innomaker DAC. bluetooth 4 dongle.
I can get sound from the DAC, but when connected to bluetooth there is a severe audio stutter. Removing the DAC does not change the issue. Changing from the RPI 3 to RPI 4 does not change the issue.
Sometimes the stutter resolves and the sound is great, most times the stutter does not resolve and the audio is choppy. Restarting Bluetooth and sound services do not help the issue. Multiroom client and server are both disabled.
Ive tried 2 different bluetooth dongles, TPlink and pluggable, but the issue persists. I have disabled bluetooth and wifi on the pi3, which does not help.
Ive tried BalenaOS 32bit 2.72 - 2.80 on the Rpi 3, which did not help the issue.
Ive tried BalenaOS 64bit 2.71.5 - 2.80.3 on the Rpi4 and had similar results.
I read about the RPI 3 issues using builtin bluetooth, and they sound similar to what im seeing here, but ive tried 2 different dongles and have the same results. Im at a loss here.
Config overlays:
Define DT parameters “i2c_arm=on”,“spi=on”,“audio=off”
BALENA_HOST_CONFIG_dtoverlay “allo-boss-dac-pcm512x-audio”,“pi3-disable-bt”,“pi3-disable-wifi”
Device Env. variables
AUDIO_OUTPUT AUTO
DISABLE_MULTI_ROOM 1
SOUND_MODE STANDALONE
SOUND_VOLUME 75
There are no errors in the logs.
Bluetooth logs:
22.06.21 17:15:05 (-0400) bluetooth — Bluetooth —
22.06.21 17:15:05 (-0400) bluetooth Starting bluetooth service with settings:
22.06.21 17:15:05 (-0400) bluetooth - Device name: balenaOS c28f
22.06.21 17:15:05 (-0400) bluetooth - HCI interface: hci0
22.06.21 17:15:05 (-0400) bluetooth - Pairing mode: SSP
22.06.21 17:15:05 (-0400) bluetooth - PIN code: 0000
22.06.21 17:15:05 (-0400) bluetooth Available HCI interfaces: hci0 hci0
22.06.21 17:15:05 (-0400) bluetooth Resetting hci0
22.06.21 17:15:05 (-0400) bluetooth Resetting hci0
22.06.21 17:15:05 (-0400) bluetooth Configuring selected interface: hci0
22.06.21 17:15:05 (-0400) bluetooth hci0 Set Connectable complete, settings: powered connectable ssp br/edr le secure-conn
22.06.21 17:15:05 (-0400) bluetooth hci0 Set Bondable complete, settings: powered connectable bondable ssp br/edr le secure-conn
22.06.21 17:15:05 (-0400) bluetooth hci0 Set Discoverable complete, settings: powered connectable discoverable bondable ssp br/edr le secure-conn
22.06.21 17:15:05 (-0400) bluetooth hci0 Set Secure Simple Pairing complete, settings: powered connectable discoverable bondable ssp br/edr le secure-conn
22.06.21 17:15:05 (-0400) bluetooth Pairing mode set to ‘Secure Simple Pairing Mode (SSPM)’. PIN code is NOT required.
22.06.21 17:15:07 (-0400) bluetooth Bluetooth agent started!
22.06.21 17:15:07 (-0400) bluetooth Checking for known bluetooth devices…
22.06.21 17:15:07 (-0400) bluetooth - Attempting to reconnect to Galaxy Tab S5e (D8:0B:9A:00:37
Audio logs during connection and playback:
22.06.21 17:15:09 (-0400) audio W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
22.06.21 17:15:09 (-0400) audio W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
22.06.21 17:15:13 (-0400) bluetooth - Successfully connected to Galaxy Tab S5e (D8:0B:9A:00:37:45)…
22.06.21 17:15:15 (-0400) sound-supervisor Connected to PulseAudio at 192.168.2.254:4317
22.06.21 17:15:15 (-0400) sound-supervisor Server protocol version: 33
22.06.21 17:15:15 (-0400) sound-supervisor Client protocol version: 33
22.06.21 17:15:16 (-0400) audio W: [pulseaudio] module-loopback.c: Configured latency of 200.00 ms is smaller than minimum latency, using minimum instead
22.06.21 17:15:16 (-0400) audio W: [pulseaudio] module-loopback.c: Cannot set requested source latency of 66.67 ms, adjusting to 250.00 ms
22.06.21 17:15:19 (-0400) audio E: [pulseaudio] backend-native.c: socket(SEQPACKET, SCO) Address family not supported by protocol