2

I have Raspberry pi 3B+ and bluetooth speaker Beats Pill+. I am trying to forward all audio to this speaker and use it as default. Bluetooth connection between rpi and speaker is not a problem, using bluetoothctl I can easily achieve it. Using this command: aplay -D bluealsa:HCI=hci0,DEV=MAC,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wav I can play test sound to the speaker but I am not able to find how to forward all sounds to this speaker (for example espeak "test").

Thanks for advance

  • Have you tried setting your speaker as the default audio device? Is that what you want? – Dmitry Grigoryev Jun 26 at 10:54
  • @DmitryGrigoryev Yes, I want to do this but I don't know where I can set up BT speaker as default audio device. – Matej Jun 26 at 11:02
2

You need to create a file ~/.asoundrc with the following content:

pcm.!default {
        type plug
        slave {
                pcm {
                        type bluealsa
                        device <MAC>
                        profile "a2dp"
                }
        }
        hint {
                show on
                description "BEATS"
        }
}
ctl.!default {
        type bluealsa
}

If this does not work you could also try the following content for your .asoundrc file

defaults.bluealsa.interface "hci0"
defaults.bluealsa.profile "a2dp"
defaults.bluealsa.delay 10000
defaults.bluealsa.battery "yes"
defaults.bluealsa.device "<MAC>"

pcm.!default {
      type hw
      card 1
}

ctl.!default {
        type hw
        card 1
}

Currently I am not completely sure if you need to restart services or if it works out of the box.

  • Thank you very much, first config works well! – Matej Jun 26 at 12:14
0

Open the Volume Control (pavucontrol in the shell), go to the Output Devices tab and push the "Default" button in front of your Bluetooth audio device:

enter image description here

  • Thanks for your answer but there is only defualt audio device in output device and not bluetooth speaker. – Matej Jun 26 at 11:37
  • @Matej Run apt-get install pulseaudio-module-bluetooth and restart. – Dmitry Grigoryev Jun 26 at 11:56
  • 1
    I tried to achieve this using pulseaudio but without success. Solution with alsa and .asounrc works well. – Matej Jun 26 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.