[pulseaudio-discuss] [PATCH] bluetooth-discover set rate/channels for HSP/A2DP, and bluetooth-device use correct S16_LE sample format for HSP devices

Steve Jacobs Steve.Jacobs at sparta.com
Fri Dec 26 10:42:28 PST 2008


I recently ran into some very strange sounding audio when trying to use
pulseaudio and bluez4 together with a bluetooth handsfree device. I
noticed that doing a list-modules/list-sinks in pacmd showed that my
handsfree SCO audio device was set to 2 channel 44.1khz audio, which is
not correct. So I modified bluetooth-discover to set the information
correctly for SCO/HFP devices.

I also noticed that the sample format was being set as Unsigned 8-bit,
but all the documentation I can find for SCO audio specifies S16_LE as
the appropriate sample format. So I changed bluetooth-device to support
this change as well.

I am working on an embedded platform for most of my testing, and made
these changes against the 0.9.13 tree. However these patches are against
the current git master branch. 

This is my first time emailing in a patch, so please let me know if I
need to do anything differently. As I comment in the first patch, I am
not certain if setting 44.1khz is correct for A2DP devices in all cases.

Another observation I made, but did not address, is that if HFP mode is
disabled in audio.conf for bluez4, bluez will never create a Headset
device on DBUS, and the current bluetooth-discover module will not see
it. So currently, in order to use a bluetooth handsfree device with
pulse, you must have HFP mode enabled.

It is unclear to me who the current maintainer of the bluetooth plugin
is, but I would be interested in assisting in whatever way I can to get
bluetooth source support working.

-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Changed-discover-module-to-set-channel-and-rate.patch
Type: text/x-patch
Size: 2823 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081226/5fc7762d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Changed-device-code-to-allow-S16_LE-sample-format-fo.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081226/5fc7762d/attachment-0001.bin>


More information about the pulseaudio-discuss mailing list