History log of /system/bt/bta/ag/bta_ag_sco.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
47616530ceea2ea6432ffb35cd8a3fc0a56365b5 08-Sep-2017 Jakub Pawlowski <jpawlowski@google.com> Fix alarms being posted on wrong thread

Alarms from btu_bta_alarm_queue and btu_generic_alarm_queue should be
processed on the main MessageLoop thread.
Replaced obsoleted alarm_set_on_queue() alarm API with the new
alarm_set_on_mloop() API

Test: manual
Bug: 65078753
Change-Id: I54b472b39b44a6c541dbdcdad7414056d0dd4163
Merged-In: I54b472b39b44a6c541dbdcdad7414056d0dd4163
(cherry picked from commit be8bbd7a83ec8bc900fac58a03010fbcb74956c9)
/system/bt/bta/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_sco.cc
acdc11cae50e335175cfb16935dec160b0327966 19-Apr-2017 Zach Johnson <zachoverflow@google.com> Allow blocking AG SCO connects by policy

Needed for devices that support both HFP AG and HFP HF.

btsnoop logs show the sequence of events leading to failure:
(corroborated by bt logcat)

1. ACL connection with remote phone established on handle 0x01
2. ACL connection with remote headset established on handle 0x02
3. Incoming call in HF role from phone
4. Phone call locally published to telecom
5. Answer incoming call
6. SCO connection established with phone in HF role
7. AG role with headset picks up on call state change to answered
via BTA_AG_IN_CALL_CONN_RES
8. Inside handler for BTA_AG_IN_CALL_CONN_RES, bta_ag_sco_open called
to establish the SCO connection in the AG role with the headset,
stomping on the previous (wanted) SCO connection with the phone.

Fix is to publish the SCO audio route policy to fluoride, so we can
stop 8 from happening.

Bug: 32958838
Test: manual:
received incoming call in HF role, audio worked both ways;
recieved incoming MT call, headset audio in AG role worked both ways
Change-Id: I12961598e8200bd1d5adb46ee8ec3a802114b80a
/system/bt/bta/ag/bta_ag_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/ag/bta_ag_sco.cc
400ac497f45181d3c64f6a19687992de9b69b094 08-May-2017 Jack He <siyuanh@google.com> eSCO: Additional fix to get eSCO working for HFP and HSP (3/5)

* Removed vendor specific call after codec negotiation and before eSCO
command is sent to Bluetooth chip
* Removed vendor specific call after a SCO connection is requested by
the peer
* Removed vendor specific save audio state methods

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I899405a8eaa2f38ee0de04949c5288f9eefa74df
/system/bt/bta/ag/bta_ag_sco.cc
3e634d6c1e83f053005c9abdbd89e662ad81c4d4 10-Feb-2017 Myles Watson <mylesgw@google.com> eSCO: Remove BTM_WBS_INCLUDED from the stack (2/5)

All of our platforms support WBS.

Bug: 19540029
Test: make, HFP PTS test, testplans/86884, testplans/87103
Change-Id: I384d49f73935ebb35b17132e71c85174797c435e
/system/bt/bta/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_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/ag/bta_ag_sco.cc