Reply
Thread Tools
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#1
(Update: Have no idea what's going on and about to ask a question? Page down to the FAQ first)

Well, it's not perfect yet and the "setup program" is somewhat less than elegant, but it "works for me" (TM) and I couldn't convince anyone else to test it. Just follow the instructions carefully and it should work well.

--Current Status--
What works:
-Playing music with mplayer and Kagu and Mediabox through your A2DP headphones!
-Scrolling in Kagu or Mediabox does not cause skipping, usually.
What's not so great:
-CPU usage is ~50% at 320MHz! That'll go through battery life pretty fast.
-No way at all to playback music through A2DP in the default media player
-Skipping can still occur during periods of high CPU usage from other apps.
-Installing still takes a little time at the command line. No need to learn vi or mess around with root privileges though.

-The A2DP HowTo-

1. Pair your A2DP headphones.
2. Click on the Bluetooth "B" icon in the status bar, then "Bluetooth settings..." -> Devices. Select your headphones from the list and click "Edit." Carefully write down (on a piece of paper or on your computer, not your tablet) the letters and numbers you see next to "Bluetooth address:" Mine is 00:07:A4:B6:F9:71 for reference.
NOTE: The colons ":" are important. Write those down too! The only characters you will see are the numbers 0 through 9 and the letters A through F. No need to worry whether you're seeing an I or a 1, an O or a 0.
3. Download and install the latest version of mplayer from Serge. rm_you's patch for better a2dp playback is now included! The version you want is mplayer_1.0rc1-maemo.25.n8x0_armel or a higher version.
4. Download and install the a2dp-support package attached to this post. Current version is 0.9.
5. Open up "X Terminal" and run:
Code:
a2dp runfirst
6. It will ask you for the Bluetooth address of your headphones which you wrote down earlier. Type that in exactly as it was shown and hit enter.
7. To enable a2dp support type:
Code:
a2dp enable
8. Now anything that uses mplayer (such as mediabox or kagu) will try to play through your bluetooth headphones! To switch things back to normal and make mplayer play through speakers/wired headphones just type:
Code:
a2dp disable
Bonus: Don't like using the terminal to switch modes? Download and install osso-statusbar-cpu from here. Once it's loaded and running in the statusbar, tap on it, then "Settings" -> "Commands" -> "New." For "Description put "Toggle A2dp" and for Command type:
Code:
a2dp toggle
Now you can toggle a2dp on and off just by tapping the cpu-statusbar app then "Toggle A2DP"!

-Know Issues-
If your music stops when using the menus in mediabox or kagu and instead you hear screen taps being played through the headphones: Click on the "headset" icon that appeared in the statusbar when you paired your headphones and click "Disconnect."

FAQ
Q: Doesn't OS2008 come with A2DP? Why do I have to do all this?
A: Support for A2DP is included but not enabled. The instructions above are to enable it.

Q: I didn't follow the instructions and my headphones paired fine and I hear sound out of both speakers, but it sounds horrible: How do I fix it?
A: Your headphones are using HSP (HeadSet Protocol). Follow the above instructions to enable A2DP.

Q: Nokia should have included this by default! I don't know Linux and this is hard! This is slow and skitchy and soaks up battery power!
A: Yes. These are all true and valid statements. You can either wait for Nokia to fix it, wait for someone else to fix it or fix it yourself. If you just wanted to complain about the current situation please do it somewhere else, preferably one of the already existing "complaint" threads.

Q: When will this be fixed/improve/suck less?
A: I have no idea. Any help would make it go faster.

That's it for now. Tell me how it works for you. Keep in mind this is very beta, and that I don't consider this finished yet. If anyone is interested in the "source" package for this .deb tell me and I'll upload it as well. It's really just a script and a config file.

-John
Attached Files
File Type: deb a2dp-support_0.9_all.deb (3.7 KB, 3112 views)

Last edited by Johnx; 2008-07-02 at 16:11. Reason: Updated
 

The Following 34 Users Say Thank You to Johnx For This Useful Post:
Posts: 18 | Thanked: 0 times | Joined on Jul 2007
#2
Cool, i'm going to flash my n800 tonight so ill give this a go, it still looks like the codec is still done on the cpu and not the dsp but hopeflly the fact that ti are going to release the tool chain for open source development might meen we get this soon.
 
Posts: 18 | Thanked: 0 times | Joined on Jul 2007
#3
Yup thats works fine for me, although its not a particularly stable connection (breaks up every 10 - 20 secs)
 
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#4
Sometimes I'll play a song and it will cut out every 10-20 seconds and sometimes the whole song will play through without problems. I didn't know if that was my headphones' fault or the tablet.

Right now I'm looking at the output that mplayer gives me about alsa-init and it seems like my desktop is using a different buffer size when playing to the headphones then my Nokia is using. I don't know if that's something that's set by the actual ALSA driver in the kernel or something set by mplayer though. Or maybe it could have something to do with the bluetooth dongle used, but I *do* actually have a way to test that. More later...
 
Posts: 450 | Thanked: 16 times | Joined on Mar 2006
#5
Now that Milhouse's a2dp hack on longer works in Kagu with the N800 firmware, and I can no longer listen satisfactorily to my music with my Motorola Bluetooth headphones, and a substitute a2dp conversion hack is apparently still in its infant stages, I've partially thrown in the towel and ordered myself a a2dp Bluetooth tongle for $19 plus shipping, which is advertised to work with all mp3 or otherwise portable music players. Let's see if it does the trick for me, while this N800 a2dp matter is being sorted out. I thought from comments in this forum that the new firmware was supposed to include an a2dp capability.
 
sachin007's Avatar
Posts: 2,041 | Thanked: 1,066 times | Joined on Mar 2006 @ Houston
#6
I read somewhere that the bluez should be able to play a2dp with cpu usage at 20%. Is that possible??
 

The Following User Says Thank You to sachin007 For This Useful Post:
linuxrebel's Avatar
Posts: 182 | Thanked: 46 times | Joined on Jan 2007 @ Silly-Con Valley
#7
It all works out of the box almost..... with the latest version of OS2008. Setup the .asoundrc file. *important* if you have fmradio installed make sure it's either removed or not set to speaker (fmradio also affects plugin headphones too). Connect your BT device and sound.... Volume is a bit on the low side. But ... sound.. and the sound icon even changes.

I'm using it right now with xmms .... which is at this time as far from maemo'd as you can get, and it works. Yes the occasional "tape drag" sound but .... it works.

EDIT

Ok vi /etc/hcdi.conf file and change the following 2 sections.

# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;

to become
lm accept,master;

then edit

# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;

and remove rswitch.

end result for me at least is a lot smoother playback.

Last edited by linuxrebel; 2007-12-21 at 04:03. Reason: Adding new info !!!!!
 
Posts: 450 | Thanked: 16 times | Joined on Mar 2006
#8
Sounds worth trying -- except that my OS2008 doesn't seem to have a /etc/hcdi.conf file! Where is it hiding?
 
Johnx's Avatar
Posts: 643 | Thanked: 628 times | Joined on Mar 2007 @ Seattle (or thereabouts)
#9
@ascherjim:
I'm relatively sure he meant /etc/bluetooth/hcid.conf
Also, the support for A2DP is included, it's just not enabled by default because Nokia couldn't get a couple things working the way they wanted in time for the release.
 
linuxrebel's Avatar
Posts: 182 | Thanked: 46 times | Joined on Jan 2007 @ Silly-Con Valley
#10
Originally Posted by Johnx View Post
@ascherjim:
I'm relatively sure he meant /etc/bluetooth/hcid.conf
Also, the support for A2DP is included, it's just not enabled by default because Nokia couldn't get a couple things working the way they wanted in time for the release.
I did mean /etc/bluetooth/hcid.conf sorry for the foobar.

Last edited by linuxrebel; 2007-12-28 at 03:39.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:41.