public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Why always disconnect the headset?
@ 2008-07-27 20:41 Ludovico Cavedon
  2008-07-28 11:15 ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovico Cavedon @ 2008-07-27 20:41 UTC (permalink / raw)
  To: bluez-devel

Hi all,
I noticed that every time an application closes a SCO audio device, my
headset gets disconnected (HEADSET_STATE_DISCONNECTED). This means that
when the application reopens the device, it requires some seconds to get
the audio working.

So, why is the headset disconnected and not just left in the state
HEADSET_STATE_CONNECTED? (i.e. the same stat that the headset enters
when I turn it on and pairs with my pc).

Thanks,
Ludovico

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] Why always disconnect the headset?
  2008-07-27 20:41 [Bluez-devel] Why always disconnect the headset? Ludovico Cavedon
@ 2008-07-28 11:15 ` Johan Hedberg
  2008-08-24  9:34   ` Ludovico Cavedon
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2008-07-28 11:15 UTC (permalink / raw)
  To: BlueZ development

Hi Ludovico,

On Jul 27, 2008, at 23:41, Ludovico Cavedon wrote:
> I noticed that every time an application closes a SCO audio device, my
> headset gets disconnected (HEADSET_STATE_DISCONNECTED). This means  
> that
> when the application reopens the device, it requires some seconds to  
> get
> the audio working.
>
> So, why is the headset disconnected and not just left in the state
> HEADSET_STATE_CONNECTED? (i.e. the same stat that the headset enters
> when I turn it on and pairs with my pc).

You didn't mention which version of BlueZ you use, but in recent  
versions the logic is such that only implicitly created connections  
are automatically disconnected (after a 3 second timeout) but  
explicitly created connections stay up until you manually disconnect  
them. An implicitly created connection would be one caused by an ALSA  
application when it opens the audio device. Connections that fall into  
the explicitly created category are those that happen when you turn  
the headset on and it connects to the PC or when you call the  
Headset.Connect() D-Bus method and the PC connects to the headset.

Johan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] Why always disconnect the headset?
  2008-07-28 11:15 ` Johan Hedberg
@ 2008-08-24  9:34   ` Ludovico Cavedon
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovico Cavedon @ 2008-08-24  9:34 UTC (permalink / raw)
  To: BlueZ development

Hi Johan,

Johan Hedberg wrote:
> On Jul 27, 2008, at 23:41, Ludovico Cavedon wrote:
>> I noticed that every time an application closes a SCO audio device, my
>> headset gets disconnected (HEADSET_STATE_DISCONNECTED). This means  
>> that
>> when the application reopens the device, it requires some seconds to  
>> get
>> the audio working.
>>
>> So, why is the headset disconnected and not just left in the state
>> HEADSET_STATE_CONNECTED? (i.e. the same stat that the headset enters
>> when I turn it on and pairs with my pc).
> 
> You didn't mention which version of BlueZ you use, but in recent  
> versions the logic is such that only implicitly created connections  
> are automatically disconnected (after a 3 second timeout) but  
> explicitly created connections stay up until you manually disconnect  
> them. An implicitly created connection would be one caused by an ALSA  
> application when it opens the audio device. Connections that fall into  
> the explicitly created category are those that happen when you turn  
> the headset on and it connects to the PC or when you call the  
> Headset.Connect() D-Bus method and the PC connects to the headset.

Sorry I forgot: I am using 3.26 provided with Ubuntu hardy.
Good news, I'll update my bluez version!

Thank you for your answer,
Ludovico

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2008-08-24  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-27 20:41 [Bluez-devel] Why always disconnect the headset? Ludovico Cavedon
2008-07-28 11:15 ` Johan Hedberg
2008-08-24  9:34   ` Ludovico Cavedon

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