History log of /system/bt/bta/hf_client/bta_hf_client_sco.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4a3ab51c0c2d3f80601aec0511e210c55f74a1a0 29-Jun-2017 Joseph Pirozzo <pirozzoj@google.com> HFP Client connect Audio

Listen for incomming SCO connections any time the Hands Free Profile is
connected to a phone. Additionally allow eSCO connections on devices
that only support the standard SBC audio codec.

Bug: 62086689
Test: pair and connect a phone via HFP then start a phonecall and
enable and disable audio routing through BT observe that the connection
is established everytime.

Change-Id: I11319a4a85f8c9d36114a6fc09da0f0b8da16672
(cherry picked from commit 50d4656483d3f70b532646f83a6ad317bfdf3af8)
/system/bt/bta/hf_client/bta_hf_client_sco.cc
c752e135d66f80c0b2efc35292ab8ddfd8227d61 16-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Replace BT_ADDR with bd_addr_t in bta_sys related code

Test: compilation test
Change-Id: Idab6e9c03621c5540b4a3a7fa537dff71a25ce3f
/system/bt/bta/hf_client/bta_hf_client_sco.cc
744eeca761b6d52d4e5fbbfa49c2d2adde0e6981 16-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Replace BD_ADDR with bt_bdaddr_t in hf client related code

Test: compilation test
Change-Id: Iee6b07b6a919e5d061a04cb3d919166661e673e8
/system/bt/bta/hf_client/bta_hf_client_sco.cc
c2276b06572ab6fc1f900fbb1f41087e77d47e2a 10-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Use bt_bdaddr_t instead of BD_ADDR

Test: compilation test, sl4a GattReadTest
Change-Id: I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
/system/bt/bta/hf_client/bta_hf_client_sco.cc
d3ae18b3b3c65e38bbce5e3bf2882f4e050077dd 08-Jun-2017 Jack He <siyuanh@google.com> eSCO: Limit number of retries after mSBC connection failure

* When peer device supports mSBC and codec negotiation, Fluoride stack
will try to do the following when establishing a eSCO/SCO connection:
1) Negotiate to mSBC by sending +BCS:2
2) Try establishing eSCO/SCO connection using mSBC T2 settings
3) If that failed, downgrade to mSBC T1 settings and retry
4) If that failed, re-negotiate codec to CVSD, by sending +BCS:1
5) Retry using CVSD S4 (HFP 1.7 and above) or S3 settings
6) If this failed stop trying and report failure to upper stack
* Retry is achieved by:
* Retry is only possible when inuse_codec = BTA_AG_CODEC_MSBC
* Set codec_msbc_settings to BTA_AG_SCO_MSBC_SETTINGS_T1 when T2
failed to connect in step 3 above
* Set codec_fallback to true when T1 failed so that CVSD is used
in step 4 above
* Retry stop is achieved by:
* Set inuse_codec = BTA_AG_CODEC_CVSD
* Set codec_msbc_settings back to BTA_AG_SCO_MSBC_SETTINGS_T2
* Set codec_fallback to false and codec_updated to true so that
the stack is ready for the next application triggerred SCO
connection attempt
* Removed retry_with_sco_only as both Setup Synchronous Connection
Command (0x0028) and Enhanced Setup Synchronous Connection Command
(0x003D) fall back to SCO connection if eSCO is not supported.
See page 858/2772 and 895/2772 of BT4.2 specification document
* Besides both code paths are the same for retry_with_sco_only after
eSCO changes went in

Bug: 62426841
Test: make, HFP regression, testplans/91406
Change-Id: I205311c55e8763c48b6eb43c27f242927384036e
/system/bt/bta/hf_client/bta_hf_client_sco.cc
fe695a557a92053d4c44428ba08c0b8e945d4711 08-May-2017 Jack He <siyuanh@google.com> eSCO: Format changes to original vendor patch (4/5)

* Format changes to original vendor patch
* Re-order part of SCO creation code to improve readability
* Make log more concise and usefull

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: Ie0199519afb30f56568c04fef728fce44a172063
/system/bt/bta/hf_client/bta_hf_client_sco.cc
57f6508cf7b22788fa2e7a739cec241b785718fb 09-Feb-2017 Mudumba Ananth <ananthm%broadcom.com@gtempaccount.com> eSCO: BT 4.1 Enhanced SCO command (1/5)

Added support for BT 4.1 enhanced SCO feature on the stack.
This feature allows the stack to create a SCO connection with
remote device by using Hci_Enhanced_Setup_Synchronous_Connection
command after checking the controller (4.1) support for
enhanced SCO command.
Added the command parameters to use the command in both wide band
speech(WBS) and narrow band speech(NBS) scenarios.

Number of Broadcom vendor specific commands(VSCs)that are needed
to be sent to Broadcom controllers along with this command have
also been updated accordingly

NOTE: This change would also need a firmware patch for
the feature to work on Broadcom contollers which will
be delivered to Google in a separate change set.

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I1014d81be5cbe91078a4484dd072ac3957bfdfe4
/system/bt/bta/hf_client/bta_hf_client_sco.cc
ad372cfa3376f882046284a5655ed9c6fdf24daf 22-Feb-2017 Sanket Agarwal <sanketa@google.com> BTA HF_CLIENT: Always reply to +BCS

Phones don't like when we don't reply to +BCS codec-negotiation. We were
having this behavior because not always do we want to accept a
connection request over SCO. Instead of not replying to +BCS (which is
essentially a codec negotiation) we rather refuse the SCO request when
it comes in. This creates other issues such as some phones trying to
connect SCO in an infinite loop but it still keeps interoperability with
other devices such as iPhones and Microsoft phones intact

Bug: b/35469963
Bug: b/35431871
Bug: b/35419773

Test: SCO (Phone Audio) test with iPhone, Microsoft and Nexus phones

Change-Id: I5319edcb4da9d66c6d6b3a49742248c90dee98e6
/system/bt/bta/hf_client/bta_hf_client_sco.cc
ac109dc2256b90c5704bed20e4d15f2400502eaa 31-Jan-2017 Sanket Agarwal <sanketa@google.com> HF Client: SCO routing with multiple devices

For SCO it makes sense only to have one active connection at a time for
any device since simultaneous SCO calls in a single device is
un-reasonable. This change changes the SCO state machine in following
ways:
a) SCO is not setup automatically whenever AG wants, the client for this
BTA layer will have to call connect_audio to start SCO
b) Also when we disconnect SCO for a device, it does not go into a
listen state. We are making sure that the upper layer caller always has
to call connect to accept a connection

Bug: b/34518638
Test: Manual testing w/ multiple active calls and SCO switching

Change-Id: I6e6c4c6e6ee19e44e3ff14499fb99083102bde5a
/system/bt/bta/hf_client/bta_hf_client_sco.cc
5eccd90936d606e0070872b247fd3462e9c9c19b 01-Dec-2016 Sanket Agarwal <sanketa@google.com> Implement multiple control blocks for HF Client in BTA/BTIF

Test: Manual test for multiple incoming/outgoing HF connections

Bug: b/30984220
Change-Id: If66cad7c9bbc92051ebb7efb2b352c10e7514af3
/system/bt/bta/hf_client/bta_hf_client_sco.cc
bdcfc045f9d21afc1510cdad4fddd97a93c26477 01-Dec-2016 Sanket Agarwal <sanketa@google.com> BTA HF Client should use dynamic control block

Most of the functions in bta_hf_client_at.cc are
currently using a static field for passing callbacks to
BTIF layer. In order to support multi device we need to make
the functions have a parameter which denotes the device.

In order to pass all the required information we choose to
pass the control block for the device instead.

Bug: b/30984220
Test: Manual regression test

Change-Id: Iac692d7e28df3955ddbd28707c323c41714bd86a
/system/bt/bta/hf_client/bta_hf_client_sco.cc
1baaae3f34a667058e7f0c5f778357d98320cf38 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Fix comment formatting after clang-format

Test: mma -j32
Change-Id: Ic945ac421b1918527105c59674eda89afd3d4126
/system/bt/bta/hf_client/bta_hf_client_sco.cc
cd1fd07f1306e08fe048682dd5918987e579f937 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Apply clang-format

clang-format -i --style=file bta/*/*

(twice)

Test: mma -j32
Change-Id: Ib118b1dfb6a34f9a5bfe153d65841e9041165264
/system/bt/bta/hf_client/bta_hf_client_sco.cc
f355ef5a4d7fb667fc57a0dfb60f738d870e252e 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Prepare include statements for clang-format

bta: Separate includes of different types

Include "bta_sys.h" in bta/dm/bta_dm_int.h

Test: mma -j32
Change-Id: I292bc6518230201e1175937b9c6766c19709c9d5
/system/bt/bta/hf_client/bta_hf_client_sco.cc
8af480e24549ba51a3f6858d9d9af504715e0bea 09-Nov-2016 Myles Watson <mylesgw@google.com> bta: Remove double asterisks in comments

Double asterisks at the beginning of the line
sed -i s,"^[*][*]"," *", bta/*/*

Double asterisks after a space
sed -i s,"^ [*][*]\([^*]\)"," *\1", bta/*/*
sed -i s,"^ [*][*]$"," *", bta/*/*

Test: mma -j32
Change-Id: Ib83b802c7000176683b4e7f24d1255b3c2c6c01c
/system/bt/bta/hf_client/bta_hf_client_sco.cc
d7ffd64accbd50a27289a388856e56244ccbb5da 27-Oct-2016 Myles Watson <mylesgw@google.com> Remove deprecated UNUSED macro (5/5)

Include osi.h for UNUSED_ATTR.

Test: mma -j32

Change-Id: I43260669dc1f54639e46cc9620093d727ee86276
/system/bt/bta/hf_client/bta_hf_client_sco.cc
d35a648d39710bbc5ac59f8add85166455af5af7 27-Oct-2016 Myles Watson <mylesgw@google.com> Remove deprecated UNUSED macro (1/5)

Generated automatically with coccinelle

/* This rule matches functions with arguments
* that have an UNUSED(arg) in the body.
*/
@r1@
identifier arg;
identifier fn;
type t;
parameter list[n] P;
@@

fn(P, const t arg) { ...
UNUSED(arg);
...
}

/* This rule removes the UNUSED line, and adds
* UNUSED_ATTR to the parameter list.
*/
@depends on r1@
identifier r1.arg;
identifier r1.fn;
type r1.t;
parameter list[r1.n] r1.P;
typedef UNUSED_ATTR;
@@

fn(P,
- const t arg
+ UNUSED_ATTR GETRIDOFTHISCOMMA, const t arg
) { ...
-UNUSED(arg);
...
}

Test: mma -j32

Change-Id: Idcaadd688d669d484e557becd050e69454508f3c
/system/bt/bta/hf_client/bta_hf_client_sco.cc
b2a292b5d8df2f359c38b0787bc01181225a9bc9 15-Oct-2016 Pavlin Radoslavov <pavlin@google.com> Renamed most C files to C++: *.c to *.cc

Also:
- Fixed C++ related compilation errors.
- Added missing 'extern "C"' guards in some of the header files.
- Added missing LOCAL_CPP_EXTENSION to Android.mk files.
- Added-back btif/src/btif_mce.cc and bta/mce/bta_mce_* to
btif/Android.mk and bta/Android.mk respectively.
- Fixed the alphabetical ordering of the *.cc files in some
of the Android.mk files.
- Added missing Copyright header to "osi/include/list.h"
- Updated "osi/src/wakelock.cc" to use C++ std::string
instead of dynamic allocation of C-style strings.

Test: code compilation, unit tests, and A2DP streaming
Change-Id: Ia2f7215ed9df32775c701b68fc86b09875b942c7
/system/bt/bta/hf_client/bta_hf_client_sco.cc