You are not logged in.
Hello all,
I was given a bluetooth speaker recently that I would occasionally like to use with my laptop.
I've set up bluez-alsa according to the instructions here and I can successfully stream sound from my laptop to the bluetooth speaker with:
aplay -D bluealsa:SRV=org.bluealsa,DEV=74:22:BB:F1:C1:21,PROFILE=a2dp /usr/share/sounds/alsa/Front_Center.wavHowever when trying to play a video from chromium or a song from spotify I get the sound from my laptop speakers rather than the external bluetooth one.
Here is my ~/.asoundrc
defaults.pcm.card 1;
defaults.pcm.device 0;
defaults.ctl.card 1;
defaults.bluealsa {
service "org.bluealsa"
device "74:22:BB:F1:C1:21"
profile "a2dp"
}I am not interested in automatically connecting to the bluetooth speaker, I would like to do this manually, however when connected to it, I'd like to force all applications producing sound on the OS to output it from the bluetooth speaker. How can I accomplish this?
Thanks!
Last edited by stolichniaskitnik (2021-08-20 13:03:09)
Offline
With pulseaudio or pipewire. This is explicitly an operation that plain ALSA cannot handle on it's own and one of the primary reasons for their existence. What you can do is swap the config file depending on whether the bluetooth is connected or not, but applications have to restart their audio pipeline/you will have to restart all your applications for the newer config to trigger.
If you do want to opt for the latter your configuration needs to reference the bluealsa node as the default so you'd do
defaults.bluealsa {
service "org.bluealsa"
device "74:22:BB:F1:C1:21"
profile "a2dp"
}
defaults.!pcm { type plug; slave.pcm "bluealsa"};if I'm not mistaken.
Last edited by V1del (2021-08-20 13:09:52)
Offline
Thanks
Offline
Thanks for the edit V1del. I decided to sacrifice the few more MB on my SSD and install pipewire in the name of convenience. Everything seems to work well with this tool without any configuration and still has a smaller footprint than pulseaudio.
Offline