linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
@ 2008-04-29 12:53 Jelle de Jong
  2008-04-30  2:35 ` Terry Johnson
  2008-05-08 19:39 ` Chris Carlin
  0 siblings, 2 replies; 18+ messages in thread
From: Jelle de Jong @ 2008-04-29 12:53 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-29 12:53 [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux Jelle de Jong
@ 2008-04-30  2:35 ` Terry Johnson
  2008-04-30  2:59   ` Brad Midgley
  2008-05-08 19:39 ` Chris Carlin
  1 sibling, 1 reply; 18+ messages in thread
From: Terry Johnson @ 2008-04-30  2:35 UTC (permalink / raw)
  To: BlueZ users

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
> Bluez-users@lists.sourceforge.net
> 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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-30  2:35 ` Terry Johnson
@ 2008-04-30  2:59   ` Brad Midgley
  2008-04-30 21:16     ` Jelle de Jong
  0 siblings, 1 reply; 18+ messages in thread
From: Brad Midgley @ 2008-04-30  2:59 UTC (permalink / raw)
  To: BlueZ users

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 <terryrjohnson@gmail.com> 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
>  > Bluez-users@lists.sourceforge.net
>  > 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
>  Bluez-users@lists.sourceforge.net
>  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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-30  2:59   ` Brad Midgley
@ 2008-04-30 21:16     ` Jelle de Jong
  2008-05-01  3:08       ` Brad Midgley
  2008-05-01 13:41       ` Chris Carlin
  0 siblings, 2 replies; 18+ messages in thread
From: Jelle de Jong @ 2008-04-30 21:16 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-30 21:16     ` Jelle de Jong
@ 2008-05-01  3:08       ` Brad Midgley
  2008-05-01 10:23         ` Jelle de Jong
  2008-05-01 13:41       ` Chris Carlin
  1 sibling, 1 reply; 18+ messages in thread
From: Brad Midgley @ 2008-05-01  3:08 UTC (permalink / raw)
  To: BlueZ users

 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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-01  3:08       ` Brad Midgley
@ 2008-05-01 10:23         ` Jelle de Jong
  2008-05-02 13:35           ` Brad Midgley
  0 siblings, 1 reply; 18+ messages in thread
From: Jelle de Jong @ 2008-05-01 10:23 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-30 21:16     ` Jelle de Jong
  2008-05-01  3:08       ` Brad Midgley
@ 2008-05-01 13:41       ` Chris Carlin
  2008-05-01 14:03         ` Brad Midgley
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Carlin @ 2008-05-01 13:41 UTC (permalink / raw)
  To: BlueZ users


[-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --]

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 <jelledejong@powercraft.nl>
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

[-- Attachment #1.2: Type: text/html, Size: 1913 bytes --]

[-- Attachment #2: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-01 13:41       ` Chris Carlin
@ 2008-05-01 14:03         ` Brad Midgley
  2008-05-01 16:36           ` Chris Carlin
  0 siblings, 1 reply; 18+ messages in thread
From: Brad Midgley @ 2008-05-01 14:03 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-01 14:03         ` Brad Midgley
@ 2008-05-01 16:36           ` Chris Carlin
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Carlin @ 2008-05-01 16:36 UTC (permalink / raw)
  To: BlueZ users


[-- Attachment #1.1: Type: text/plain, Size: 700 bytes --]

>
> 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

[-- Attachment #1.2: Type: text/html, Size: 1128 bytes --]

[-- Attachment #2: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-01 10:23         ` Jelle de Jong
@ 2008-05-02 13:35           ` Brad Midgley
  0 siblings, 0 replies; 18+ messages in thread
From: Brad Midgley @ 2008-05-02 13:35 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-04-29 12:53 [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux Jelle de Jong
  2008-04-30  2:35 ` Terry Johnson
@ 2008-05-08 19:39 ` Chris Carlin
  2008-05-09  9:04   ` Jelle de Jong
  1 sibling, 1 reply; 18+ messages in thread
From: Chris Carlin @ 2008-05-08 19:39 UTC (permalink / raw)
  To: BlueZ users

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
> Bluez-users@lists.sourceforge.net
> 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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-08 19:39 ` Chris Carlin
@ 2008-05-09  9:04   ` Jelle de Jong
  2008-05-09 12:58     ` Jelle de Jong
  0 siblings, 1 reply; 18+ messages in thread
From: Jelle de Jong @ 2008-05-09  9:04 UTC (permalink / raw)
  To: BlueZ users

[-- Attachment #1: Type: text/plain, Size: 3228 bytes --]

Chris Carlin wrote:
> 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.


I attached the information about the bluetooth adapter.

Is it a good idea to create some bug reports, then i can put all the 
information on one central place, and hopefully can also track the progress.

I switched back to alsa and lib-xine because gstreamer does not handles 
dvd playback very well, and pulse creates a to heavy cpu load for my system.

When playing back a dvd with totem with lib-xine and my bluetooth 
headset i got a few killer issues, that are directly bluez related:

1. when playing dvd audio, there is a audio conversion/compression 
problem, how higher the audio quality how greater the audio glitches. It 
is a really anoying glitch, it a sort of click sound.

A/52 2.0 (stereo)
48000 Hz
224 kbps

2. When my headset connects its becomes a slave by default, and i am 
also using a bluetooth mouse, that is master by default. When i move my 
mouse the audio stops and i need to pause and play to resync audio and 
video. I now execute sudo hcitool sr 00:0C:55:D1:C9:78 master everytime 
i start using the headset, but this causes the bluetooth mouse cursor to 
shock when playing high quality sound. And its not a cpu issue i am not 
using 100%. So i got a real bandwidth priority issue with bluez....?

Thanks in advance,

Jelle

[-- Attachment #2: cirago bluethooth usb adapter micro BTA-3210.txt --]
[-- Type: text/plain, Size: 1542 bytes --]

sudo hciconfig -a
hci0:   Type: USB
    BD Address: 00:1B:DC:00:3E:0B ACL MTU: 310:10 SCO MTU: 64:8
    UP RUNNING PSCAN ISCAN
    RX bytes:47051 acl:2702 sco:0 events:186 errors:0
    TX bytes:1622 acl:39 sco:0 commands:61 errors:0
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: '[debian-eeepc] / BT Device 0'
    Class: 0x080108
    Service Classes: Capturing
    Device Class: Computer, Server
    HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
    Manufacturer: Cambridge Silicon Radio (10)

sudo hciconfig hci0 features
hci0:   Type: USB
    BD Address: 00:1B:DC:00:3E:0B ACL MTU: 310:10 SCO MTU: 64:8
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
        <power control> <transparent SCO> <broadcast encrypt>
        <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
        <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
        <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
        <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
        <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
        <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended features>

[-- Attachment #3: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-09  9:04   ` Jelle de Jong
@ 2008-05-09 12:58     ` Jelle de Jong
  2008-05-10  9:11       ` Jelle de Jong
  0 siblings, 1 reply; 18+ messages in thread
From: Jelle de Jong @ 2008-05-09 12:58 UTC (permalink / raw)
  To: BlueZ users

[-- Attachment #1: Type: text/plain, Size: 3914 bytes --]

Jelle de Jong wrote:
> Chris Carlin wrote:
>> 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.
> 
> 
> I attached the information about the bluetooth adapter.
> 
> Is it a good idea to create some bug reports, then i can put all the 
> information on one central place, and hopefully can also track the 
> progress.
> 
> I switched back to alsa and lib-xine because gstreamer does not handles 
> dvd playback very well, and pulse creates a to heavy cpu load for my 
> system.
> 
> When playing back a dvd with totem with lib-xine and my bluetooth 
> headset i got a few killer issues, that are directly bluez related:
> 
> 1. when playing dvd audio, there is a audio conversion/compression 
> problem, how higher the audio quality how greater the audio glitches. It 
> is a really anoying glitch, it a sort of click sound.
> 
> A/52 2.0 (stereo)
> 48000 Hz
> 224 kbps
> 
> 2. When my headset connects its becomes a slave by default, and i am 
> also using a bluetooth mouse, that is master by default. When i move my 
> mouse the audio stops and i need to pause and play to resync audio and 
> video. I now execute sudo hcitool sr 00:0C:55:D1:C9:78 master everytime 
> i start using the headset, but this causes the bluetooth mouse cursor to 
> shock when playing high quality sound. And its not a cpu issue i am not 
> using 100%. So i got a real bandwidth priority issue with bluez....?
> 
> Thanks in advance,
> 
> Jelle
> 

I got a new device Motorola s9 today and did some more testing, it also 
has the issue that it connects in a way that when using other bluetooth 
devices the audio stops. When I manually set the device as master my 
bluetooth mouse is somewhat more responding then with the Motorola s805 
headset. But a reminder that everything works 100% fully under windows, 
so it should be possible to use the devices 100% with bluez somehow...

I attached device and hcitool info in addition the my previous message.

Kind regards,

Jelle

[-- Attachment #2: hcitool-info-motorola-s9.txt --]
[-- Type: text/plain, Size: 1140 bytes --]

config a2dp - device = 00:0D:FD:18:6E:3C access_mode = 2
codec sbc - frequency = 1 channel_mode = 1 allocation = 1 subbands = 1 blocks = 1 bitpool = 44

hcitool con
Connections:
    < ACL 00:0D:FD:18:6E:3C handle 42 state 1 lm MASTER ENCRYPT
    > ACL 11:11:11:11:17:95 handle 43 state 1 lm MASTER

sudo hcitool info 00:0D:FD:18:6E:3C
Requesting information ...
    BD Address:  00:0D:FD:18:6E:3C
    Device Name: Motorola S9
    LMP Version: 2.0 (0x3) LMP Subversion: 0xe90
    Manufacturer: Cambridge Silicon Radio (10)
    Features: 0xff 0xff 0x8b 0xf8 0x1b 0x18 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
        <transparent SCO> <broadcast encrypt> <enhanced iscan>
        <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
        <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
        <AFH class. slave> <AFH cap. master> <AFH class. master>
        <extended features>

[-- Attachment #3: hcitool-info-motorola-s805.txt --]
[-- Type: text/plain, Size: 1146 bytes --]

config a2dp - device = 00:0C:55:D1:C9:78 access_mode = 2
codec sbc - frequency = 1 channel_mode = 1 allocation = 1 subbands = 1 blocks = 1 bitpool = 44

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

sudo hcitool con
Connections:
    > ACL 11:11:11:11:17:95 handle 43 state 1 lm MASTER
    > ACL 00:0C:55:D1:C9:78 handle 42 state 1 lm MASTER

sudo hcitool info 00:0C:55:D1:C9:78
Requesting information ...
    BD Address:  00:0C:55:D1:C9:78
    Device Name: Motorola S805
    LMP Version: 2.0 (0x3) LMP Subversion: 0xa41
    Manufacturer: Cambridge Silicon Radio (10)
    Features: 0xff 0xff 0x8f 0x78 0x18 0x18 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
        <power control> <transparent SCO> <broadcast encrypt>
        <enhanced iscan> <interlaced iscan> <interlaced pscan>
        <inquiry with RSSI> <AFH cap. slave> <AFH class. slave>
        <AFH cap. master> <AFH class. master> <extended features>

[-- Attachment #4: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #5: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-09 12:58     ` Jelle de Jong
@ 2008-05-10  9:11       ` Jelle de Jong
  2008-05-11  5:34         ` Chris Carlin
  0 siblings, 1 reply; 18+ messages in thread
From: Jelle de Jong @ 2008-05-10  9:11 UTC (permalink / raw)
  To: BlueZ users

[-- Attachment #1: Type: text/plain, Size: 4820 bytes --]

Jelle de Jong wrote:
> Jelle de Jong wrote:
>> Chris Carlin wrote:
>>> 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.
>>
>>
>> I attached the information about the bluetooth adapter.
>>
>> Is it a good idea to create some bug reports, then i can put all the 
>> information on one central place, and hopefully can also track the 
>> progress.
>>
>> I switched back to alsa and lib-xine because gstreamer does not 
>> handles dvd playback very well, and pulse creates a to heavy cpu load 
>> for my system.
>>
>> When playing back a dvd with totem with lib-xine and my bluetooth 
>> headset i got a few killer issues, that are directly bluez related:
>>
>> 1. when playing dvd audio, there is a audio conversion/compression 
>> problem, how higher the audio quality how greater the audio glitches. 
>> It is a really anoying glitch, it a sort of click sound.
>>
>> A/52 2.0 (stereo)
>> 48000 Hz
>> 224 kbps
>>
>> 2. When my headset connects its becomes a slave by default, and i am 
>> also using a bluetooth mouse, that is master by default. When i move 
>> my mouse the audio stops and i need to pause and play to resync audio 
>> and video. I now execute sudo hcitool sr 00:0C:55:D1:C9:78 master 
>> everytime i start using the headset, but this causes the bluetooth 
>> mouse cursor to shock when playing high quality sound. And its not a 
>> cpu issue i am not using 100%. So i got a real bandwidth priority 
>> issue with bluez....?
>>
>> Thanks in advance,
>>
>> Jelle
>>
> 
> I got a new device Motorola s9 today and did some more testing, it also 
> has the issue that it connects in a way that when using other bluetooth 
> devices the audio stops. When I manually set the device as master my 
> bluetooth mouse is somewhat more responding then with the Motorola s805 
> headset. But a reminder that everything works 100% fully under windows, 
> so it should be possible to use the devices 100% with bluez somehow...
> 
> I attached device and hcitool info in addition the my previous message.

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 notished that when using only one bluetooth device greats a stable 
audio stream when using a bluethooth headset But when using multiple 
devices like a bluetooth headset and bluetooth mouse. The audio streams 
keeps getting interrupted for a few seconds, this happens also when not 
  touching the mouse and when both when the headset is in slave or 
master mode.

I attached all the device adapter information.

Can somebody enlight me why this is all happening?

Thanks in advance,

Jelle

[-- Attachment #2: cirago bluethooth usb adapter micro BTA-3210.txt --]
[-- Type: text/plain, Size: 1542 bytes --]

sudo hciconfig -a
hci0:   Type: USB
    BD Address: 00:1B:DC:00:3E:0B ACL MTU: 310:10 SCO MTU: 64:8
    UP RUNNING PSCAN ISCAN
    RX bytes:47051 acl:2702 sco:0 events:186 errors:0
    TX bytes:1622 acl:39 sco:0 commands:61 errors:0
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: '[debian-eeepc] / BT Device 0'
    Class: 0x080108
    Service Classes: Capturing
    Device Class: Computer, Server
    HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
    Manufacturer: Cambridge Silicon Radio (10)

sudo hciconfig hci0 features
hci0:   Type: USB
    BD Address: 00:1B:DC:00:3E:0B ACL MTU: 310:10 SCO MTU: 64:8
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
        <power control> <transparent SCO> <broadcast encrypt>
        <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
        <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
        <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
        <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
        <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
        <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended features>

[-- Attachment #3: trust micro bluetooth usb adapter 15606.txt --]
[-- Type: text/plain, Size: 1534 bytes --]

sudo hciconfig -a
hci0:   Type: USB
    BD Address: 00:1B:DC:00:32:71 ACL MTU: 310:10 SCO MTU: 64:8
    UP RUNNING PSCAN ISCAN
    RX bytes:967 acl:0 sco:0 events:27 errors:0
    TX bytes:360 acl:0 sco:0 commands:26 errors:0
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: '[debian-eeepc] / BT Device 0'
    Class: 0x080108
    Service Classes: Capturing
    Device Class: Computer, Server
    HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
    Manufacturer: Cambridge Silicon Radio (10)

sudo hciconfig hci0 features
hci0:   Type: USB
    BD Address: 00:1B:DC:00:32:71 ACL MTU: 310:10 SCO MTU: 64:8
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
        <power control> <transparent SCO> <broadcast encrypt>
        <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
        <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
        <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
        <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
        <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
        <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended features>

[-- Attachment #4: trust ultra small bluetooth 2 usb adapter bt-2400p.txt --]
[-- Type: text/plain, Size: 1542 bytes --]

sudo hciconfig hci0 -a
hci0:   Type: USB
    BD Address: 00:02:72:13:06:42 ACL MTU: 1017:8 SCO MTU: 64:8
    UP RUNNING PSCAN ISCAN
    RX bytes:24916 acl:2019 sco:0 events:612 errors:0
    TX bytes:1748434 acl:2133 sco:0 commands:39 errors:0
    Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: '[debian-eeepc] / BT Device 0'
    Class: 0x080100
    Service Classes: Capturing
    Device Class: Computer, Uncategorized
    HCI Ver: 2.0 (0x3) HCI Rev: 0x4000 LMP Ver: 2.0 (0x3) LMP Subver: 0x430e
    Manufacturer: Broadcom Corporation (15)

sudo hciconfig hci0 features
hci0:   Type: USB
    BD Address: 00:02:72:13:06:42 ACL MTU: 1017:8 SCO MTU: 64:8
    Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80
        <3-slot packets> <5-slot packets> <encryption> <slot offset>
        <timing accuracy> <role switch> <hold mode> <sniff mode>
        <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
        <HV3 packets> <u-law log> <A-law log> <CVSD> <power control>
        <transparent SCO> <broadcast encrypt> <EDR ACL 2 Mbps>
        <EDR ACL 3 Mbps> <enhanced iscan> <interlaced iscan>
        <interlaced pscan> <inquiry with RSSI> <extended SCO>
        <EV4 packets> <EV5 packets> <AFH cap. slave>
        <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
        <AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps>
        <EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended features>

[-- Attachment #5: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #6: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-10  9:11       ` Jelle de Jong
@ 2008-05-11  5:34         ` Chris Carlin
  2008-05-11  8:01           ` Jelle de Jong
  0 siblings, 1 reply; 18+ messages in thread
From: Chris Carlin @ 2008-05-11  5:34 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-11  5:34         ` Chris Carlin
@ 2008-05-11  8:01           ` Jelle de Jong
  2008-05-11 14:26             ` Brad Midgley
  0 siblings, 1 reply; 18+ messages in thread
From: Jelle de Jong @ 2008-05-11  8:01 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-11  8:01           ` Jelle de Jong
@ 2008-05-11 14:26             ` Brad Midgley
  2008-05-11 14:34               ` Jelle de Jong
  0 siblings, 1 reply; 18+ messages in thread
From: Brad Midgley @ 2008-05-11 14:26 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux
  2008-05-11 14:26             ` Brad Midgley
@ 2008-05-11 14:34               ` Jelle de Jong
  0 siblings, 0 replies; 18+ messages in thread
From: Jelle de Jong @ 2008-05-11 14:34 UTC (permalink / raw)
  To: BlueZ users

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
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-05-11 14:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 12:53 [Bluez-users] step by step - how to get your bluetooth stereo headset fully working with the bluez software stack under linux Jelle de Jong
2008-04-30  2:35 ` Terry Johnson
2008-04-30  2:59   ` Brad Midgley
2008-04-30 21:16     ` Jelle de Jong
2008-05-01  3:08       ` Brad Midgley
2008-05-01 10:23         ` Jelle de Jong
2008-05-02 13:35           ` Brad Midgley
2008-05-01 13:41       ` Chris Carlin
2008-05-01 14:03         ` Brad Midgley
2008-05-01 16:36           ` Chris Carlin
2008-05-08 19:39 ` Chris Carlin
2008-05-09  9:04   ` Jelle de Jong
2008-05-09 12:58     ` Jelle de Jong
2008-05-10  9:11       ` Jelle de Jong
2008-05-11  5:34         ` Chris Carlin
2008-05-11  8:01           ` Jelle de Jong
2008-05-11 14:26             ` Brad Midgley
2008-05-11 14:34               ` Jelle de Jong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).