Bluetooth

6 replies [Last post]
bhikkhu.subhuti
bhikkhu.subhuti's picture
User offline. Last seen 8 weeks 3 hours ago. Offline
Joined: 2017-02-05
Posts:

I want to get my bluetooth speaker to work so I can travel with my laptop and show some people different tracks and this and that.

My speaker works fine without Ardour. Ardour seems to control and "break" all other audio/media as long as it is open.

So how is it done. Do I do it with Jack?

paul
paul's picture
User offline. Last seen 7 hours 42 min ago. Offline
Joined: 2006-03-16
Posts:

I think we addressed this on IRC. Basically, don't do it ... get a proper speaker with a wire.

PulseAudio can talk to a Bluetooth output. Nothing else on modern Linux systems can do so. We can't fix that.

calimerox
calimerox's picture
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 2007-10-19
Posts:

if it must be wireless (it never works/sounds better than a cable but worse... )there are also bluetooth sender you can connect via mini jack to your laptop to send the audio to a bluetooth speaker / car radio etc.........

bhikkhu.subhuti
bhikkhu.subhuti's picture
User offline. Last seen 8 weeks 3 hours ago. Offline
Joined: 2017-02-05
Posts:

There were some suggestions but I did not understand them.
Here is also a more persistent record.
I don't know.. There should be a way to make ardour use the default sound system (when we want it to). It seems to do so when I do not use jack, except for bluetooth.

paul
paul's picture
User offline. Last seen 7 hours 42 min ago. Offline
Joined: 2006-03-16
Posts:

"the default sound system" is not well defined on Linux. The usual rule is that "all audio on Linux uses ALSA", and that is true if you are using a PCI card or a USB device, and also, for the last couple of years, a Firewire device. If you are using a Bluetooth device, ALSA provides no way to talk to it, so "the default sound system (ALSA)" isn't a way to use it.

If you consider PulseAudio "the default sound system", then it can talk to Bluetooth devices, but Ardour does not show the psuedo-device that PulseAudio creates when it offers you a choice of which ALSA device to use. Why not? Because on any given Linux system, there are actually dozens of these pseudo-devices and presenting them to the user would be completely confusing. There's no obvious way for Ardour to decide "hmm, I'll show this pseudo-device but not this one". There is an undocumented hack in Ardour - if you define the environment variable ARDOUR_ALSA_DEVICE in the environment in which Ardour runs, then it will use that device, whatever it is. So if you know the name that your version of PulseAudio is using, you could force Ardour to use that (which may or may not work well, depending on the version of PulseAudio).

Why all this fuss? Well, basically because ALSA does not support Bluetooth audio. I have no idea why ALSA does not support Bluetooth audio, but it ought to, and that's where the "fix" for this sort of thing really needs to be done.

bhikkhu.subhuti
bhikkhu.subhuti's picture
User offline. Last seen 8 weeks 3 hours ago. Offline
Joined: 2017-02-05
Posts:

Thanks for the more detailed answer. Maybe I could find the blueprint for alsa, but maybe your request would be more powerful. You are more technical and are a real programmer with real users who have a complaint.

Majik
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2009-03-20
Posts:

Let me fix that for you:

"...with a single user who has a complaint".

Paul, or anyone else, talking to the maintainers of the bluetooth stack is not going to magically make a bluetooth alsa driver appear as you seem to think it will. Especially not for a single user's benefit.

That's not how it works.

Even if it there was more than one user calling for this, unless one of the developers feels there is a significant benefit to having a bluetooth alsa driver, then it's unlikely to happen.

Note that there actually was a bluetooth alsa driver in the past, but it was dropped from the stack a few years ago. I don't know why, but I'm guessing lack of interest.

https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=4ff9b99292eca193dc0c149722328cb0b1ab0818

You may wish to check your distro, as some Linux distros still have this in their repos (look for bluez-alsa) but bear in mind this is likely to go away if you upgrade to a newer version. https://wiki.debian.org/Bluetooth/Alsa

Now, even if it isn't in your distro, the good news is, because the is all open source software, you do actually have a chance of getting this put back in if you really want it enough and can afford the time and/or money involved. If it was a feature request to a closed-source behemoth like Oracle or Microsoft then your chances of getting it would be pretty much zero even though you had paid good money for the software.

Your options include:
* Find a friendly developer and ask/sponsor them to develop it
* Learn to code yourself and develop it
* Contact someone in the bluez or alsa teams and offer to sponsor the development, ask them for a quote. If the price is right then someone is likely to be interested

Personally, I would look at getting a bluetooth sender, or deal with having to use physical cables. Cables may be physically fiddly, but they are far more reliable and will give you far better quality than bluetooth audio which is inherently degraded.

Cheers,

Keith