2003-09-15 00:21:39

by Jonathan Paisley

[permalink] [raw]
Subject: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

Hi,

Having recently got a Bluetooth headset (HBH-60), I've put together a
preliminary ALSA driver which works with bluez.

http://www.dcs.gla.ac.uk/~jp/snd-bluez-sco/

I'd appreciate any feedback on this. The code is a bit messy at the
moment, but I've had fairly good results with it.

No changes to bluez are required at the moment -- all the work is done
through the SCO socket interface. Better performance could likely be
obtained with a slightly different interface.

This is a work-in-progress -- no guarantees that it will work!


An excerpt from the small README file:

ALSA Bluetooth Headset Driver
=============================

This is a preliminary driver for Bluetooth headsets. It has only been
tested with the following configurations:

USB Bluetooth adapter (Bluecore02 and 01b)
usb-ohci, usb-uhci and uhci driver (on a desktop and laptop)
kernel 2.4.20 single processor (there may be race conditions)
alsa-0.9.6
HBH-60 Bluetooth headset
recent bluez, hci_usb with my extra patches for SCO support (hciusb-isoc.patch)

Only 8-bit (8000hz) mode is supported at the moment. You must configure
your hci device with 'hciconfig hci0 voice 0x0040'.

The speaker and microphone volume levels are presented as ALSA mixer
controls. The HBH-60 only supports speaker volume, so I haven't managed
to test the microphone support.

The ALSA device doesn't produce or consume any audio data when the headset
isn't connected via the bluezsco control program -- this will cause apps
to time out after a few seconds.

Pressing the headset button while connected will disconnect. Pressing the
headset button while disconnected (assuming the headset decides to connect
to your PC rather than your phone) will not work, since the control
program doesn't (yet) act as a server.

Please get in touch if you manage to get it to work or have any questions.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2003-09-26 09:59:00

by Sjoerd Simons

[permalink] [raw]
Subject: Re: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

On Fri, Sep 26, 2003 at 09:59:43AM +0100, Jonathan Paisley wrote:
> Thanks for the info. I'm surprised that the latency is so bad. I didn't
> experience similar problems during my testing (although I haven't tested
> it with gnomemeeting yet). Can you try any other software to see what the
> latency is like?
>
> If you turn on the loopback mode in an ALSA mixer, do you experience
> similar latencies (loopback means the audio received is sent straight back
> to the headset).

Sorry my measuring was flawed.. Apperently the h323 latency was caused
by something else and cat /dev/dspX > /dev/dspY always causes a
latency (pulling brown paper bag over head :( )

Sjoerd
--
Don't have good ideas if you aren't willing to be responsible for them.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2003-09-26 08:59:43

by Jonathan Paisley

[permalink] [raw]
Subject: Re: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

On Fri, 26 Sep 2003 10:51am +0200, Sjoerd Simons wrote:

> On Mon, Sep 15, 2003 at 01:21:39AM +0100, [email protected] wrote:
> > Hi,
> >
> > Having recently got a Bluetooth headset (HBH-60), I've put together a
> > preliminary ALSA driver which works with bluez.
> >
> > http://www.dcs.gla.ac.uk/~jp/snd-bluez-sco/
> >
> > I'd appreciate any feedback on this. The code is a bit messy at the
> > moment, but I've had fairly good results with it.
>
> Works fine with a globecom BT1000 headset and a csr usb dongle. Only the
> record latency is bad (> 1 second).
>
> I'm using it in combination with gnomemeeting and besides the latency no
> problems, nice work :)

Thanks for the info. I'm surprised that the latency is so bad. I didn't
experience similar problems during my testing (although I haven't tested
it with gnomemeeting yet). Can you try any other software to see what the
latency is like?

If you turn on the loopback mode in an ALSA mixer, do you experience
similar latencies (loopback means the audio received is sent straight back
to the headset).



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2003-09-26 08:51:00

by Sjoerd Simons

[permalink] [raw]
Subject: Re: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

On Mon, Sep 15, 2003 at 01:21:39AM +0100, [email protected] wrote:
> Hi,
>
> Having recently got a Bluetooth headset (HBH-60), I've put together a
> preliminary ALSA driver which works with bluez.
>
> http://www.dcs.gla.ac.uk/~jp/snd-bluez-sco/
>
> I'd appreciate any feedback on this. The code is a bit messy at the
> moment, but I've had fairly good results with it.

Works fine with a globecom BT1000 headset and a csr usb dongle. Only the
record latency is bad (> 1 second).

I'm using it in combination with gnomemeeting and besides the latency no
problems, nice work :)

Sjoerd
--
Reality is nothing but a collective hunch.
-- Lily Tomlin


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2003-09-15 14:51:11

by Jonathan Paisley

[permalink] [raw]
Subject: Re: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

On Mon, 15 Sep 2003 3:30pm +0100, James Courtier-Dutton wrote:

> I was also working on this. Do you have full duplex sound working ?
> I was under the impression that changes needed to be made to the
> bluetooth stack before full duplex worked.

Yes, full duplex seems to work. I've tested this out using the ALSA 0.9
driver for the Robust Audio Tool.

In fact, at the low level full duplex is a necessity since the outgoing
SCO frames are currently clocked by the arrival and sizing of incoming
frames. I haven't tried implementing any timers to replace this, but it's
something that would be worth investigating.

I'm glad to hear you're also working on a driver -- no doubt more ideas on
good ways of implementation would be useful. How far have you got?

Thanks.


PS:

I've just noticed a line missing from my patch, which will show up if you
don't already have the snd-hwdep.o module installed:

Add this line to alsa-driver-0.9.6/alsa-kernel/core/Makefile:

obj-$(CONFIG_SND_BLUEZ_SCO) += snd-pcm.o snd-page-alloc.o snd.o snd-hwdep.o



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2003-09-15 14:30:53

by James Courtier-Dutton

[permalink] [raw]
Subject: Re: [Bluez-devel] [ANNOUNCE] ALSA Bluetooth Headset Driver

[email protected] wrote:
> Hi,
>
> Having recently got a Bluetooth headset (HBH-60), I've put together a
> preliminary ALSA driver which works with bluez.
>
> http://www.dcs.gla.ac.uk/~jp/snd-bluez-sco/
>
> I'd appreciate any feedback on this. The code is a bit messy at the
> moment, but I've had fairly good results with it.
>
> No changes to bluez are required at the moment -- all the work is done
> through the SCO socket interface. Better performance could likely be
> obtained with a slightly different interface.
>
> This is a work-in-progress -- no guarantees that it will work!
>
>
> An excerpt from the small README file:
>
> ALSA Bluetooth Headset Driver
> =============================
>
> This is a preliminary driver for Bluetooth headsets. It has only been
> tested with the following configurations:
>
> USB Bluetooth adapter (Bluecore02 and 01b)
> usb-ohci, usb-uhci and uhci driver (on a desktop and laptop)
> kernel 2.4.20 single processor (there may be race conditions)
> alsa-0.9.6
> HBH-60 Bluetooth headset
> recent bluez, hci_usb with my extra patches for SCO support (hciusb-isoc.patch)
>
> Only 8-bit (8000hz) mode is supported at the moment. You must configure
> your hci device with 'hciconfig hci0 voice 0x0040'.
>
> The speaker and microphone volume levels are presented as ALSA mixer
> controls. The HBH-60 only supports speaker volume, so I haven't managed
> to test the microphone support.
>
> The ALSA device doesn't produce or consume any audio data when the headset
> isn't connected via the bluezsco control program -- this will cause apps
> to time out after a few seconds.
>
> Pressing the headset button while connected will disconnect. Pressing the
> headset button while disconnected (assuming the headset decides to connect
> to your PC rather than your phone) will not work, since the control
> program doesn't (yet) act as a server.
>
> Please get in touch if you manage to get it to work or have any questions.
>

I was also working on this. Do you have full duplex sound working ?
I was under the impression that changes needed to be made to the
bluetooth stack before full duplex worked.

Cheers
James





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel