History log of /system/bt/stack/btu/btu_hcif.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ecb6c72a1d06dbcbd0e5c07628b572c5f22a5f1d 02-Sep-2017 Pavlin Radoslavov <pavlin@google.com> Implement HCI_Read_Automatic_Flush_Timeout mechanism

Also, read the Automatic Flush Timeout when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: Ic49b5236328ddacde1d7f2aee131e35e317a14ef
(cherry picked from commit b8568ae0e198a84225c9fdef1e715dc4d45565c9)
/system/bt/stack/btu/btu_hcif.cc
4820b2a6e69a8c13a2d57c8b7d41ba3b6d6471d2 01-Sep-2017 Pavlin Radoslavov <pavlin@google.com> Implement HCI_Read_Failed_Contact_Counter mechanism

Also, read the Failed Contact Counter when flushing the A2DP Tx queue

Test: Streaming A2DP headset and trigger audio stutter
Bug: 64038257
Change-Id: I8ff72560e3840c5c22cfac9613c4be670b8a4cf1
(cherry picked from commit 6ab749f3cfd9c7660bb245764fcd01dcff51dbe9)
/system/bt/stack/btu/btu_hcif.cc
942648ef5a4b25508cc9ffe7073ddab5e04a9ab4 08-Dec-2016 Srinu Jella <sjella@codeaurora.org> Dynamic blacklist device for role switch

- Blacklist the device if it's rejected the role switch for
max number of times. Same is added to the interop_database.

- Maximum number of failed (BTM_MAX_SW_ROLE_FAILED_ATTEMPTS)
attempts set to 3 and it is configurable.

- Same blacklisted device is referred by the BTM module when
any other module like profile is requesting for role switch
and BTM module returns BTM_REPEATED_ATTEMPTS as the switch
role status.

Test: Code compilation
Bug: 32999957
Change-Id: Ie999104a2c8ca507605ef3e1d454865cee98dcd2
/system/bt/stack/btu/btu_hcif.cc
a484a888196ddf8bcbf1ad3226d6451bc735a94b 25-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Rename bt_bdaddr_t into RawAddress (3/3)

Test: compilation test
Change-Id: I4571721a0c6165a66450ee157a53d8d15bfc45d0
/system/bt/stack/btu/btu_hcif.cc
b8a477e9ac51898b05cb328eda897d95f1ef3d02 17-Jun-2017 Jakub Pawlowski <jpawlowski@google.com> Get rid of BD_ADDR

Test: compilation test
Change-Id: I8493485873a81f897fbaef1504076ef18274a8a5
/system/bt/stack/btu/btu_hcif.cc
5a475e71a01322367a2ba591aecd62781902cfc2 13-Apr-2017 Avish Shah <avish.shah@broadcom.com> Bluetooth 5: Update LE2M implementation through DM (3/3)

This patch moves LE2M implementation to the DM instead of tied to GATT.

Below are the reasons to make this change:
1) Per link setting usually be done under DM, such as link policy etc.
2) In the future, if LECOC is coming to use in more profile/apps,
we can not rely on GATT API for these. Separate API should be required.
3) we could have multiple logical GATT user on top of the same link.
4) Also this will avoid duplicating all the APIs on GATTC and GATTS.

Bug: 37586939
Test: sl4a PhyTest passed
Change-Id: I7330be85d1bb98a4cc66b69462b01c23c9375362
/system/bt/stack/btu/btu_hcif.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/stack/btu/btu_hcif.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/stack/btu/btu_hcif.cc
2b7e9058076f1b6afde219b4d7a36368ca97d7fc 01-Mar-2017 Ajay Panicker <apanicke@google.com> Swap BTA and HCI queues with message loops

Swapping out the queues with base::MessageLoop allows for an easier refactor
of alarms as we can just replace them with an instance of base::Timer. Also
refactored out the data_dispatcher as most of the code wasn't being used.

Bug: 37245162
Test: Bluetooth sanity test and listening to music
added net_test_btu_message_loop
Change-Id: I73c359f07a225733dc89f51422a6a24ce807c593
/system/bt/stack/btu/btu_hcif.cc
b5ba4fdbc433544de3806f8e82976898e444b491 24-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Expose connection update callback (1/3)

Test: manual
Bug: 30622771
Change-Id: I94d25f6f22b42fb1432a9288c97b82503d57db86
/system/bt/stack/btu/btu_hcif.cc
eafd45d08653bb1621c82a2f3cf922a43a0b1bc5 23-Mar-2017 Jakub Pawlowski <jpawlowski@google.com> Set preferred PHY and read PHY implementation (3/3)

Test: manual
Bug: 30622771
Change-Id: I4267238a0b5c7bc373ae1846ebd19a716881a4ec
/system/bt/stack/btu/btu_hcif.cc
0c683232e28ea616844bfa03d876a08df217ba13 24-Feb-2017 Jakub Pawlowski <jpawlowski@google.com> btsnd_hcic_ble_rand refactor

Make btsnd_hcic_ble_rand accept base::Callback instead of function
pointer. This will result in great code simplifications in further
patches.

Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I9933caa78b20d0011ce3e17fd72d5740bcc4ae6d
/system/bt/stack/btu/btu_hcif.cc
bdd2f5001ffc7c53f0e38c2a98e393b1855f9ce6 09-Feb-2017 Myles Watson <mylesgw@google.com> Clean up some more #defines

true -> TRUE
false -> FALSE

Test: builds
Change-Id: I2573b6ab81aa384cc6d20bb8beb84303aba06a66
/system/bt/stack/btu/btu_hcif.cc
d56ef465026b24bfee356f2dabccffe6eab5d21f 12-Sep-2016 Myles Watson <mylesgw@google.com> Remove LPM code from the stack

Power management is handled in hardware/interfaces/bluetooth/.

Test: mma -j32
Change-Id: Ie172ca37059768a2cfa0d4b84f34b54624b1fa49
/system/bt/stack/btu/btu_hcif.cc
dabf8d36c6a6896953fff4a12365716d438f173a 28-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> HCI interface improvements

This patch improves btu_hcif_send_cmd_with_cb, which will accept
base::Callback instead of function pointer as argument. It will also
carry information about where was packet send from, which can be
displayed when command status is received, greatly improving logs.

The improved method is also used for handling VSC advertising.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertiserTest
Change-Id: I55c3e32f9231c00bfa85f971265809d6f1fecdfb
/system/bt/stack/btu/btu_hcif.cc
801db30048049a63869587af4b89a6e5a4dabb9b 13-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Use LE Extended Advertising Report Event when available

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: Id85504922c21f15bc36ac8bb5e4ab962ee356e3d
/system/bt/stack/btu/btu_hcif.cc
751381c64fee63590f0888c8eac5c8a474f1e25b 30-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Handle Advertising Set Terminated event

Make BleAdvertiserHciExtendedImpl report when advertising set is
disabled because of new connection.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: Ic13a31fe4bb92f121a29d540274d13893775a450
/system/bt/stack/btu/btu_hcif.cc
f2af1c42ccb2f642b241c2261b42d0be61d45438 13-Dec-2016 Jack He <siyuanh@google.com> Replace assert with CHECK from base/logging.h

* Replace assert with CHECK
* Remove all NDEBUG definitions
* Remove hacks for BT_LIBCHROME_NDEBUG
* Removed some removed directories from Makefile such as hcis, brcm, rpc

Coccinelle-assisted:

@@
@@

- #include "base/logging.h"
+ #include <base/logging.h>

@ assert_included @
@@

@ base_logging_included @
@@

@ depends on (assert_included && !(base_logging_included)) @
@@

- #include <assert.h>
+ #include <base/logging.h>

@ depends on (assert_included && base_logging_included) @
@@

- #include <assert.h>

@@
expression E;
@@

- assert(E);
+ CHECK(E);

And a bash script:

for file in $(find . -name "*.cc"); do
spatch --sp-file replace_assert_with_CHECK.cocci --in-place $file
done

The following files are maually edited:
btif/src/btif_config.cc
btif/src/btif_avrcp_audio_track.cc
btif/src/btif_gatt_client.cc
osi/src/data_dispatcher.cc
osi/src/reactor.cc
osi/src/thread.cc
osi/src/fixed_queue.cc
osi/src/list.cc
osi/src/allocation_tracker.cc
osi/src/alarm.cc
osi/test/wakelock_test.cc

Bug: 31781465
Test: Code compilation, Unit Tests, BtStressTest, BtFunhausMetricsTest
Change-Id: I21dc10a45be31665e41441b75b0515ed87523988
/system/bt/stack/btu/btu_hcif.cc
9e3005684fe9fa592630d685e9cceb71cd27dfe7 07-Dec-2016 Jakub Pawlowski <jpawlowski@google.com> Simplify LE Advertising Report Event processing

Bug: 30622771
Test: compiliation test
Change-Id: I78ac958b62462dc7aa322336c047670eec6bda0f
/system/bt/stack/btu/btu_hcif.cc
b7cfd05e917a4c426d7fa24d6d05ed233421409a 05-Dec-2016 Myles Watson <mylesgw@google.com> Remove double includes

Test: mma -j32
Change-Id: I0df664eaadf06af0881c1f55c826ecab52239526
/system/bt/stack/btu/btu_hcif.cc
911d1ae03efec2d54c3b1b605589d790d1745488 29-Nov-2016 Myles Watson <mylesgw@google.com> Apply clang-format to the rest of the tree

find * | grep "\.[ch]" | xargs clang-format --style=file -i

Test: mma -j32
Change-Id: I6fcc9862bb7bc07c2a367ca58fef2b3cd27a6f05
/system/bt/stack/btu/btu_hcif.cc
9ca07091a1f07ea201cee0504dab6a1d7073d429 29-Nov-2016 Myles Watson <mylesgw@google.com> Reformat long comments before clang-format

Test: mma -j32
Change-Id: I86a2a4af9dcd22d675ca1f764bb2c9623d63edcc
/system/bt/stack/btu/btu_hcif.cc
ee96a3c60fca590d38025925c072d264e06493c4 23-Nov-2016 Myles Watson <mylesgw@google.com> Fix asterisks in block quotes

Remove double asterisks from block quotes.

git grep -lP '^[*][*]' | xargs sed 's/^[*][*]/ \*/' -i

Fix asterisk line lengths

git grep -l '^[ /][*]\{79,\}[*/]' | \
xargs sed -i s,"^\([ /]\)[*]\([*]\{78\}\)[*]*\([*/]\)","\1\2\3",

Test: mma -j32
Change-Id: Ie3fd375ac2f804cb0f53bf1314a005e85973b3d7
/system/bt/stack/btu/btu_hcif.cc
2e8e9f42132d0297a94c0852a1fbf45c9bc348e5 15-Nov-2016 Myles Watson <mylesgw@google.com> Remove SMP_INCLUDED define

Test: Connect to a BLE Keyboard
Change-Id: I785692cb61f4ca5ccccab7424aa03f50c54523c9
/system/bt/stack/btu/btu_hcif.cc
84baa7f16e830394408278dbb8c508dd9fa02887 14-Nov-2016 Myles Watson <mylesgw@google.com> Remove BLE_INCLUDED define

Test: Connect to a BLE Keyboard
Change-Id: I5f8f4017c90c3c404004632fd10e6c2b93bd7783
/system/bt/stack/btu/btu_hcif.cc
d964cf944e23470d696177fb2ddf8df3684290b8 03-Nov-2016 Jakub Pawlowski <jpawlowski@google.com> Unify advertising API (1/3)

This patch unifies advertising API. On startup, if VSC multi advertising
is avaliable, it will be used, otherwise
BleAdvertiserLegacyHciInterfaceImpl will be used, which provides one
advertising instance.

Test: sl4a tests are passing, all proper tests updated accordingly
Change-Id: I73753962e3a33a980e8a9a1174c8d88611a47e6b
/system/bt/stack/btu/btu_hcif.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/stack/btu/btu_hcif.cc