A2DP, please? Pretty please?


Karel Jansens

Active Member
Joined
Dec 21, 2007
Messages
679
Age
62
Location
Belgium, but trying to escape
Website
Visit site
I guess, since this is the official forum and I´m a customer asking for support, this would be the right place to ask.


So, could we have some A2DP in the blue tooths, plz? I´m getting tired of having to lug around my BT radio just for the Panda (okay, it´s really small and it saves on the Panda´s juice, but it´s the principle of the thing: less gear is better).


(and as to the obvious question why I bother to take a BT radio and BT earphones, when wired buds could do the job, my phone has a weird (and absent) connector for earphones, but a really good BT stack, so...)


Please don´t do a Nokia on us; I waited two years for A2DP on my N800, and was then told to just buy the new device.
 
Bluetooth Audio already works


Pair your headphones, make a slight change to the alsa config file, and you get audio. All that's missing to make it perfect is for the bluetooth pairing process to automatically update the alsa config.
 
Last edited by a moderator:
How about performance? Depending on what you do in parallel you get cluttery sound on an n900 using a2dp.


As for the automatic config update, could that be done via udev? AFAIK you can somehow set rules for newly connected devices in there.
 
^ I´ve said this before: Me hatez terminal in a device this size. I was really looking forward to pair, turn on and listen.


As far as I understand the thread, I´d need to edit ./asoundrc (easy-peasy) and then I can play music by typing the mplayer command+filename/playlist (not acceptable).


=====gratuitous rant mode=====


Allow me to explain: Although I have no probs with tinkering with my Panda, when I play music, I just want to play music the easiest way possible. I realize this must sound houghty-toughty, but really, is there anyone looking forward to using the Panda multimedia machine that way? Is that the way to advertize the Panda to the outside world? «Look, everybody! I can play music over BT. Just wait half an hour while I type out the commands to initialize the music-playing. Isn´t this Pandora just fab?»


=====/gratuitous rant mode=====
 
^ That's fair enough. Right now a lot of things depend on getting into the terminal, and creating scripts from there if you're up to it (not my strong point, personally). Taking screenshots, for example. But it's very early days, and ED is slowly adding stuff to hotfixes as time/priority allows.


Easy AD2P connectivity is important. I'm sure your request will not fall on deaf ears. :)
 
As far as I understand the thread, I´d need to edit ./asoundrc (easy-peasy) and then I can play music by typing the mplayer command+filename/playlist (not acceptable).
Then the good news is that you shouldn't have to run mplayer from the command line, simply setting up ~/.asoundrc as described in that other thread so the headset is default should be enough for gnome-mplayer (or any other media player you want) to work.


It's configuring of ~/.asoundrc that is the hardest part of the process, one that should be eliminated in the future.
 
Blueman does take care of this, and DJWillis plans on implementing it (as soon as he finds some time).


If anyone else ones to try: You're welcome.


I tried installing it, but it displays some DBus errors when you start it.
 
If someone can work out the commands to get it working in a script file, it should be painless to wrap it into a Zenity script ..


This could then be bundled into a PND and made available to everyone - without requiring more integration work from DJWillis ..
 
I've got it working. All it does really is swap .asoundrc files depending on what you want. The problem with this setup is (at least in my experience) you have to reboot the bluetooth service if your headset drops the connection, since ALSA has a terrible time recovering.


PulseAudio, I might add, handles all this beautifully, since the music player doesn't have to know what device is outputting. PulseAudio also has a nice little configuration screen. Maybe if I poke enough the developers will finally add it to the official OS. ;)


How to use these scripts:

  1. Extract the ZIP to your home directory. The .asoundrc_* files should drop straight into the right spot (under /home/<youruser>, your home folder).
  2. Drag-n-drop the "Bluetooth Audio" and "Speaker Audio" scripts to a convenient location, like the Desktop.
  3. The scripts use notify-send to pop up a libnotify event when it's done. If you don't like that, remove the line from the script that begins with "notify-send".
  4. Edit the .asoundrc_bt and .asoundrc_spk files. You need to find out the address of your bluetooth device. When your device is paired with the Pandora, run "hcitool dev" in the terminal and you'll see "hci0 <address>". Replace mine with your own.
  5. Should be all set. Run the "Bluetooth Audio" or "Speaker Audio" script, restart the program you want to use, like your music player, and you should be all set.



Extra tip: even with Speaker Audio configuration, the .asoundrc_spk still registers the bluetooth device with ALSA, so you can still ask for it specifically by the "bluetooth" name in .asoundrc_spk. For example:



Code:
aplay -Dbluetooth <filename>
 
Nice :D


Now just attach the scripts - maybe I can adopt them to include them into the official firmware :D
 
hmm i was under the impression that a2dp was as simple as plug and play, was i wrong as of now?
 
It's plug and play in the sense that Linux detects a new sound device, but the sound subsystem still needs to be told what to do with that sound device.
 
Nice :D


Now just attach the scripts - maybe I can adopt them to include them into the official firmware :D
Oops! I forgot to attach didn't I? I'll do that later today when I grab a free moment again.


The scripts are so simple you might even end up using your own anyway. Examples are always nice though.

It's plug and play in the sense that Linux detects a new sound device, but the sound subsystem still needs to be told what to do with that sound device.
ALSA has to be told. There are others that are very plug-n-play. ;)
 
Last edited by a moderator:
Much as I hate Pulseaudio (I've got a pro audio card in my Linux DAW, Pulseaudio would make this DAW puke its digital bits all over the mixing desk), I have to concur that adding it to the Pandora probably wouldn't be a terribly bad thing, after all ..
 
I've got it working. All it does really is swap .asoundrc files depending on what you want. The problem with this setup is (at least in my experience) you have to reboot the bluetooth service if your headset drops the connection, since ALSA has a terrible time recovering.


PulseAudio, I might add, handles all this beautifully, since the music player doesn't have to know what device is outputting. PulseAudio also has a nice little configuration screen. Maybe if I poke enough the developers will finally add it to the official OS. ;)


How to use these scripts:

  1. Extract the ZIP to your home directory. The .asoundrc_* files should drop straight into the right spot (under /home/<youruser>, your home folder).
  2. Drag-n-drop the "Bluetooth Audio" and "Speaker Audio" scripts to a convenient location, like the Desktop.
  3. The scripts use notify-send to pop up a libnotify event when it's done. If you don't like that, remove the line from the script that begins with "notify-send".
  4. Edit the .asoundrc_bt and .asoundrc_spk files. You need to find out the address of your bluetooth device. When your device is paired with the Pandora, run "hcitool dev" in the terminal and you'll see "hci0 <address>". Replace mine with your own.
  5. Should be all set. Run the "Bluetooth Audio" or "Speaker Audio" script, restart the program you want to use, like your music player, and you should be all set.



Extra tip: even with Speaker Audio configuration, the .asoundrc_spk still registers the bluetooth device with ALSA, so you can still ask for it specifically by the "bluetooth" name in .asoundrc_spk. For example:



Code:
aplay -Dbluetooth <filename>


Don't mean to gravedig, but was this ever put up somewhere that I missed or was this forgotten about? =P
 
wait for Yars, so far, bluetooth only works with exile, mplayer, panplayer with some minor hacking around, a search on forums will help you, and wouldve avoided this question as well
 
Back
Top