The SCO socket code has been changed to use BluetoothSockets in
Honeycomb code base.
The audio system listens to the disconnection intent before starting
the A2DP streaming channel.
After these changes, the problem below shouldn't happen. We tested it
at UPF where older android phones were running into this problem with
headsets.
However, as this code change has happened in Honeycomb code base, for
phones it will be available in ice cream sandwich.
If you can't wait for the code to be open sourced, it might make sense
to implement the SCO part using BluetoothSocket. Since all the
Bluetooth Socket infrastructure is already there, this is a relatively
easy task.
> --
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>
Thanks
/Henrik
> > To unsubscribe from this group, send email to android-
> platform+u...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-
> platform+u...@googlegroups.com.
I think changing to BluetoothSockets should solve the part of closeNative being asynchronous. But unless the kernel patch for sco shutdown is applied and the linger option is set, it should still be asynchronous.
My main concern is about the effects on middleware by blocking 1-2 seconds while waiting for sco disconnect completion.
> -----Original Message-----
> From: android-...@googlegroups.com [mailto:android-
> plat...@googlegroups.com] On Behalf Of Jaikumar Ganesh
> Sent: onsdag den 15 juni 2011 06:19
> To: android-...@googlegroups.com
> Subject: Re: bluetooth: synchronous sco disconnect
>
> > To unsubscribe from this group, send email to android-
> platform+u...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-
> platform+u...@googlegroups.com.
All of that happens in a separate thread and not in the UI thread and
they are callbacks which inform the change in state.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.