Replies: 7 comments 9 replies
-
It all depends on the purpose of the distro you are trying to build. As for now, bluez-alsa repo provides a viable solution for integrating Bluetooth audio with ALSA ecosystem for small/dedicated end devices. The simplest example of that is a Bluetooth speaker based on e.g. Raspberry Pi. However, if one would like to create featured desktop-like OS, there are some issues/limitations. The culprit of all issues with "bluez-alsa for desktop" is the fact that bluez-alsa does not provide any sound server (audio routing and mixing). So, if it will be enough for you to create a static configuration, then probably you can achieve what you want by reading ALSA documentation for asoundrc configuration file https://www.alsa-project.org/wiki/Asoundrc and manual pages of bluealsa and all utilities distributed by this repository. Anyway, if you want a dynamic configuration, then there are some options, but non of these are in this repo. The first thing that you probably want is audio mixing. You can get it from @borine's fork of bluez-alsa: https://github.com/borine/bluez-alsa Also, you can look at this: https://github.com/borine/bluealsa-autoconfig I've never been using bluealsa-autoconfig by myself, though. So, the best person to elaborate more on that topic is @borine :) |
Beta Was this translation helpful? Give feedback.
-
I'm going to do that annoying thing of responding with 'what's wrong with pulseaudio?' As @arkq says, you will lose it's audio routing capabilities. If you have a single application that might not be so bad. But .... A difficulty I can see is that ALSA won't know your BT device exists until it's connected. Your application will need to keep polling dbus or wait for a dbus signal until the audio sink shows up. If you don't know what that means then I recommend you stick to pulseaudio unless you have a really strong reason to avoid it. You may find pipewire suits you as an alternative but I've never tried it. |
Beta Was this translation helpful? Give feedback.
-
Linux Mint is a desktop OS, and has PulseAudio tightly integrated. This means that almost every GUI application is pre-configured to use PulseAudio, and for some applications it is even a compiled-in dependency. In general, this is a good thing. Desktops need features such as multiple applications playing sound at the same time, audio stream routing and re-routing, and a centralized control panel to manage it all. PulseAudio provides all these things, and removing PulseAudio removes all those features, leaving a desktop with somewhat broken audio. BlueALSA does not provide any of these audio management features, and is therefore not usually a good choice for Desktop systems. Why do you want to remove PulseAudio? I don't know what application is used as audio player on Linux Mint. If it successfully sends audio to the sound card then at least it appears to work with ALSA. So most likely you need to work out how to tell it which PCM device to use; it almost certainly using the You could try redefining
Restart the audio player application so that it re-reads the ALSA config, and hopefully now you will have sound to bluetooth. Then to switch back to the sound card you would have to remove that entry from There are some notes in the wiki on using BlueALSA as the default device, as you can see there it is not trivial. If you prefer you could try my ALSA autoconfiguration service from the link given by @arkq above, but whether that works for your specific application depends on how it uses the ALSA API. If you want a "Just Works" solution for a Desktop system, then IMHO PulseAudio or Pipewire give a better experience. BTW the |
Beta Was this translation helpful? Give feedback.
-
Thank you for answering. The purpose of our little Distro-project is a stable DAW basing on Linux Mint. So it's more than just a standard desktop-system. Pulseaudio is great and getting stable and better all the years, but for our special system wie prefer this configuration. So ya, it's maybe simple, but we just need a static bluez-alsa and alsa configuration that just sends the sound to the default alsa soundcard after a user is pairing with bluez. Without breaking the whole soundsystem. Means: if i switch Bluetooth off, all players should use the default alsasoundcard again! I am just searching for the right .asound.conf settings to do this in system and remaster the system, so that is bluetooth working with Alsa for everyone. So great, that bluez-alsa has so many options and is good documentated. I will check your autoconfig tip, but would be happy, if somebody give me some more tips to realize this concrete static configuration |
Beta Was this translation helpful? Give feedback.
-
So there's the rub. In a static configuration, The kernel driver assigns card number 1 to the USB device, so in an alsa-lib configuration its PCM name would be One gotcha is that some applications listen for udev events as the "magic" to tell them a sound card has appeared or disappeared. There is no such udev event for a BlueALSA device. That is one aspect that my |
Beta Was this translation helpful? Give feedback.
-
Hmmm. You still haven't said exactly what you don't like about pulse. And if your goal is low latency I'm surprised bluetooth is in the mix at all! I did once set up a system where audio was routed to two sinks at once. That might work if you had a way of muting the internal audio of the device. You use the All-in-all ALSA is a nightmare, which is why pulseaudio, jack, etc were invented. |
Beta Was this translation helpful? Give feedback.
-
The point is that it everytime ends in the error-message: bt-connection file missing! i was following the wiki for Ubuntu-based distros in your wiki here: https://github.com/arkq/bluez-alsa/wiki/Setting-up-a-USB-audio-device-as-a-Bluetooth-speaker-under-Ubuntu But if i paired the bt-device it gets connected and than again not! with the error-message i wrote above. i think is maybe just a small thing, maybe just a line to edit - but i don't know where to find it. so it seems in my case it's more a problem of understanding how to get bluez running correctly without pulse, than to configure bluez-alsa right!? |
Beta Was this translation helpful? Give feedback.
-
I have the question how to implement bluez-alsa on a Linux Mint 21.1 (Ubuntu 22.04) custom-distro that ships without Pulseaudio!?
How to make it work that bluez and bluez-alsa working by default in Audio-Player that just use the systemdefault alsa-device!
So that a user just has to pair and trust its bt-device and push play!?
In Linux Mint 21.1 (Mate) the bluez/pulseaudio-sound is really stable and working. But if i remove Pulseaudio it doesn't matter, what sounddriver i choose in Player - there is coming sound out of my laptop speaker, but not out of the paired bt-box!
I know the options and documentary of bluez-alsa are really much, i tried a lot from the wiki - but these are all steps for advanced users with different settings.
Short: i just want to prepare and rebuild a Linux system with a preconfigured bluez ALSA-based soundsetting and working bluetooth over the default ALSA soundcard in System WITHOUT Pulseaudio!
Could somebody help, giving me some tips!?!?
Beta Was this translation helpful? Give feedback.
All reactions