public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
@ 2008-01-01 21:09 Colin Murphy
  2008-01-02  5:03 ` Brad Midgley
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Murphy @ 2008-01-01 21:09 UTC (permalink / raw)
  To: BlueZ users

I have XMMS set up to play alsa audio through bluetooth.  This is what happens 
when I try to play some audio.  

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, even though the 
Graphic EQ bars continue to dance for another 8 seconds.  After the bars have 
stopped dancing I get a message that the bluetooth connection has been 
dropped. 

There's another glimpse from my /var/log/syslog file hiding at 
http://pastebin.ubuntu.com/3181/

Is this an alsa or bluetooth problem?   Because the GEq bars continue to dance 
it makes me think something must be getting through to XMMS, but it might 
also be considered correct for the bluetooth connection to be dropped 
automatically after 8 seconds of silence, I don't know.  I also don't know 
how to find the solution.  Any help much appreciated, especially advice on 
where else, log files, etc, to look.

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

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

* Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
  2008-01-01 21:09 [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection Colin Murphy
@ 2008-01-02  5:03 ` Brad Midgley
  2008-01-03  4:06   ` paul Rushworth
  0 siblings, 1 reply; 6+ messages in thread
From: Brad Midgley @ 2008-01-02  5:03 UTC (permalink / raw)
  To: BlueZ users

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.

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

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

* Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
  2008-01-02  5:03 ` Brad Midgley
@ 2008-01-03  4:06   ` paul Rushworth
  2008-01-03  4:52     ` Brad Midgley
  0 siblings, 1 reply; 6+ messages in thread
From: paul Rushworth @ 2008-01-03  4:06 UTC (permalink / raw)
  To: bluez-users

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

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

* Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
  2008-01-03  4:06   ` paul Rushworth
@ 2008-01-03  4:52     ` Brad Midgley
  2008-01-03  7:08       ` Paul Rushworth
  2008-01-04  6:09       ` Colin Murphy
  0 siblings, 2 replies; 6+ messages in thread
From: Brad Midgley @ 2008-01-03  4:52 UTC (permalink / raw)
  To: BlueZ users

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

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

* Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
  2008-01-03  4:52     ` Brad Midgley
@ 2008-01-03  7:08       ` Paul Rushworth
  2008-01-04  6:09       ` Colin Murphy
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Rushworth @ 2008-01-03  7:08 UTC (permalink / raw)
  To: bluez-users

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


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

The same thing happens; it disconnects after about 3 minutes:


19:59:40  audio[7031]: stream state changed: OPEN -> STREAMING
20:02:34  audio[7031]: session_cb
20:02:34  audio[7031]: Received CLOSE_CMD
20:02:34  audio[7031]: SBC Source: Close_Ind
20:02:34  audio[7031]: stream state changed: STREAMING -> CLOSING
20:02:34  audio[7031]: stream state changed: CLOSING -> IDLE
20:02:34  audio[7031]: avdtp_unref(0x806b588): ref=2
20:02:34  audio[7031]: SBC Source SEP 0x80694b8 unlocked
20:02:34  audio[7031]: avdtp_unref(0x806b588): ref=1
20:02:34  audio[7031]: Unix client disconnected (fd=11)
20:02:34  audio[7031]: session_cb
20:02:34  audio[7031]: Disconnected from 00:12:0E:09:CF:9E
20:02:34  audio[7031]: avdtp_unref(0x806b588): ref=0
20:02:34  audio[7031]: avdtp_unref(0x806b588): freeing session and 
removing from list
20:02:35  NetworkManager: <debug> [1199343755.068464] 
nm_hal_device_removed():
Device removed (hal udi is '/org/freedesktop/Hal/devices/
usb_device_ffffffff_ffffffff_noserial_bluetooth_hci_bluetooth_hci').



Ubuntu 7.10 (2.6.22-14-generic) with bluez from the Gutsy repo's,
for what its worth.


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

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

* Re: [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection.
  2008-01-03  4:52     ` Brad Midgley
  2008-01-03  7:08       ` Paul Rushworth
@ 2008-01-04  6:09       ` Colin Murphy
  1 sibling, 0 replies; 6+ messages in thread
From: Colin Murphy @ 2008-01-04  6:09 UTC (permalink / raw)
  To: BlueZ users

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.


-- 
Colin@spudulike.me.uk
Gotta' go, things to be, people to do, stuff to, err, stuff.




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

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

end of thread, other threads:[~2008-01-04  6:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-01 21:09 [Bluez-users] Stereo audio headset - half a second of audio, 8 seconds of silence, then disconnection Colin Murphy
2008-01-02  5:03 ` Brad Midgley
2008-01-03  4:06   ` paul Rushworth
2008-01-03  4:52     ` Brad Midgley
2008-01-03  7:08       ` Paul Rushworth
2008-01-04  6:09       ` Colin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox