Improve documentation for bluetooth-alsa

Bug #134297 reported by Michael R. Head
6
Affects Status Importance Assigned to Milestone
bluetooth-alsa (Debian)
Fix Released
Undecided
Krzysztof Burghardt
bluetooth-alsa (Ubuntu)
Fix Released
Undecided
Krzysztof Burghardt

Bug Description

Binary package hint: bluetooth-alsa

Well, I've got a Motorola HT820 stereo headset that _should_ be working with a2dpd, but I've been unable to get it fully working. I've gone through the steps in /usr/share/doc/bluetooth-alsa/build.html (as well as the rather skimpy and presumably incomplete steps in /usr/share/doc/bluetooth-alsa/README.Debian).

Is a2dpd meant to be working in Ubuntu, or are there kernel drivers that need to be added that aren't yet?

Put another way, can the documentation be updated so that it's easy(er) to get bluetooth headsets up and running?

Changed in bluetooth-alsa:
assignee: nobody → burghardt
status: New → Incomplete
assignee: nobody → burghardt
status: New → Incomplete
Revision history for this message
Krzysztof Burghardt (burghardt) wrote :

I think it should work.

Could you help me a bit and show what you done to configure BT headset?
Did you pair your headset with computer?
Did you add A2DP section to ~/.asoundrc?
Did you create ~/.a2dprc and set address of your BT device?
Did you run a2dpd? What was its output?
Did you configure some media player to use headset?

If you have any ideas for documentation improvements (or can prepare guide) share it!

Revision history for this message
Michael R. Head (burner) wrote :
Revision history for this message
Michael R. Head (burner) wrote :
Revision history for this message
Michael R. Head (burner) wrote :
Revision history for this message
Michael R. Head (burner) wrote :

As far as I can tell, the headphone is paired (there's a bluetooth popup asking for the password, which I enter, and then the bluetooth applet tells me it's "bonded" and my headphones beep). I ask a2dpd to pair by doing "a2dpd_ctl Connect" when a2dpd is running.

here's the output of aplay -l:
burner@phoenix:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: HDA Generic [HDA Generic]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Changed in bluetooth-alsa:
status: Incomplete → New
Revision history for this message
Michael R. Head (burner) wrote :

Here's the result of running a2dpd_ctrl Connect a second time.

Revision history for this message
Michael R. Head (burner) wrote :
Revision history for this message
Michael R. Head (burner) wrote :

Oh... I see now... alsa won't advertise the a2dpd device. If I do:

"aplay -D a2dpd /usr/share/sounds/login.wav"

I get sound coming through my headphones.

OK, so I have some comments a few updates to the documentation.

bluetooth-alsa for Debian
-------------------------

1. Original cvs module name was "plugz".
   I have changed this to something more meaningful.

2. Sample configuration file is named sample.asoundrc.
   Copy it to ~/.asoundrc and if you have SCO device
   (most mono headsets) set default address of it.

-- I'm not using a SCO device, but where would I put the address if I did?

3. If you own an A2DP device (most stereo headsets)
   copy sample.a2dprc to ~/.a2dprc and set at last
   your bluetooth headset address.

-- Specifically, put the address of your headset on the "address=" line at the end of .a2dprc. You can determine the address by running "hcitool scan" (when the device is in pairing mode?)

4. SCO devices (most mono headsets) may need kernel patch.
   If it does not work for you try applying to your kernel
   patches found in /usr/share/doc/bluetooth-alsa/patches/.

-- I'd add a couple steps here about running a2dpd, setting the device into pairing mode, running a2dp Connect (maybe twice)

-- Then mention that it can be tested by running aplay -D a2dpd /usr/share/sounds/login.wav

-- I'd also point out that Totem can be set to use the headphones by doing:
gconftool -t string --set /system/gstreamer/0.10/default/musicaudiosink 'alsasink device=a2dpd'

5. For detail setup information refer to build.html.

Revision history for this message
Michael R. Head (burner) wrote :

By the way, thanks for packaging this software and making it available!

Revision history for this message
Michael R. Head (burner) wrote :

One more thing, is it possible to reduce the latency in some way (I'm getting about a 4-5 second delay between pressing play or stop and hearing the output)? If there is, can it be added to the README? If there isn't, shall I file a bug or is this expected?

Revision history for this message
Krzysztof Burghardt (burghardt) wrote :

Michael, you are a really good bug reporter :) I wish I have all bugs fixed this way.

So, your headset is working. It's true that virtual alsa devices are not visible with "aplay -l".
This is not a bug. You have to known how you name your device (default: a2dpd).

I have 2-3 second delay with start/stop. It probably depends on hardware (typical l2ping to my headset is about 40ms) and its ability to create/destroy sessions in fast way. Also you may try to disable debug (in ~/.a2dprc). But tu be sure with this we should ask upstream.

I will update README.Debian in my next upload.

Revision history for this message
Michael R. Head (burner) wrote :

Cool. I disabled debug, but it didn't help all that much. One of the symptoms I see (when debug is enabled) is this:
....
A2DPD[11:58:47.006]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.162]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.328]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.485]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.646]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.804]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:47.965]: a2dp_transfer_raw: send (retry).
A2DPD[11:58:48.124]: a2dp_transfer_raw: send (retry).
....

But at least it's working :-) Can't wait to bring the headphones to the computer lab on Monday! I'm so tired of being tethered to my computer there. Hopefully upstream will keep improving it.

Oh, one more thing to add:
You could add some more cmd examples to the a2dprc.sample file:
cmdplay=rhythmbox-client --play
cmdpause=rhythmbox-client --play-pause
cmdprev=rhythmbox-client --next
cmdnext=rhythmbox-client --previous
cmdnew=rhythmbox-client
cmdstop=rhythmbox-client --stop

Revision history for this message
Krzysztof Burghardt (burghardt) wrote :

This is a upstream shipped file, so I will keep it unchanged. I add this example to README.Debian. Unfortunately my headset has no programmable buttons and I cannot test this feature at all.

Revision history for this message
Krzysztof Burghardt (burghardt) wrote :
Changed in bluetooth-alsa:
status: Incomplete → In Progress
status: New → Confirmed
Revision history for this message
Francisco Athens (freelikegnu) wrote :

I've noticed that xmms is rather buggy likes to hang up a2dpd (100% CPU must hard reboot). Beep-Media-Player works much better (about 5% CPU) on 1Ghz PentiumM and should be mentioned as an alternative player the setup is similar to xmms too. I've noticed vast improvements to bluez and bluetooth-alsa in the past month on Gutsy! Keep up the great work!

Revision history for this message
Krzysztof Burghardt (burghardt) wrote :

Fixed bluetooth-alsa_0.5cvs20070908-1 entered Debian unstable.

Changed in bluetooth-alsa:
status: In Progress → Fix Released
status: Confirmed → In Progress
Changed in bluetooth-alsa:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.