OSDN Git Service

HFP: Workaround for car kits that do not send AT+BAC command
authorJack He <siyuanh@google.com>
Tue, 1 May 2018 06:59:40 +0000 (23:59 -0700)
committerHansong Zhang <hsz@google.com>
Fri, 11 May 2018 03:56:44 +0000 (20:56 -0700)
commite42cf153f8cc9f2b80153aa3eb7c0be04f3c326f
tree1bdaab8d20391ca5433179c5f4c98421ef2f3985
parent5ac698c04ebb5fcaf697be041c9cd9c4261ea4e8
HFP: Workaround for car kits that do not send AT+BAC command

* Some misbehaving HF devices (e.g. some Hyundai car kits) indicate
  their support on Wide Band Speech and Codec Negotiation, but do not
  send the required AT+BAC command during Service Level Connection
  setup. However, such car kits still expect Fluoride to do codec
  negotiation during SCO setup.
* This CL adds a workaround so that when HF indicates support for WBS
  and codec negotiation, Fluoride will attempt codec negotiation even
  though AT+BAC is never received.
* Store the SDP feature locally. If WBS is supported and no AT+BAC is
  received, use the SDP features to set the suported codec.

Bug: 77883405
Test: make, connect SCO to and from Hyundai car kits
Change-Id: I2be6007022183cac5b9006f37089a587b4a67372
bta/ag/bta_ag_act.cc
bta/ag/bta_ag_cmd.cc
bta/ag/bta_ag_int.h
bta/ag/bta_ag_main.cc
bta/ag/bta_ag_sdp.cc
bta/include/bta_ag_api.h