fbe
Posts: 620
Joined: Thu Aug 17, 2017 9:08 pm

MPD and bluetooth speaker issue in Raspbian Buster (used to work with Stretch)

Sat Jul 13, 2019 10:22 pm

Installed Raspbian Buster Lite (2019-07-10).

Code: Select all

sudo apt install mpd mpc bluealsa
After reboot paired and connected my speaker using bluetoothctl.

Code: Select all

aplay -D bluealsa:HCI=hci0,DEV=78:44:05:8d:06:74,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wav
produces sound as expected.

Appended configuration to /etc/mpd.conf

Code: Select all

audio_output {
        type            "alsa"
        name            "JBL GO"
        device          "bluealsa:HCI=hci0,DEV=78:44:05:8d:06:74,PROFILE=a2dp"
}
mixer_type "software"
Restarting mpd and play something...

Code: Select all

sudo systemctl restart mpd
mpc clear
mpc add file:///usr/share/sounds/alsa/Front_Center.wav
mpc play 1
This used to work with Raspbian Stretch. In Buster I have an error in /var/log/mpd/mpd.log:

Code: Select all

Jul 13 23:41 : exception: Failed to play on "JBL GO" (alsa): snd_pcm_poll_descriptors_revents() failed: Invalid argument
Is there anybody successfully using mpd and bluetooth speakers with Raspbian Buster?

fbe
Posts: 620
Joined: Thu Aug 17, 2017 9:08 pm

Re: MPD and bluetooth speaker issue in Raspbian Buster (used to work with Stretch)

Mon Jul 15, 2019 7:44 pm

First success with workaround:

Code: Select all

audio_output {
       type            "pipe"
       name            "pipe to JBL GO"
       command         "aplay -D bluealsa:HCI=hci0,DEV=78:44:05:8d:06:74,PROFILE=a2dp -f cd 2>/dev/null"
       format          "44100:16:2"
}
in /etc/mpd.conf

delcre
Posts: 1
Joined: Sat Jul 20, 2019 2:44 pm

Re: MPD and bluetooth speaker issue in Raspbian Buster (used to work with Stretch)

Sat Jul 20, 2019 2:52 pm

I had exactly the same problem.
Things worked in 'Stretch", but they did not work in 'Buster'.
The workaround shown in this thread worked. Thank you!
But does anyone know about root cause of this?

vernonjvs
Posts: 1
Joined: Mon Sep 23, 2019 6:22 pm

Re: MPD and bluetooth speaker issue in Raspbian Buster (used to work with Stretch)

Mon Sep 23, 2019 6:32 pm

The problem seems to be HCI=hci0. Once I remove this, everything works fine on my Rasperry Pi Zero W.

My mpd.conf looks at follows

Code: Select all

audio_output {
       type            "alsa"
       name            "S113BT"
       device          "bluealsa:DEV=00:1A:7D:D0:81:E0,PROFILE=a2dp"
       mixer           "software"
       format          "44100:16:2"
}
The format line is only needed if you have high quality flac files.

Thomas-F
Posts: 1
Joined: Mon Sep 30, 2019 7:05 pm

Re: MPD and bluetooth speaker issue in Raspbian Buster (used to work with Stretch)

Mon Sep 30, 2019 7:13 pm

Hello, I'm new here and writing for the first time in a forum and apologize if I didn't notice anything.
The described problem has occupied me a lot.
I compared on a raspberry zero w a simple stretch lite installation (8.Apr 2019) and a simple buster lite installation (10.Jul 2019) each with bluealsa.

This command only works with stretch

Code: Select all

$ aplay -D bluealsa:HCI=hci0,DEV=02:1A:01:0C:EF:DA,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wav
This command only works with buster

Code: Select all

$ aplay -D bluealsa:SRV=org.bluealsa,DEV=02:1A:01:0C:EF:DA,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wav
The difference lies in different interpretation files
stretch: \usr\share\alsa\alsa.conf.d\20-bluealsa.conf
buster: \etc\alsa\conf.d\20-bluealsa.conf
In buster the corresponding part of my /etc/asound.conf file looks like this

Code: Select all

pcm.btspeaker {
    type plug
    slave.pcm {
       type bluealsa
       service org.bluealsa
       device "02:1A:01:0C:EF:DA"
       profile "a2dp"
    }

Return to “Troubleshooting”