Bluetooth not playing via I2S DAC (Allo Boss)

I’ve an I2S DAC running on a Pi4 with a dtoverlay=allo-boss-dac-pcm512x-audio. It works fine for audio from the pi, but bluetooth from a connected phone doesn’t play despite connecting fine. I suspect I need to edit bluealsa-aplay.service to output to the DAC but I’ve spent all day on this without succes so wonder if anyone has a solution? - it would be most appreciated.

osmc@Dullahan:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 [Boss DAC HiFi [Master] pcm512x-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

I’ve tried modifiying bluealsa-aplay.service as below, but without success.

osmc@Dullahan:~$ cat /lib/systemd/system/bluealsa-aplay.service
[Unit]
Description=A2DP Playback
After=bluealsa.service syslog.service
Requires=bluealsa.service
StopWhenUnneeded=true

[Service]
ExecStartPre=/bin/sleep 3
ExecStart=/usr/bin/bluealsa-aplay -D front:CARD=BossDAC --profile-a2dp 00:00:00:00:00:00
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=A2DP-Playback
Restart=on-failure

[Install]
WantedBy=bluetooth.target

/boot/config-user.txt is:

sdtv_aspect=1
start_x=1
dtparam=audio=off
dtoverlay=allo-boss-dac-pcm512x-audio

and /boot.config.txt is unchanged from vanilla osmc:

[pi4]
dtoverlay=rpivid-v4l2
arm_64bit=1
kernel=kernel.img

[all]
dtoverlay=vc4-kms-v3d,cma-512
disable_overscan=1
start_x=1
disable_splash=1
disable_fw_kms_setup=1
hdmi_ignore_cec_init=1
include config-user.txt

[pi02]
dtoverlay=vc4-kms-v3d,cma-256

Does anyone know if there’s a solution for this? Bluetooth audio from the headphone 3.5mm jack works (by changing to “dtoverlay=pisound” and “dtparam=audio=on” and removing "-D front:CARD=BossDAC2 from bluealsa-aplay.service), but I’m using the Pi as a headless music system so would quite like to use the DAC.

In theory, you should not have to change the bluealsa-aplay unit file at all. The DAC is Card 0 which is ALSA’s default. BUT if you enable the 3.5mm jack, that’s probably Card 0.

Please post the output of aplay -L.

Thanks Graham,

I looked at this a bit more yesterday but didn’t make further progress. The bluetooth connects fine (tested from several devices) and the source thinks it’s streaming via bluetooth to the pi but no sound comes out of the i2s DAC. Files stored on the pi play fine and bluetooth works fine if I set config-user.txt to use the 3.5mm jack but the sound quality isn’t as good.

aplay -L is below.

osmc@Dullahan:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
btaudio
Bluetooth Audio
default:CARD=BossDAC
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Default Audio Device
sysdefault:CARD=BossDAC
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Default Audio Device
dmix:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct sample mixing device
dsnoop:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct sample snooping device
hw:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct hardware device without any conversions
plughw:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
HDMI Audio Output
dmix:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct sample mixing device
dsnoop:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct sample snooping device
hw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Hardware device with all software conversions

OK, there’s no front: device defined so try:

ExecStart=/usr/bin/bluealsa-aplay -D dmix:CARD=BossDAC --profile-a2dp 00:00:00:00:00:00

Thanks,

I’ve changed the blualsa-aplay.service as suggested and
sudo systemctl daemon-reload
sudo systemctl restart bluealsa-aplay

but unfortunately still no sound, either before or after a reboot. I get a soft ‘pop’ when the bluetooth connects/disconnnects (I’m not sure if this occured previously), but no actual audio.

/lib/systemd/system/bluealsa-aplay.service :

[Unit]
Description=A2DP Playback
After=bluealsa.service syslog.service
Requires=bluealsa.service
StopWhenUnneeded=true

[Service]
ExecStartPre=/bin/sleep 3
ExecStart=/usr/bin/bluealsa-aplay -D dmix:CARD=BossDAC --profile-a2dp 00:00:00:00:00:00
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=A2DP-Playback
Restart=on-failure

[Install]
WantedBy=bluetooth.target

osmc@Dullahan:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
btaudio
Bluetooth Audio
default:CARD=BossDAC
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Default Audio Device
sysdefault:CARD=BossDAC
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Default Audio Device
dmix:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct sample mixing device
dsnoop:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct sample snooping device
hw:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Direct hardware device without any conversions
plughw:CARD=BossDAC,DEV=0
BossDAC, Boss DAC HiFi [Master] pcm512x-hifi-0
Hardware device with all software conversions
default:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
sysdefault:CARD=vc4hdmi1
vc4-hdmi-1, MAI PCM i2s-hifi-0
Default Audio Device
hdmi:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
HDMI Audio Output
dmix:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct sample mixing device
dsnoop:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct sample snooping device
hw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Direct hardware device without any conversions
plughw:CARD=vc4hdmi1,DEV=0
vc4-hdmi-1, MAI PCM i2s-hifi-0
Hardware device with all software conversions

Please post logs so we can see your settings.

Thanks, logs are here:

https://paste.osmc.tv/junesezeqe