2008-04-29 12:53:44

by Jelle de Jong

[permalink] [raw]
Subject: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Hello everybody,

I have been playing around with bluetooth devices under linux the last
month or so. I got some very good and some very bad experience with it.

I am planning to create some wiki pages when I can get things working
100%. However I still got some major issues that I need to overcome.

I bought a Motorola Bluetooth S805 stereo headset. It should get the
following functionality:

- Playback of stereo quality audio without distortions and without delay
when playing audio and video at the same time.
- Generic playback controls like playpause/stop/next/previous.
- Internal microphone to record audio, used for audio recordings and
audio video conferences.

I was planning to get things up and running step by step:
- alsa configuration
- bluetooth configuration
- input device configuration

So the alsa configuration exist out of:
-- handle multiple audio streams (slave devices)
-- make the device default or as a plugin
-- use multiple bluetooth headset for the same audio (conference)
-- use multiple bluetooth headset per user based (multiseat)
-- force audio to use the correct bit-rate and frequency for the devices?
-- set-up correct buffer so that playback is without distortions of out
of sync audio and video. (testing with totem-xine?)
-- configure multiple profiles for stereo recording/playback

Would somebody be willing to sent his working alsa configuration files
that can do some of the above functions:

On this moment the headset plays stereo audio, but when watching video
with and audio dvd on totem-xine the audio is out of sync and when
scrolling or skipping chapters it get worse and hidd can even crash with
segmentation faults. There is also a lot of noise distortions.

Kind regards,

Jelle



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2008-05-01 03:08:18

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Jelle

> I got some kind of bandwidth issue with bluez. When I use my bluetooth
> headset and mouse at the same time, the audio gets interrupted. Both
> devices are master connections, if the headset is connected as slave,
> the connection is totally unusable, every other bluetooth event will
> make the audio stop in this case.
> - So how can we fix the bandwidth priority/distribution system with bluez?

since the computer's adapter is master on all the connections, it
shouldn't be a bandwidth/scatternet issue.

Someone found a background process was starting up bt scans regularly
that tanked a2dp streams but it doesn't sound like that is happening
to you.

I did notice quite a while ago that the nvidia driver would interrupt
a2dp while scrolling or moving windows. It must work some evil like
disabling interrupts for long periods. But that would happen even with
a wired mouse.

Do you have anything special with low-latency or other kernel process
scheduler options?

> When I play audio from a dvd, there is a little glitch in some of the
> audio frequency's, I think there is an issue with the sbc codec it
> appears only in some audio frequency circumstances.
> - Can we create a freq spectrum sweep to test the sdc codec on some
> glitches?

I suspect some less conservative encoder settings would help here, but
if you have an audio clip you can share, I'd be able to hear for
myself.

> When playing audio, it gets buffered, and when you hit the pause key the
> media should stop directly. The buffer is also a source for some major
> audio video synchronization issues that I have encountered. hitting
> pause and play resets the buffer, but it keeps getting out of sync after
> some time.

the delay when using the gstreamer plugin should be more consistent and shorter.

that's good to hear it basically works in windows... early a2dp
hardware had an inherent delay problem.

> I can't get two audio streams to mix and play at the same time on one
> bluetooth device.
> - Can we get support for multiple audio streams mixing together for the
> same bluetooth device?

that will be one of the benefits of a native pulse plugin when it's
written. the old school way to do this is dmix, but it will result in
more confusion and delay.

it might be possible to coax pulse to use the gstreamer plugins. this
setup would give you mixing and more stability. I would only try this
with native pulse clients.

--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-04-30 21:16:35

by Jelle de Jong

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Motorola Bluetooth DJ Headphones S805

Some basic things I encountered:

First to say I have tested all my devices, all at the same time on
Windows XP SP2 with the Toshiba bluetooth system, and everything was
working perfectly, all out of the box, including full headset controls.
But it's not GPL so not really useful, but it gives a prove of concepts.

Feedback directly bluez related:

I got some kind of bandwidth issue with bluez. When I use my bluetooth
headset and mouse at the same time, the audio gets interrupted. Both
devices are master connections, if the headset is connected as slave,
the connection is totally unusable, every other bluetooth event will
make the audio stop in this case.
- So how can we fix the bandwidth priority/distribution system with bluez?

When I play audio from a dvd, there is a little glitch in some of the
audio frequency's, I think there is an issue with the sbc codec it
appears only in some audio frequency circumstances.
- Can we create a freq spectrum sweep to test the sdc codec on some
glitches?

When playing audio, it gets buffered, and when you hit the pause key the
media should stop directly. The buffer is also a source for some major
audio video synchronization issues that I have encountered. hitting
pause and play resets the buffer, but it keeps getting out of sync after
some time.
- Can we remove the buffer and only create a fifo buffer for the
bluetooth transmission system. Just sent date into the fifo, so
guarantee a steady audio bitrate, without buffering and synchronisation
issues. (under Windows everything stops and plays directly and stays in
sync even video with audio)

I can't get two audio streams to mix and play at the same time on one
bluetooth device.
- Can we get support for multiple audio streams mixing together for the
same bluetooth device?

Probably not bluez related, but bluez can address the following issues:

I have tested xine- and gstreamer- based systems and different audio
players like mpg123 ogg123 mplayer.
There was only ONE system that gave stable usable results when playing
audio: The gstreamer backend with totem frontend wins.

ogg123 gives lots of distortions
- Can somebody please test ogg123 with alsa and bluetooth

mpg123 does sometimes work and sometimes is does not, pausing and
resuming resets most audio distortions, but it is not >80% stable so not
usable.

I recompiled the lateset mplayer svn to test dvd navigation, there are
loads of issues:
-- very high cpu load of 85% when playing mp3 (also with repo version)
-- no usable dvd navigation, buttons do not work correctly, there are
big blocks instead of usable buttons.

Video and audio: here are some major issues:
I am unable to get video and audio working correctly with xine or
gstreamer with totem frontend or mplayer or xine-ui.

xine is the worst, it crashes and freezes, has distortions and
synchronization issues. However xine is the only system that do play dvd
navigation, so for me this is an major killer issue.
Gstreamer has the best responsiveness and gives the idea of a short fifo
and audio buffers implementation, it is usable synchronised. But is has
no dvd navigation and is missing some codecs for some evil bad video
formats.

Conclusion:
- Bluetooth headset does not work 100% as it does with that other
operating system that we don't want to use.
- Major killer synchronisation, buffer, bandwidth sharing and codec issues.

Plan of Attack:
... please fill in you ideas ...

Kind regards,

Jelle

-- -- -- -- --

echo 'pcm.headset {
type bluetooth
device 00:0C:55:D1:C9:78
profile hifi
#profile voice
#profile auto
}
pcm.softvol {
type softvol
slave.pcm headset
control.name Headset
control.card 0
}
pcm.!default {
type plug
slave.pcm softvol
}' | tee $HOME/.asoundrc

cat $HOME/.asoundrc

sudo /etc/init.d/alsa-utils restart

echo 'options {
autoinit yes;
pairing multi;
offmode devdown;
passkey "0000";
security auto;
}
device {
name "[%h] / BT Device %d";
class 0x000100;
iscan enable;
pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}' | sudo tee /etc/bluetooth/hcid.conf

cat /etc/bluetooth/hcid.conf

sudo /etc/init.d/bluetooth restart

sudo /etc/init.d/sysklogd start
sudo /etc/init.d/klogd start
sudo /etc/init.d/bluetooth restart
sudo /etc/init.d/alsa-utils restart
sudo python $HOME/simple-agent

sudo tail --lines=100 --follow /var/log/syslog

sudo modprobe uinput

-- -- -- -- --

arecord -D bluetooth -f S16_LE | aplay -D bluetooth -f S16_LE

sudo hcitool sr 00:0C:55:D1:C9:78 master

sudo hcitool con
Connections:
< ACL 00:0C:55:D1:C9:78 handle 43 state 1 lm MASTER
< ACL 00:0B:0D:89:5B:77 handle 42 state 1 lm MASTER
< ACL 00:18:83:10:00:92 handle 53 state 1 lm MASTER
< ACL 00:07:61:0F:4A:60 handle 49 state 1 lm MASTER
< ACL 11:11:11:11:17:95 handle 46 state 1 lm MASTER

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-04-30 02:59:47

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Guys

I've moved the advanced/programming stuff to the end of this page
since it was mixed in with the basic howto.

http://wiki.bluez.org/wiki/HOWTO/AudioDevices

let's work on getting this more usable. The programming stuff needs
its own page probably and we could get more debugging tips in there.

Brad

On Tue, Apr 29, 2008 at 8:35 PM, Terry Johnson <[email protected]> wrote:
> Hi All,
>
> I've got a BlueAnt T8 that I've had working under Ubuntu for about 10
> seconds. Ever since that early success, the device will pair, but that's
> about the extent of it.
>
> I've installed Blueman and that works marvelously, except for getting
> actual audio out. I'm running out of hair and wish there was some
> documented way to debug this process. Even being able to identify the
> failing subsystem would be wonderful. If such a process could be
> detailed in a Wiki I'd be more than grateful.
>
> Terry
>
>
>
>
> Jelle de Jong wrote:
> > Hello everybody,
> >
> > I have been playing around with bluetooth devices under linux the last
> > month or so. I got some very good and some very bad experience with it.
> >
> > I am planning to create some wiki pages when I can get things working
> > 100%. However I still got some major issues that I need to overcome.
> >
> > I bought a Motorola Bluetooth S805 stereo headset. It should get the
> > following functionality:
> >
> > - Playback of stereo quality audio without distortions and without delay
> > when playing audio and video at the same time.
> > - Generic playback controls like playpause/stop/next/previous.
> > - Internal microphone to record audio, used for audio recordings and
> > audio video conferences.
> >
> > I was planning to get things up and running step by step:
> > - alsa configuration
> > - bluetooth configuration
> > - input device configuration
> >
> > So the alsa configuration exist out of:
> > -- handle multiple audio streams (slave devices)
> > -- make the device default or as a plugin
> > -- use multiple bluetooth headset for the same audio (conference)
> > -- use multiple bluetooth headset per user based (multiseat)
> > -- force audio to use the correct bit-rate and frequency for the devices?
> > -- set-up correct buffer so that playback is without distortions of out
> > of sync audio and video. (testing with totem-xine?)
> > -- configure multiple profiles for stereo recording/playback
> >
> > Would somebody be willing to sent his working alsa configuration files
> > that can do some of the above functions:
> >
> > On this moment the headset plays stereo audio, but when watching video
> > with and audio dvd on totem-xine the audio is out of sync and when
> > scrolling or skipping chapters it get worse and hidd can even crash with
> > segmentation faults. There is also a lot of noise distortions.
> >
> > Kind regards,
> >
> > Jelle
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Bluez-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-users
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>



--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-04-30 02:35:15

by Terry Johnson

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Hi All,

I've got a BlueAnt T8 that I've had working under Ubuntu for about 10
seconds. Ever since that early success, the device will pair, but that's
about the extent of it.

I've installed Blueman and that works marvelously, except for getting
actual audio out. I'm running out of hair and wish there was some
documented way to debug this process. Even being able to identify the
failing subsystem would be wonderful. If such a process could be
detailed in a Wiki I'd be more than grateful.

Terry


Jelle de Jong wrote:
> Hello everybody,
>
> I have been playing around with bluetooth devices under linux the last
> month or so. I got some very good and some very bad experience with it.
>
> I am planning to create some wiki pages when I can get things working
> 100%. However I still got some major issues that I need to overcome.
>
> I bought a Motorola Bluetooth S805 stereo headset. It should get the
> following functionality:
>
> - Playback of stereo quality audio without distortions and without delay
> when playing audio and video at the same time.
> - Generic playback controls like playpause/stop/next/previous.
> - Internal microphone to record audio, used for audio recordings and
> audio video conferences.
>
> I was planning to get things up and running step by step:
> - alsa configuration
> - bluetooth configuration
> - input device configuration
>
> So the alsa configuration exist out of:
> -- handle multiple audio streams (slave devices)
> -- make the device default or as a plugin
> -- use multiple bluetooth headset for the same audio (conference)
> -- use multiple bluetooth headset per user based (multiseat)
> -- force audio to use the correct bit-rate and frequency for the devices?
> -- set-up correct buffer so that playback is without distortions of out
> of sync audio and video. (testing with totem-xine?)
> -- configure multiple profiles for stereo recording/playback
>
> Would somebody be willing to sent his working alsa configuration files
> that can do some of the above functions:
>
> On this moment the headset plays stereo audio, but when watching video
> with and audio dvd on totem-xine the audio is out of sync and when
> scrolling or skipping chapters it get worse and hidd can even crash with
> segmentation faults. There is also a lot of noise distortions.
>
> Kind regards,
>
> Jelle
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-11 14:34:47

by Jelle de Jong

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Brad Midgley wrote:
> Jelle
>
>> With my trust ultra small bluetooth 2 usb adapter bt-2400p i got the
>> following messages:
>> kernel: l2cap_recv_acldata: Unexpected continuation frame (len 0)
>> last message repeated 151 times
>
> what chip is in the bt-2400p? I thought that would be the perfect
> thing to add bluetooth to an eee without opening it up.
>

Please read back my mails and look at the attachment, i included
attachments with much details about all the hardware.

Kind regards,

Jelle

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-11 14:26:01

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Jelle

> With my trust ultra small bluetooth 2 usb adapter bt-2400p i got the
> following messages:
> kernel: l2cap_recv_acldata: Unexpected continuation frame (len 0)
> last message repeated 151 times

what chip is in the bt-2400p? I thought that would be the perfect
thing to add bluetooth to an eee without opening it up.

--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-11 08:01:43

by Jelle de Jong

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Chris Carlin wrote:
> Firstly, on a whim I picked up a new USB bluetooth dongle.
>
> This one is an iogear class 2 bluetooth version 2.0 (EDR) model, while
> the previous one was class 1 version 1.2 and made by Linksys. Audio is
> much improved in that I can move my bluetooth mouse all I want without a
> single skip, but as soon as I touch the keyboard it still skips terribly.
>
> I can see now that the headphones (again, the S805s) are bluetooth 2.0
> with EDR, which I assume is what makes them work better, but both
> keyboard and mouse are version 1.2. I wonder if everything would work if
> it was all 2.0.
>
> Is there any way to adjust sbcbitpool for lower bandwidth? Such an
> option existed for the experimental alsa bluetooth stuff.
>
>
> Jelle de Jong wrote:
>> I bought an other new bt-2400p bluetooth adapter for testing, with
>> this adapter i cant get my devices manually in master mode:
>>
>> sudo hcitool con
>> Connections:
>> < ACL 00:0D:FD:18:6E:3C handle 12 state 1 lm SLAVE ENCRYPT
>>
>> sudo hcitool sr 00:0D:FD:18:6E:3C master
>> Switch role request failed: Input/output error
>
> I learned the hard way that roles can only be switched with encryption off.
> Try:
> sudo hcitool enc 00:0D:FD:18:6E:3C off
> sudo hcitool sr 00:0D:FD:18:6E:3C master
>
> But more importantly, I used to have to manually set things to master
> until I cleaned up my hcid.conf file, adding the correct lp and lm
> lines. I believe you have already corrected yours but you might want to
> double check them again since this gave me automatic master. Here are
> all of the uncommented lines from my file:
>
> options {
> autoinit yes;
> security user;
> pairing multi;
> }
>
> device {
> name "BlueZ (%d)";
> class 0x000100;
> iscan enable; pscan enable;
> lm accept,master;
> lp hold,sniff,park;
> }

Thanks, I seems you also need to remove the lp rswitch options to make
devices connect as master. To bad my encryption is gone now.

With my trust ultra small bluetooth 2 usb adapter bt-2400p i got the
following messages:
kernel: l2cap_recv_acldata: Unexpected continuation frame (len 0)
last message repeated 151 times

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-11 05:34:32

by Chris Carlin

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Firstly, on a whim I picked up a new USB bluetooth dongle.

This one is an iogear class 2 bluetooth version 2.0 (EDR) model, while
the previous one was class 1 version 1.2 and made by Linksys. Audio is
much improved in that I can move my bluetooth mouse all I want without a
single skip, but as soon as I touch the keyboard it still skips terribly.

I can see now that the headphones (again, the S805s) are bluetooth 2.0
with EDR, which I assume is what makes them work better, but both
keyboard and mouse are version 1.2. I wonder if everything would work if
it was all 2.0.

Is there any way to adjust sbcbitpool for lower bandwidth? Such an
option existed for the experimental alsa bluetooth stuff.


Jelle de Jong wrote:
> I bought an other new bt-2400p bluetooth adapter for testing, with
> this adapter i cant get my devices manually in master mode:
>
> sudo hcitool con
> Connections:
> < ACL 00:0D:FD:18:6E:3C handle 12 state 1 lm SLAVE ENCRYPT
>
> sudo hcitool sr 00:0D:FD:18:6E:3C master
> Switch role request failed: Input/output error

I learned the hard way that roles can only be switched with encryption off.
Try:
sudo hcitool enc 00:0D:FD:18:6E:3C off
sudo hcitool sr 00:0D:FD:18:6E:3C master

But more importantly, I used to have to manually set things to master
until I cleaned up my hcid.conf file, adding the correct lp and lm
lines. I believe you have already corrected yours but you might want to
double check them again since this gave me automatic master. Here are
all of the uncommented lines from my file:

options {
autoinit yes;
security user;
pairing multi;
}

device {
name "BlueZ (%d)";
class 0x000100;
iscan enable; pscan enable;
lm accept,master;
lp hold,sniff,park;
}



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-08 19:39:14

by Chris Carlin

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Just to finish this up, Jelle, what type of bluetooth adapter do you have?

~Chris

Jelle de Jong wrote:
> Hello everybody,
>
> I have been playing around with bluetooth devices under linux the last
> month or so. I got some very good and some very bad experience with it.
>
> I am planning to create some wiki pages when I can get things working
> 100%. However I still got some major issues that I need to overcome.
>
> I bought a Motorola Bluetooth S805 stereo headset. It should get the
> following functionality:
>
> - Playback of stereo quality audio without distortions and without delay
> when playing audio and video at the same time.
> - Generic playback controls like playpause/stop/next/previous.
> - Internal microphone to record audio, used for audio recordings and
> audio video conferences.
>
> I was planning to get things up and running step by step:
> - alsa configuration
> - bluetooth configuration
> - input device configuration
>
> So the alsa configuration exist out of:
> -- handle multiple audio streams (slave devices)
> -- make the device default or as a plugin
> -- use multiple bluetooth headset for the same audio (conference)
> -- use multiple bluetooth headset per user based (multiseat)
> -- force audio to use the correct bit-rate and frequency for the devices?
> -- set-up correct buffer so that playback is without distortions of out
> of sync audio and video. (testing with totem-xine?)
> -- configure multiple profiles for stereo recording/playback
>
> Would somebody be willing to sent his working alsa configuration files
> that can do some of the above functions:
>
> On this moment the headset plays stereo audio, but when watching video
> with and audio dvd on totem-xine the audio is out of sync and when
> scrolling or skipping chapters it get worse and hidd can even crash with
> segmentation faults. There is also a lot of noise distortions.
>
> Kind regards,
>
> Jelle
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-02 13:35:04

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Jelle

> xine and alsa do not work very well.... and for now there will be no
> attempts to fix this...?

some combinations are problemaic, but it's tricky and there's a lot to do...

> 1. How can we make bluez reserve 278kbps for an a2dp headset?

we don't have quality of service. it's not even in the current spec.

what you are seeing sounds more like a bug... if there is a single
piconet, no scans are being started, then we should get good
consistent throughput.

> 2. How can we make bluez force all a2dp headsets to become master
> instead of slave?

other services have to behave too. since there isn't a way to tell
services individually to role switch, the best we can do is put this
in hcid.conf. (I think you already did this)

lm accept,master;
lp hold,sniff,park;

> 3. How can we make bluez continue to sent data to the headset even when
> a new bluetooth devices connects.

iirc, it's outbound connections from your computer that briefly create
a scatternet until the role switch happens. there's no way around it.

> 4. Will pulse and gstreamer and bluez be able to work on a 200 MHz ARM
> system.... please keep things usable for embedded devices...

I've noticed gstreamer does take too much cpu, but everything else
behaves. I've been testing this stuff on a 400mhz gumstix... I like to
see it scale down too.

--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-01 16:36:16

by Chris Carlin

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

>
> does "sudo hcitool con" also show your adapter as master on all the
> connections? It's often been a scatternet (the computer's bt adapter
> switching from one piconet to another) that causes the problem.
>

Yes. Always.


> I would think so. A smaller bandwidth stream has less demand for
> continuous data flow.
>

Well the old a2dpd had a note in the configuration file saying the
following. Is there a way to adjust it in the current a2dp implementation?

# Allows to specify the sbc bitpool, this can help reducing bandwith
# 8 Allows to run on a 115200 bauds with corresponding quality ;)
# 64 needs USB or 921600 bauds
# Recommended value from Bluetooth spec. is 53
sbcbitpool=53


~Chris


Attachments:
(No filename) (700.00 B)
(No filename) (1.10 kB)
(No filename) (320.00 B)
(No filename) (164.00 B)
Download all attachments

2008-05-01 14:03:06

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Chris

> To add my experiences, audio only drops out when using other bluetooth
> devices connected to the same computer. That is, I can use bluetooth in the
> vicinity without interference, so it doesn't seem to be an over-the-air
> thing. Also, I see the problem with my bt keyboard: even pressing a single
> key can cause a drop while moving the mouse normally takes a couple of
> seconds to mess up the audio. I suspect this has something to do with
> changing connection state, but I don't actually know.

does "sudo hcitool con" also show your adapter as master on all the
connections? It's often been a scatternet (the computer's bt adapter
switching from one piconet to another) that causes the problem.

> Also, the problem is far, far worse with high quality music than, say, a
> poor quality book on tape. I almost never have a problem listening to voice
> but always when listening to symphonic music. Perhaps it's compressibility?

I would think so. A smaller bandwidth stream has less demand for
continuous data flow.

--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-05-01 13:41:19

by Chris Carlin

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

I use Motorola S805 headphones as well. a2dp is so much better now than it
was a year or so ago that I've been somewhat happily living with it.

On Wed, Apr 30, 2008 at 5:16 PM, Jelle de Jong <[email protected]>
wrote:

> I got some kind of bandwidth issue with bluez. When I use my bluetooth
> headset and mouse at the same time, the audio gets interrupted. Both
> devices are master connections, if the headset is connected as slave,
> the connection is totally unusable, every other bluetooth event will
> make the audio stop in this case.
> - So how can we fix the bandwidth priority/distribution system with bluez?


To add my experiences, audio only drops out when using other bluetooth
devices connected to the same computer. That is, I can use bluetooth in the
vicinity without interference, so it doesn't seem to be an over-the-air
thing. Also, I see the problem with my bt keyboard: even pressing a single
key can cause a drop while moving the mouse normally takes a couple of
seconds to mess up the audio. I suspect this has something to do with
changing connection state, but I don't actually know.

Also, the problem is far, far worse with high quality music than, say, a
poor quality book on tape. I almost never have a problem listening to voice
but always when listening to symphonic music. Perhaps it's compressibility?

I use both audacious and mplayer with identical results.
My system is very different from Jelle's: I have a low latency kernel with
upped jiffies and all that... it's gentoo-sources. Maybe observations on the
very different system will provide some clues.

~Chris


Attachments:
(No filename) (1.57 kB)
(No filename) (1.87 kB)
(No filename) (320.00 B)
(No filename) (164.00 B)
Download all attachments

2008-05-01 10:23:57

by Jelle de Jong

[permalink] [raw]
Subject: Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux

Brad Midgley wrote:
> Jelle
>
>> I got some kind of bandwidth issue with bluez. When I use my bluetooth
>> headset and mouse at the same time, the audio gets interrupted. Both
>> devices are master connections, if the headset is connected as slave,
>> the connection is totally unusable, every other bluetooth event will
>> make the audio stop in this case.
>> - So how can we fix the bandwidth priority/distribution system with bluez?
>
> since the computer's adapter is master on all the connections, it
> shouldn't be a bandwidth/scatternet issue.
>
> Someone found a background process was starting up bt scans regularly
> that tanked a2dp streams but it doesn't sound like that is happening
> to you.
>
> I did notice quite a while ago that the nvidia driver would interrupt
> a2dp while scrolling or moving windows. It must work some evil like
> disabling interrupts for long periods. But that would happen even with
> a wired mouse.
>
> Do you have anything special with low-latency or other kernel process
> scheduler options?
>
>> When I play audio from a dvd, there is a little glitch in some of the
>> audio frequency's, I think there is an issue with the sbc codec it
>> appears only in some audio frequency circumstances.
>> - Can we create a freq spectrum sweep to test the sdc codec on some
>> glitches?
>
> I suspect some less conservative encoder settings would help here, but
> if you have an audio clip you can share, I'd be able to hear for
> myself.
>
>> When playing audio, it gets buffered, and when you hit the pause key the
>> media should stop directly. The buffer is also a source for some major
>> audio video synchronization issues that I have encountered. hitting
>> pause and play resets the buffer, but it keeps getting out of sync after
>> some time.
>
> the delay when using the gstreamer plugin should be more consistent and shorter.
>
> that's good to hear it basically works in windows... early a2dp
> hardware had an inherent delay problem.
>
>> I can't get two audio streams to mix and play at the same time on one
>> bluetooth device.
>> - Can we get support for multiple audio streams mixing together for the
>> same bluetooth device?
>
> that will be one of the benefits of a native pulse plugin when it's
> written. the old school way to do this is dmix, but it will result in
> more confusion and delay.
>
> it might be possible to coax pulse to use the gstreamer plugins. this
> setup would give you mixing and more stability. I would only try this
> with native pulse clients.
>

a. I use the default kernel of debian sid, no low-latency kernel and my
system is an asus eeepc with all intel chips, except for the atheros
wireless chipset.

b. I will try to create an audio sample for you.

c. It fully 100% works under that other operating system:
http://imagebin.ca/view/CEtNv9zN.html


ok, so to summary:

development and testing focus of bluez is: native pulse audio system
with gstreamer multimedia backend.

xine and alsa do not work very well.... and for now there will be no
attempts to fix this...?

1. How can we make bluez reserve 278kbps for an a2dp headset?

2. How can we make bluez force all a2dp headsets to become master
instead of slave?

3. How can we make bluez continue to sent data to the headset even when
a new bluetooth devices connects.

4. Will pulse and gstreamer and bluez be able to work on a 200 MHz ARM
system.... please keep things usable for embedded devices...

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users