Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluez and Pulseaudio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

How did you set up Bluetooth Audio?
I don't use it
70%
 70%  [ 22 ]
I use Bluez4 with ALSA
9%
 9%  [ 3 ]
I use Bluez4/5 with PulseAudio
19%
 19%  [ 6 ]
Total Votes : 31

Author Message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Sun Jun 14, 2015 8:53 am    Post subject: Bluez and Pulseaudio Reply with quote

I had almost finished building my amazing systemd, udev, consolekit, policykit and pulseaudio free system. But then I came to add my Bluetooth audio devices and discovered that BlueZ 5 does not support ALSA audio streaming, only PulseAudio. PulseAudio pulls consolekit and policykit, and means my audio will only work while logged into an xsession. And so now I don't know what to do. I could keep my nice system and use BlueZ 4 which is apparently unmaintained and doesn't have good Bluetooth LE support, or I could stick with BlueZ 5 and fill my system with dependencies I really don't want. What should I do? Am I being stupid trying so hard to avoid Pulseaudio and *kit? If any of you guys use Bluetooth audio, what setup did you choose? Is there any wider interest in getting ALSA support into Bluez 5, or is that unlikely to happen without a fork?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Jun 14, 2015 9:31 am    Post subject: Reply with quote

In the dependencies of bluez, there is no pulseaudio mentioned. Are you sure that there is no way around?
Maybe you can get away with apulse?

When apulse did not yet exist, I was forced to use pulseaudio for skype. However, IIRC, I could install pulseaudio without policykit (at least, for the purpose of skype).
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Sun Jun 14, 2015 6:02 pm    Post subject: Reply with quote

Well, I wish you luck with using audio over bluetooth.

I'm using pulseaudio, as I wasn't interested in going through a big mess (which I still ended up doing anyways).
From what I've seen, pulseaudio is in general half a$$ed app, that is also a cluster f**k in short. For what I was wanting to do, in my use case, is simply using some bluetooth headphones to output the audio, no input. I eventually got it working, but in the process I did find out some things. Pulseaudio has no concept of default and fallback devices (from their documentation and their mailing lists). What this effectively means is that pulseaudio will default to the normal soundcard for outputting audio, and you have to manually switch the source to the other device every time. There is an option where it won't save this information, so when the stream goes away, the default device gets reset. The default is, that it will always goto the sink that you choose regardless if it is present or not (in which case no output). Oh, can't forget the other fun part that it only knows of a source if it's outputting something, once it stops pulseaudio completely forgets everything about it again.

In short you can think of pulseaudio as a child with ADD and with a 2 second attention span playing as a traffic controller.

Sadly, I won't be much help on setting it up, as I have no clue what I was doing.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Sun Jun 14, 2015 7:21 pm    Post subject: Reply with quote

What 'bout JACK? I'm just curious
Back to top
View user's profile Send private message
tclover
Guru
Guru


Joined: 10 Apr 2011
Posts: 516

PostPosted: Mon Jun 15, 2015 5:20 pm    Post subject: Reply with quote

szatox wrote:
What 'bout JACK? I'm just curious

You can do whatever you like... meaning any audio card can be used with specific out/input channels. And this would be saved as text file depending on the app that manage launching JACK server--there is a concept of studio which launch JACK server and clients and connect everything for you per studio configuration. And then, any app (client in JACK term) can be linked to whatever channel to JACK server, or clients for that matter, for out/input streams--meaning any client can be connected anywhere when applicable.
_________________
home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 509
Location: North~Sea~Coa~s~~t~~~

PostPosted: Mon Jun 15, 2015 7:52 pm    Post subject: Reply with quote

When I looked into this, I found this what happened:
There is an ALSA plugin in the Bluez 4 package. In Bluez 5, UNIX socket support has been removed, and because of that the ALSA plugin also.

I've read somewhere that the PulseAudio and Bluez devs work together, and don't like the ALSA devs (or vice versa).

I'll stick with Bluez 4, works fine for me.


Update: something like a2dp-alsa could be a future solution.
Back to top
View user's profile Send private message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Sun Jul 05, 2015 5:00 pm    Post subject: Reply with quote

Sorry for the belated response, but I've been rather busy recently. Thanks for all the advice. I have now managed to install PulseAudio without installing any of the *kits, so that's one step forward. I eventually settled on a hybrid ALSA/PulseAudio system with ALSA as the default and PulseAudio started on demand by applications which require it (e.g. Skype and Bluez). If anyone else is interested in this setup, it's described in the ArchLinux wiki: https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device. (As far as I can see, ALSA's dmix and dsnoop devices always use the first soundcard they find, so in my case I did also have to write a custom dsnoop device associated with the correct soundcard.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum