Linux bluetooth development
 help / color / mirror / Atom feed
* [RFC v2 0/5] sco: SCO socket option for mode
@ 2012-12-11 16:53 Frédéric Dalleau
  2012-12-11 16:53 ` [RFC v2 1/5] Bluetooth: Add option for SCO socket mode Frédéric Dalleau
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Frédéric Dalleau @ 2012-12-11 16:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Frédéric Dalleau

Hi,

This is v2 of the patch for codec option on SCO sockets. Some people asked
for more generic behavior, so I renamed the 'codec' field as 'mode' in order to
provide some way to extend the socket option. So it is still an RFC. Feel
free to comment the API in patch 1.

Since previous version, the patch is now able to use T2 codec settings and
switch to T1 if T2 fails (see HFP 1.6 p.102). The fallback is implemented by
using the connection attempt counter to determine what settings to use. I did
so because the fallback mechanism is more generic in this case, and this can be
reused for S3, S2, S1! However, one bit is still needed in the hci flags, and
it is likely that one bit will be needed for each supported 'modes'.

The fallback mechanism is only available on outgoing connections. For incoming
connections, the only to be sure to accept T2 is to call AcceptSyncConnReq with
2EV3 packet type only. But if an incoming connection was done with T1 (EV3)
then we cannot accept it at all: it is not possible to retry an AcceptSyncConn
Req. We can't guess in advance whether some third party wants to connect T2 or
T1. So currently, all supported packets type are accepted.

I also took Andrei comment into account exporting hci_connect_sco. This really
simplifies.

Let me know what you think.
Best regards,

Frédéric


Frédéric Dalleau (5):
  Bluetooth: Add option for SCO socket mode
  Bluetooth: Add setsockopt for SCO socket mode
  Bluetooth: Use codec to create SCO connection
  Bluetooth: Set parameters for outgoing connections
  Bluetooth: Fallback transparent SCO from T2 to T1

 include/net/bluetooth/hci_core.h |    5 +++-
 include/net/bluetooth/sco.h      |   19 ++++++++++++++
 net/bluetooth/hci_conn.c         |   30 +++++++++++++++++----
 net/bluetooth/hci_event.c        |   22 +++++++++++++---
 net/bluetooth/sco.c              |   53 +++++++++++++++++++++++++++++++++++---
 5 files changed, 116 insertions(+), 13 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2012-12-11 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 16:53 [RFC v2 0/5] sco: SCO socket option for mode Frédéric Dalleau
2012-12-11 16:53 ` [RFC v2 1/5] Bluetooth: Add option for SCO socket mode Frédéric Dalleau
2012-12-11 16:53 ` [RFC v2 2/5] Bluetooth: Add setsockopt " Frédéric Dalleau
2012-12-11 16:53 ` [RFC v2 3/5] Bluetooth: Use codec to create SCO connection Frédéric Dalleau
2012-12-11 16:53 ` [RFC v2 4/5] Bluetooth: Set parameters for outgoing connections Frédéric Dalleau
2012-12-11 16:53 ` [RFC v2 5/5] Bluetooth: Fallback transparent SCO from T2 to T1 Frédéric Dalleau

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