2008-01-03 04:06:55

by paul Rushworth

[permalink] [raw]
Subject: Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.

Brad Midgley <bmidgley <at> gmail.com> writes:

>
> Colin
>
> > On hitting the 'play' button there is a 2 second delay before XMMS begins to
> > play, and the Graphic EQ bars start to dance. Half a second, or so, of audio
> > can be heard from the headphones, after which they go silent
>
> this could be the scatternet problem we've been working over.
>
> what does
> hcitool con
> show during the audio playing?
>
> what other bluetooth devices are you using?
> is the headset trying to connect to a phone at the same time?
> do you know which bluetooth adapter your pc uses?
>
> if you have "master" in hcid.conf's lm setting and you take "rswitch"
> out of the lp setting, you are making the pc prefer to be master and
> to hopefully behave better.
>

I have a similar problem. I'm using Creative CB2530 headphones, and they work
absolutely fine for around 2-3 minutes and then audio stops working (does seem
slightly random, but always within 2-3 minutes.) This is with an audio sink
setup, my headphones connect automatically and work with all applications.

I saw your tips above about changing the settings in hcid.conf, which i have
done, and it has made no difference.

I'm seeing this in the syslog:

15:27:17 audio[5742]: stream state changed: OPEN -> STREAMING (starts working)
Then suddenly it stops:
15:30:16 audio[5742]: session_cb
15:30:16 audio[5742]: Received CLOSE_CMD
15:30:16 audio[5742]: SBC Source: Close_Ind
15:30:16 audio[5742]: stream state changed: STREAMING -> CLOSING
15:30:16 audio[5742]: stream state changed: CLOSING -> IDLE
15:30:16 audio[5742]: avdtp_unref(0x806b598): ref=2
15:30:16 audio[5742]: SBC Source SEP 0x80694b8 unlocked
15:30:16 audio[5742]: avdtp_unref(0x806b598): ref=1
15:30:16 audio[5742]: session_cb
15:30:16 audio[5742]: Disconnected from 00:12:0E:09:CF:9E

If i run ~$ hcitool con before it fails:
Connections:
< ACL 00:12:0E:09:CF:9E handle 41 state 1 lm MASTER



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2008-01-04 06:09:05

by Colin Murphy

[permalink] [raw]
Subject: Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.

On Wednesday 02 January 2008 05:03:16 Brad Midgley wrote:

> this could be the scatternet problem we've been working over.
>
> what does hcitool con show during the audio playing?
>
In the 2 second gap before I get any sound after hitting the play button I
get:-
colin@colin-desktop:~$ hcitool con
Connections:
< ACL 00:0A:94:A0:35:A5 handle 0 state 5 lm MASTER

About half a second before I get my brief half second audio burst this changes
to:-
colin@colin-desktop:~$ hcitool con
Connections:
< ACL 00:0A:94:A0:35:A5 handle 12 state 1 lm MASTER

and continues with the same response, even though the audio has now died, for
another 8 seconds, after which is goes back to:-
colin@colin-desktop:~$ hcitool con
Connections:
colin@colin-desktop:~$


> What other bluetooth devices are you using?

There are Bluetooth empowered phones near by, but their bluetooth activity is
turned off, mainly to save the phones battery power.

> is the headset trying to connect to a phone at the same time?

The headsets, I have two different types, both stereo headphones, have all
been paired with the phones, and proved to be working with them, but they
have not been connected to the phones during these tests.

> do you know which bluetooth adapter your pc uses?

I can only tell you it is manufactured by Broadcom and is a Bluetooth 2.0 +
EDR, according to the "My Devices > Information" panel in the Blueman gui
utility. How do I get better information?

Removing 'rswitch' from hcid.conf made no difference, even after
an '/etc/init.rc/bluetooth restart'.

On Thursday 03 January 2008 04:52:07 Brad Midgley wrote in reply to Paul
Rushworth's message :

> Does the gstreamer plugin route do the same thing? iirc:
>
> gst-launch filesrc location=song.mp3 ! mad ! audioconvert ! sbcenc !
> a2dpsink device=00:12:0E:09:CF:9E
>

For me, I've had success with this :-

colin@colin-desktop:~$ gst-launch filesrc location=Gently6.mp3 ! mad !
audioconvert ! sbcenc ! a2dpsink device=00:0A:94:A0:35:A5
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

And continued playing audio to me until I got bored, after about 10 minutes
later, and I hit '<CTRL> - C':-

Caught interrupt -- handling interrupt.
Interrupt: Setting pipeline to PAUSED ...
Execution ended after 624620447000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...
colin@colin-desktop:~$

It might be interesting to note that during this playback I was able to get:-

colin@colin-desktop:~$ hcitool con
Connections:
< ACL 00:0A:94:A0:35:A5 handle 12 state 1 lm MASTER AUTH ENCRYPT
SECURE
colin@colin-desktop:~$

I'll throw in another piece of the puzzle to. Just before I started replying
to your email I noticed that there was a Ubuntu update to be done for the
Bluez stuff, which I took advantage of. Once installed, I started up XMMS,
re-configured it to use the bluetooth device and hit the play button, and had
it playing for 6 minutes, all the way to the end of the track. Unfortunately,
when I tried to select a second track I found myself back with the old
problem, half a second of sound output and 8 seconds, to the second, of
silence, before XMMS resets the track.


--
[email protected]
Gotta' go, things to be, people to do, stuff to, err, stuff.




--
[email protected]
Gotta' go, things to be, people to do, stuff to, err, stuff.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2008-01-03 04:52:07

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.

Paul

> absolutely fine for around 2-3 minutes and then audio stops working (does seem
> slightly random, but always within 2-3 minutes.)

likely this is a different problem. Does the gstreamer plugin route do
the same thing? iirc:

gst-launch filesrc location=song.mp3 ! mad ! audioconvert ! sbcenc !
a2dpsink device=00:12:0E:09:CF:9E

with a few different mp3s for good measure.

--
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users