OSDN Git Service

android-x86/system-bt.git
4 years agoRemove log with uint64_t
Chienyuan [Wed, 28 Aug 2019 03:47:14 +0000 (11:47 +0800)]
Remove log with uint64_t

Bug: 140128528
Test: build pass
Change-Id: I2da11d6abf8038eb60fc4993239c16a4b75570a0

4 years agoCert: Get rid of signal socket
Hansong Zhang [Tue, 27 Aug 2019 21:33:08 +0000 (14:33 -0700)]
Cert: Get rid of signal socket

Use gRPC channel_ready_future to wait for channel ready, instead of using
another socket.

Test: cert/run_cert.sh
Change-Id: I97f405323d92bf7526eb174fb5e4b305e052a4e9

4 years agoGD: Implement internal HCI commands
Chienyuan [Thu, 15 Aug 2019 10:04:32 +0000 (18:04 +0800)]
GD: Implement internal HCI commands

Bug: 139329371
Test: run run_cert.sh
Change-Id: Ia9100bab1c1a212fd9031a8049dfd97e469ebad5

4 years agoMerge "Revert "Turn off the new pass manager for coverage builds""
Yi Kong [Mon, 26 Aug 2019 06:16:36 +0000 (06:16 +0000)]
Merge "Revert "Turn off the new pass manager for coverage builds""

4 years agoRevert "Turn off the new pass manager for coverage builds"
Yi Kong [Mon, 26 Aug 2019 01:19:07 +0000 (01:19 +0000)]
Revert "Turn off the new pass manager for coverage builds"

This reverts commit 4dd3d1c50abfbfa8bec174f88b2513f27606b7fd.

The updated compiler has fixed the issue that new PM and
-fprofile-instr-generate cannot work together.

Change-Id: I1668afe65f633fddb71ac1a0c94c563cb94f1327
Test: presubmit
Bug: 131132095

4 years agoMerge "PDL: Autogenerate packet tests"
Treehugger Robot [Sat, 24 Aug 2019 07:48:05 +0000 (07:48 +0000)]
Merge "PDL: Autogenerate packet tests"

4 years agoPDL: Autogenerate packet tests
Myles Watson [Thu, 22 Aug 2019 23:11:01 +0000 (16:11 -0700)]
PDL: Autogenerate packet tests

captured_packet_bytes -> view -> builder -> generated_bytes

If captured_packet_bytes == generated_bytes, we can correctly parse
and build that packet for those inputs.

Fixes: 139701186
Test: bluetooth_packet_parser_test
Change-Id: I70375e59b6786d7bdd0c6629c504e62e579ea196

4 years agoDevice: Initial bluetooth device API
Martin Brabham [Wed, 21 Aug 2019 21:18:14 +0000 (14:18 -0700)]
Device: Initial bluetooth device API

Design:
    Have a simple memory map of devices for CLASSIC, LE, and DUAL.
This map will be managed by the DeviceDatabase and will eventually (not in this CL)
synchronize(using not yet submitted DeviceStorageApi) bonded devices to disk.

Bug: 139135297
Test: atest --host -t bluetooth_test_gd:DeviceTest bluetooth_test_gd:DeviceDatabaseTest bluetooth_test_gd:DualDeviceTest
Change-Id: I823b747aec5073feba5dc0f192f744329b43faf8

4 years agoMerge "RootCanal: Mark newer commands as unsupported"
Treehugger Robot [Fri, 23 Aug 2019 15:13:19 +0000 (15:13 +0000)]
Merge "RootCanal: Mark newer commands as unsupported"

4 years agoRootCanal: Mark newer commands as unsupported
Myles Watson [Fri, 23 Aug 2019 12:23:37 +0000 (05:23 -0700)]
RootCanal: Mark newer commands as unsupported

Bug: 139329371
Test: manual ReadLocalSupportedCommands
Change-Id: Ife208c53453b970bccad0effd288a8d0f1d67686

4 years agoMerge "HCI: Add an API for sending security commands"
Treehugger Robot [Fri, 23 Aug 2019 03:40:39 +0000 (03:40 +0000)]
Merge "HCI: Add an API for sending security commands"

4 years agoHCI: Use arrays and fixed-length structs
Myles Watson [Mon, 19 Aug 2019 20:33:27 +0000 (13:33 -0700)]
HCI: Use arrays and fixed-length structs

Test: build
Change-Id: I74a470b7d31a716824c7356cff7698451604a5ad

4 years agoGD: Move Address and ClassOfDevice to hci
Martin Brabham [Fri, 29 Mar 2019 17:24:52 +0000 (10:24 -0700)]
GD: Move Address and ClassOfDevice to hci

Bug: 139135297
Test: atest --host -t bluetooth_test_gd
Change-Id: I64c3ccbb3543a22a24f1b6b8a99f32e3d8aa3e24

4 years agoL2CAP scheduler definition and FIFO
Hansong Zhang [Fri, 16 Aug 2019 22:07:30 +0000 (15:07 -0700)]
L2CAP scheduler definition and FIFO

Test: bluetooth_test_gd
Bug: 138261142
Change-Id: If1dbabf48b5a53892e36b8434c46a3180f2a2799

4 years agoHCI: Add an API for sending security commands
Myles Watson [Tue, 20 Aug 2019 22:17:00 +0000 (15:17 -0700)]
HCI: Add an API for sending security commands

Bug: 138259341
Test: bluetooth_test_gd
Change-Id: Ia9e99c9b5013787a7ff6c5a78cd2538c2be9ccbd

4 years agoMerge "GD HCI: register request event for security interface"
Treehugger Robot [Wed, 21 Aug 2019 16:30:41 +0000 (16:30 +0000)]
Merge "GD HCI: register request event for security interface"

4 years agoGD HCI: register request event for security interface
Chienyuan [Mon, 19 Aug 2019 06:48:53 +0000 (14:48 +0800)]
GD HCI: register request event for security interface

* register request event for security interface
* waiting for command status for REFRESH_ENCRYPTION_KEY command

Bug: 137138879
Test: run run_device_cert.sh
Change-Id: Ie22181a3259caafc5f28eaaccba3facfa15fa6b0

4 years agoMerge "RootCanal: Add ReadLocalSupportedFeatures"
Treehugger Robot [Wed, 21 Aug 2019 13:20:20 +0000 (13:20 +0000)]
Merge "RootCanal: Add ReadLocalSupportedFeatures"

4 years agoAddress: Add static assert to make sure kLength is <= sizeof(uint64_t)
Jack He [Tue, 20 Aug 2019 17:59:18 +0000 (10:59 -0700)]
Address: Add static assert to make sure kLength is <= sizeof(uint64_t)

Test: make
Change-Id: I16432253233a504c47c302433b743f421ded02b9

4 years agoMerge "HCI: Support registration for LE events"
Treehugger Robot [Wed, 21 Aug 2019 04:20:44 +0000 (04:20 +0000)]
Merge "HCI: Support registration for LE events"

4 years agoMerge "L2CAP: Add Classic Link Manager Implementation"
Treehugger Robot [Wed, 21 Aug 2019 02:45:01 +0000 (02:45 +0000)]
Merge "L2CAP: Add Classic Link Manager Implementation"

4 years agoMerge "ClassicSecurityManagerTest: Fix handler sync"
Treehugger Robot [Wed, 21 Aug 2019 01:34:40 +0000 (01:34 +0000)]
Merge "ClassicSecurityManagerTest: Fix handler sync"

4 years agoHCI: Support registration for LE events
Myles Watson [Tue, 20 Aug 2019 22:14:31 +0000 (15:14 -0700)]
HCI: Support registration for LE events

Bug: 138259341
Test: bluetooth_test_gd
Change-Id: I89e4cc2fa16b1abccbeda1250a6486eff7364d16

4 years agoMerge "RootCanal: Add HciRefreshEncryptionKey"
Treehugger Robot [Tue, 20 Aug 2019 23:38:28 +0000 (23:38 +0000)]
Merge "RootCanal: Add HciRefreshEncryptionKey"

4 years agoClassicSecurityManagerTest: Fix handler sync
Hansong Zhang [Tue, 20 Aug 2019 22:36:44 +0000 (15:36 -0700)]
ClassicSecurityManagerTest: Fix handler sync

We should sync handler in ClassicSecurityManager, because outgoing
commands are sent to this handler, and we don't post to handler in
HciModule.

Bug: 139750178
Test: run bluetooth_test_gd for 100 times
Change-Id: I4c2d817391c94602cc9f6e386bda53ee9194501d

4 years agoMerge "HCI: Add SetEventFilter packets"
Treehugger Robot [Tue, 20 Aug 2019 22:30:37 +0000 (22:30 +0000)]
Merge "HCI: Add SetEventFilter packets"

4 years agoL2CAP: Add Classic Link Manager Implementation
Jack He [Tue, 20 Aug 2019 01:16:33 +0000 (18:16 -0700)]
L2CAP: Add Classic Link Manager Implementation

* Implement ClassicLinkManager and APIs for classic fixed channel
* Implement mechanism to create new ACL connections using ACL manager
* Updated dependencies among internal L2CAP components
* Remove SetOnChannelFail() and other unused methods from
  ClassicFixedChannelServiceImpl
* Add mocks and unit tests to verify the functionality of
  ClassicLinkManager
* Add common/testing/bind_test_util.h so that we can bind lambdas with
  capture in unit tests, although this is not allowed in production code
* Add error and result code for classic fixed channel service
  registration failure and connection failures

Bug: 138261142
Test: bluetooth_test_gd, cert/run_cert.sh
Change-Id: Ib2794a0073dbc73f46b8c6fd5f5cf0ae1c8c559a

4 years agoMerge "PDL: Tighten checks for nonexistent fields"
Treehugger Robot [Tue, 20 Aug 2019 19:03:27 +0000 (19:03 +0000)]
Merge "PDL: Tighten checks for nonexistent fields"

4 years agoMerge "PDL: Suppress debug logs"
Treehugger Robot [Tue, 20 Aug 2019 18:50:28 +0000 (18:50 +0000)]
Merge "PDL: Suppress debug logs"

4 years agoHCI: Add SetEventFilter packets
Myles Watson [Tue, 20 Aug 2019 00:45:26 +0000 (17:45 -0700)]
HCI: Add SetEventFilter packets

Test: bluetooth_gd_test
Change-Id: Iba106825f787636e363f440ec0737c954d4f90aa

4 years agoPDL: Tighten checks for nonexistent fields
Myles Watson [Tue, 20 Aug 2019 00:44:16 +0000 (17:44 -0700)]
PDL: Tighten checks for nonexistent fields

Test: bluetooth_packet_parser_test
Change-Id: Ie81efe6706fbfd1d7a350f40ca53d031585f58b5

4 years agoPDL: Suppress debug logs
Myles Watson [Tue, 20 Aug 2019 15:49:49 +0000 (08:49 -0700)]
PDL: Suppress debug logs

Bug: 139373340
Test: mma -j32 (with and without an error in hci_packets.pdl)
Change-Id: I1de6c54f9eee6d016a7f8725c5efdf6e09e2f9db

4 years agoAdd IOT device list for RNR, avoid the bond fail.
Jigong Yin [Fri, 10 May 2019 08:20:08 +0000 (16:20 +0800)]
Add IOT device list for RNR, avoid the bond fail.

Bug: 133380579

Change-Id: I650a8c121a152bdce6a7d057433ec361e2002ec0

4 years agoMerge "Distribute ACL buffer only for not BLE device"
Weichin Weng [Tue, 20 Aug 2019 08:02:06 +0000 (08:02 +0000)]
Merge "Distribute ACL buffer only for not BLE device"

4 years agoAddress: Add a hash function for Bluetooth MAC address
Jack He [Tue, 20 Aug 2019 00:47:10 +0000 (17:47 -0700)]
Address: Add a hash function for Bluetooth MAC address

Test: bluetooth_test_gd
Change-Id: Idaf390864b817b763d83add1f5e5613e29a734ec

4 years agoHCI: Use unique_ptr to pass AclConnection
Jack He [Mon, 19 Aug 2019 23:41:20 +0000 (16:41 -0700)]
HCI: Use unique_ptr to pass AclConnection

* Use std::unique_ptr to pass AclConnection so that the AclConnection
  object can be mocked
* Add mocks for AclConnection and AclManager

Test: bluetooth_test_gd
Bug: 139700781
Change-Id: If7403207843d356330b6bd4875683df7966623e9

4 years agoMerge "RootCanal: Remove scan response log"
Treehugger Robot [Mon, 19 Aug 2019 21:49:13 +0000 (21:49 +0000)]
Merge "RootCanal: Remove scan response log"

4 years agoRootCanal: Add ReadLocalSupportedFeatures
Myles Watson [Mon, 19 Aug 2019 20:03:46 +0000 (13:03 -0700)]
RootCanal: Add ReadLocalSupportedFeatures

Test: run run_device_cert.sh
Change-Id: I064573c0224c35e9e515e62ad6e026df1bbae2c9

4 years agoMerge "Rootcanal: add error string for debugging"
Treehugger Robot [Mon, 19 Aug 2019 20:02:35 +0000 (20:02 +0000)]
Merge "Rootcanal: add error string for debugging"

4 years agoMerge "PDL: Fix Iterator assignment and add Subrange"
Treehugger Robot [Mon, 19 Aug 2019 19:39:35 +0000 (19:39 +0000)]
Merge "PDL: Fix Iterator assignment and add Subrange"

4 years agoRootCanal: Add HciRefreshEncryptionKey
Myles Watson [Mon, 19 Aug 2019 19:35:36 +0000 (12:35 -0700)]
RootCanal: Add HciRefreshEncryptionKey

Bug: 137138879
Test: run run_device_cert.sh
Change-Id: I5c7407f2e916dd96ab983c17d4adb0e0e59fdf44

4 years agoRootCanal: Remove scan response log
Myles Watson [Mon, 19 Aug 2019 18:06:24 +0000 (11:06 -0700)]
RootCanal: Remove scan response log

Fixes: 138656973
Test: manually inspect logcat when running with RootCanal
Change-Id: I8442cb13358bf2b950eaf748e4144f129ea766a3

4 years agoPDL: Fix Iterator assignment and add Subrange
Myles Watson [Fri, 16 Aug 2019 22:28:19 +0000 (15:28 -0700)]
PDL: Fix Iterator assignment and add Subrange

Test: bluetooth_test_gd, bluetooth_packet_parser_test
Change-Id: I28c264bbbc25c8980a37fc2cb85875f50ec4a7ff

4 years agoMerge "Remove direct connection after notifying the connection up"
Weichin Weng [Mon, 19 Aug 2019 09:31:26 +0000 (09:31 +0000)]
Merge "Remove direct connection after notifying the connection up"

4 years agoMerge "GD: HCI Security interface"
Treehugger Robot [Sun, 18 Aug 2019 08:49:23 +0000 (08:49 +0000)]
Merge "GD: HCI Security interface"

4 years agoGD: HCI Security interface
Chienyuan [Fri, 12 Jul 2019 10:00:12 +0000 (18:00 +0800)]
GD: HCI Security interface

Fixes: 137138879
Test: run run_cert.sh
Change-Id: I73ee7e6191d454600c693bd92cc1ea5933ee1379

4 years agoMerge "DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master"
Treehugger Robot [Thu, 15 Aug 2019 06:13:47 +0000 (06:13 +0000)]
Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master"

4 years agoDO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master
Xin Li [Tue, 13 Aug 2019 23:56:18 +0000 (16:56 -0700)]
DO NOT MERGE - Merge pie-platform-release (PPRL.190801.002) into master

Bug: 139369544
Change-Id: Id4051603d6abdd5c5ad9da3e5a4d969c36e0faa0

4 years agoL2CAP: ClassicFixedChannelAllocator
Chris Manton [Tue, 13 Aug 2019 21:45:06 +0000 (14:45 -0700)]
L2CAP: ClassicFixedChannelAllocator

This is a utility class for L2CAP link to manage channels

Test: bluetooth_test_gd
Bug: 138261142
Change-Id: I1adaaf29817371bb3f0e68d64f6aec3d3eea2c85

4 years agoRootcanal: add error string for debugging
Hansong Zhang [Tue, 13 Aug 2019 20:57:18 +0000 (13:57 -0700)]
Rootcanal: add error string for debugging

Test: manual
Change-Id: I9e35e1806f2bf8e93820fd078d76d852065745ad

4 years agoL2CAP classic fixed service manager
Chris Manton [Tue, 30 Jul 2019 01:26:27 +0000 (18:26 -0700)]
L2CAP classic fixed service manager

Implement classic fixed channel service registration

Test: bluetooth_test_gd
Change-Id: Ic5d5b4543e88a0e4b9918f4583c5d115ef021cf0

4 years agoSnap for 5674421 from a3c00b27470c47bae945fd6d222b52519375160b to pi-platform-release
android-build-team Robot [Tue, 13 Aug 2019 16:34:13 +0000 (16:34 +0000)]
Snap for 5674421 from a3c00b27470c47bae945fd6d222b52519375160b to pi-platform-release

Change-Id: I67f7bdc0b565214793359d40055831bc6bc5b309

4 years agoPDL: Save copies in packet builders
Myles Watson [Mon, 12 Aug 2019 07:19:41 +0000 (00:19 -0700)]
PDL: Save copies in packet builders

Test: bluetooth_packet_parser_test
Change-Id: Ibf673a73109d003819445cb980d0fc85b1b7557c

5 years agoL2CAP: Add Classic Fixed Channel APIs
Jack He [Fri, 9 Aug 2019 22:10:44 +0000 (15:10 -0700)]
L2CAP: Add Classic Fixed Channel APIs

* Add ClassicFixedChannelManager
* Add ClassicFixedChannelService
* Add ClassicFixedChannel
* Modify cid and constants definition

Bug: 138261142
Test: bluetooth_test_gd
Change-Id: Iae4e398e938436c74d16b49834a4bd5146b03873

5 years agoRemove direct connection after notifying the connection up
weichinweng [Thu, 8 Aug 2019 09:30:07 +0000 (17:30 +0800)]
Remove direct connection after notifying the connection up

After notifying the connection up, remove direct connection related with
this device to make sure no client is directly connecting the device in
connection_manager.

Bug: 138819537
Test: 1. Repair BLE device 2. Reconnect BLE deivce
3. reboot DUT, make sure Hearing Aid can be connected.

Change-Id: I30ff7c47445ec2a3dbd9702ca79873063210e6df

5 years agoMerge "PDL: Test fixed-size struct fields"
Treehugger Robot [Thu, 8 Aug 2019 03:12:09 +0000 (03:12 +0000)]
Merge "PDL: Test fixed-size struct fields"

5 years agoMerge "BluetoothAudioHAL: Fix the latency and the number of frames were inconsistent"
Treehugger Robot [Thu, 8 Aug 2019 01:25:19 +0000 (01:25 +0000)]
Merge "BluetoothAudioHAL: Fix the latency and the number of frames were inconsistent"

5 years agoMerge "Do not config A2DP codec priorities before retrieving all capabilities"
Treehugger Robot [Thu, 8 Aug 2019 00:51:32 +0000 (00:51 +0000)]
Merge "Do not config A2DP codec priorities before retrieving all capabilities"

5 years agoMerge "Fix the test case HCT BV-01-C"
Treehugger Robot [Wed, 7 Aug 2019 10:35:28 +0000 (10:35 +0000)]
Merge "Fix the test case HCT  BV-01-C"

5 years agoPDL: Test fixed-size struct fields
Myles Watson [Wed, 7 Aug 2019 06:07:52 +0000 (23:07 -0700)]
PDL: Test fixed-size struct fields

Add an end_index for bounds checking fields, and use that instead
of subviews, to support extraction in struct Parse() functions.

Bug: 138260498
Test: bluetooth_packet_parser_test --gtest_filter=*FixedTypesStruct*
Change-Id: I1e6819aafdd31d53de046299e7d17fe7dd2de197

5 years agoBluetoothAudioHAL: Fix the latency and the number of frames were inconsistent
Cheney Ni [Thu, 1 Aug 2019 11:21:39 +0000 (19:21 +0800)]
BluetoothAudioHAL: Fix the latency and the number of frames were inconsistent

The Bluetooth Audio HAL uses 3 APIs to share the audio latency to
audioserver, so they can do the audio / video synchronization. Those
API's results have to be consistent in the presented number of frames,
and should be reset only when the output was re-opened. Because the HAL
queried information from the Bluetooth which might be reset after the
Bluetooth session restarted, and caused a conflict between current and
previous results. The media frameworks needed more works to be A/V
synchronous again, and users would see the video was frozen.

This CL checks the stack data, and there must be no big delta between
the stack and HAL, or one of them was ever reset, and needs to use local
counters instead.

Bug: 137978401
Test: Switch active device and codec manually
Change-Id: I35bffa834c0de2e8b36e99a96b4a70738cc2b639

5 years agoDo not config A2DP codec priorities before retrieving all capabilities
Ugo Yu [Fri, 15 Feb 2019 14:42:39 +0000 (22:42 +0800)]
Do not config A2DP codec priorities before retrieving all capabilities

* In current A2DP design, if Java A2DP service disabled optional
  codec and invoke native SetCodecUserConfig() while our get codec
  capabilities process is not finished, stack would raise SBC
  priority to 1000000 without notifying the remote device. This
  behavior would cause phone and the remote headset using different
  codec while A2DP streaming and lead to no sound problem.
* We should always check the codec capabilities status before changing
  the codec priority.

Bug: 124254557
Test: manual

Change-Id: I19693ecdd581836829c15ae37d579a4cb3ac0200

5 years agoFix the test case HCT BV-01-C
Zwei.chen [Wed, 5 Jun 2019 05:57:57 +0000 (13:57 +0800)]
Fix the test case HCT  BV-01-C

the value of p_dev->get_rpt_snt may become 255 after p_dev->get_rpt_snt--
if it happens to be 0

Bug: 138261469

5 years agoGD HCI: register events for gd test on device
Chienyuan [Tue, 6 Aug 2019 08:39:20 +0000 (16:39 +0800)]
GD HCI: register events for gd test on device

Bug: 138260216
Test: run run_cert.sh
Change-Id: I7838fec1a7cfcc9a6e82830e81b7f9308f3654ce

5 years agoDistribute ACL buffer only for not BLE device
weichinweng [Fri, 2 Aug 2019 08:43:09 +0000 (16:43 +0800)]
Distribute ACL buffer only for not BLE device

If LE ACL buffer is not zero from controller, will distribute ACL buffer
only for not BLE device to avoid assigning wrong quota to each device.
For BLE device, will be distribute BLE ACL buffer via l2cap ble layer.
If LE ACL buffe is zero from controller, will keep existing logic.

Bug: 136799551
Test: 1. Pair BLE and BREDR device, check whether Quota is correct.

Change-Id: Idd7079e8da3390fa9f4e42b07774df8928f2bf20

5 years agoFix CoC not being able to establish first connection
Jakub Pawlowski [Mon, 5 Aug 2019 18:28:22 +0000 (20:28 +0200)]
Fix CoC not being able to establish first connection

When establishing conenction, we must know address type of the device we
connect to. We learn it during scan. We store this information in BTIF
layer, and later copy it into BTM if someone tries to make connection.

CoC code was not copying address type information between layers. This
caused us to use bad address type, which resulted in no connection being
created.

This patch fixes the issue, by making sure address type is properly
copied from BTIF into BTM

Test: acts BleCocTest
Bug: 133444088
Change-Id: I08609d92df245649882ad0b186a6080bff61a96e

5 years agoMerge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio...
Treehugger Robot [Mon, 5 Aug 2019 06:06:39 +0000 (06:06 +0000)]
Merge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices"

5 years agoModify log format
Jakub Pawlowski [Thu, 1 Aug 2019 17:39:50 +0000 (19:39 +0200)]
Modify log format

Always log file name and line number.
Instead of __PRETTY_FUNC_ use __func__ and log just the function name.
Logging full name with namespace, return value and parameters produces
unreadable gibberish.

This makes it easier to map log line to line that produced it.

Test: compile, look through the logs.
Change-Id: I3a72e8e498ded604fe61179191f1bc98b44c6a5c

5 years agoRootcanal: Allow using TCP port when TIME_WAIT
Hansong Zhang [Thu, 1 Aug 2019 01:04:25 +0000 (18:04 -0700)]
Rootcanal: Allow using TCP port when TIME_WAIT

Test: cert/run_cert.sh
Change-Id: I473add448fcd167f6e33b34281298c69a831d733

5 years agoL2CAP: Add L2CAP Module
Jack He [Wed, 31 Jul 2019 22:44:05 +0000 (15:44 -0700)]
L2CAP: Add L2CAP Module

* Add an empty L2CAP module
* Add facades for L2CAP module
* Add cert facades for L2CAP module
* Add SimpleL2CapTest to run_cert.sh

Test: cert/run_cert.h
Change-Id: I00b3fe1bfb6e72dbbf1ca441ceed7dd4d62afb26

5 years agoMerge "AVRCP Controller Shuffle/Repeat support"
Joseph Pirozzo [Wed, 31 Jul 2019 21:27:26 +0000 (21:27 +0000)]
Merge "AVRCP Controller Shuffle/Repeat support"

5 years agoHCI: Use futures to wait for packets in tests
Myles Watson [Thu, 25 Jul 2019 23:28:35 +0000 (16:28 -0700)]
HCI: Use futures to wait for packets in tests

Test: bluetooth_gd_test on a device
Change-Id: I3e61b83df47204380398646350b90c3f63734bca

5 years agoAVRCP Controller Shuffle/Repeat support
Joseph Pirozzo [Fri, 26 Jul 2019 19:26:01 +0000 (12:26 -0700)]
AVRCP Controller Shuffle/Repeat support

Fetch player settings when the addressed player changes.

Bug: 72495707
Test: AvrcpControllerStateMachineTest#testShuffle
      AvrcpControllerStateMachineTest#testRepeat

Change-Id: I4df1f130dafb96708ec7a0a2c13c776affcc6318

5 years agoMerge "HCI: Print unhandled event type"
Treehugger Robot [Fri, 26 Jul 2019 05:07:25 +0000 (05:07 +0000)]
Merge "HCI: Print unhandled event type"

5 years agoHCI: Print unhandled event type
Myles Watson [Thu, 25 Jul 2019 22:52:55 +0000 (15:52 -0700)]
HCI: Print unhandled event type

Test: send unhandled event
Change-Id: Iafdf004609cae4e15861664eb8e430e263655250

5 years agoCert: Run on device
Hansong Zhang [Wed, 24 Jul 2019 22:21:23 +0000 (15:21 -0700)]
Cert: Run on device

Add a sample device_config.json to allow cert testing on device.

1. Fill in Android device serial number in device_config.json.
2. Build device target for libbluetooth_gd, libgrpc++_unsecure,
stack_with_facade, and bluetooth_cert_stack. Push them to the device
under /system/lib64 and /system/bin correspondingly.
3. Set up Android tcp forward and reverse
   - For DUT:
     adb -s <DUT> forward tcp:8899 tcp:8899
     adb -s <DUT> forward tcp:8897 tcp:8897
     adb -s <DUT> reverse tcp:8895 tcp:8895 <- host is the server
   - For CERT:
     adb -s <DUT> forward tcp:8898 tcp:8898
     adb -s <DUT> forward tcp:8896 tcp:8896
     adb -s <DUT> reverse tcp:8894 tcp:8884 <- Host is the server
4. Run cert/run_device_cert.sh

Bug: 138260216
Test: cert/run_device_cert.sh
Change-Id: Ic2921a31910e370d86c4aa4143e92b5b15d8a1e8

5 years agoMerge "HCI: Wait for commands using std::future"
Treehugger Robot [Thu, 25 Jul 2019 19:23:30 +0000 (19:23 +0000)]
Merge "HCI: Wait for commands using std::future"

5 years agoMerge "HAL cert and facade: Unregister HCI on shutdown"
Treehugger Robot [Thu, 25 Jul 2019 17:27:54 +0000 (17:27 +0000)]
Merge "HAL cert and facade: Unregister HCI on shutdown"

5 years agoHCI: Wait for commands using std::future
Myles Watson [Wed, 24 Jul 2019 19:59:01 +0000 (12:59 -0700)]
HCI: Wait for commands using std::future

Test: bluetooth_test_gd --gtest_filter=*AclMan* on a device
Change-Id: I915242546efdfaf6553e36cbe19a37290435991b

5 years agoMerge "OS: Account for enqueue/dequeue race"
Treehugger Robot [Thu, 25 Jul 2019 13:23:38 +0000 (13:23 +0000)]
Merge "OS: Account for enqueue/dequeue race"

5 years agoOS: Account for enqueue/dequeue race
Myles Watson [Wed, 24 Jul 2019 00:17:47 +0000 (17:17 -0700)]
OS: Account for enqueue/dequeue race

Test: on-device: bluetooth_test_gd --gtest_filter=*Queue*
Change-Id: I3429e35ebd9a98f1054e40e9507995daeae35c65

5 years agoMerge "PDL: Use GenBounds for Structs"
Treehugger Robot [Thu, 25 Jul 2019 06:19:27 +0000 (06:19 +0000)]
Merge "PDL: Use GenBounds for Structs"

5 years agoPDL: Use GenBounds for Structs
Myles Watson [Wed, 24 Jul 2019 22:52:33 +0000 (15:52 -0700)]
PDL: Use GenBounds for Structs

Test: bluetooth_packet_parser_test
Change-Id: Ibb6e7bd441b8fd19f17818dc74ac4aff10b519a4

5 years agoHAL cert and facade: Unregister HCI on shutdown
Hansong Zhang [Wed, 24 Jul 2019 22:33:35 +0000 (15:33 -0700)]
HAL cert and facade: Unregister HCI on shutdown

Test: cert/run_cert.sh
Change-Id: I730b26ec7a15f4ec539c42e16a774c442be93ac9

5 years agoMerge "Support vendor AT command and response for Hfp Client in bt stack"
Deqiang Chen [Wed, 24 Jul 2019 21:04:55 +0000 (21:04 +0000)]
Merge "Support vendor AT command and response for Hfp Client in bt stack"

5 years agoCert signal server: Use TCP instead of UNIX socket
Hansong Zhang [Wed, 24 Jul 2019 16:29:07 +0000 (09:29 -0700)]
Cert signal server: Use TCP instead of UNIX socket

Since we want to run the stacks on the phone, we need to use TCP socket
and set up TCP forwarding to run the test.

Test: cert/run_cert.sh
Change-Id: I3fd6c17318d372ab0be4065df4aea2a5bb469ab3

5 years agoMerge "PDL: Add Structs"
Jakub Pawlowski [Wed, 24 Jul 2019 07:40:21 +0000 (07:40 +0000)]
Merge "PDL: Add Structs"

5 years agoHearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks...
Cheney Ni [Wed, 10 Jul 2019 08:24:31 +0000 (16:24 +0800)]
Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices

The Hearing Aid uses the stack main thread to be the media task thread.
This thread handles events / feeds audio data sequentially, and won't
have a race condition within the single thread. The promise is a bit
redundant, but wasted time to cause a potential deadlock that the caller
waits for the task thread finished which needed the caller's resource.

This CL also stops the audio ticks when no devices available, and no
need to wait for next timer expired. Besides, move all timer controls
into the media task thread, so timer is started / stopped at the same
thread, too.

Bug: 134996542
Test: add big delay within functions, and check no abnormal manually
Change-Id: If0b279a191d86b30db41a682dc7f0ad9470cb10e

5 years agoMerge "OS: Get promise before registering in tests"
Treehugger Robot [Wed, 24 Jul 2019 02:38:30 +0000 (02:38 +0000)]
Merge "OS: Get promise before registering in tests"

5 years agoPDL: Add Structs
Myles Watson [Wed, 6 Feb 2019 22:02:36 +0000 (14:02 -0800)]
PDL: Add Structs

Test: bluetooth_packet_parser_test
Change-Id: I2d0288aa4e62589dd03d93a1b47ce0585584cab5

5 years agoOS: Get promise before registering in tests
Myles Watson [Wed, 24 Jul 2019 00:10:11 +0000 (17:10 -0700)]
OS: Get promise before registering in tests

https://cplusplus.github.io/LWG/issue2412

Test: on-device: bluetooth_test_gd --gtest_filter=*Queue*
Change-Id: I2603763ea6c9197ed56f741b2beb100c1a9b8e19

5 years agoMerge "OS: Use LOG_ALWAYS_FATAL for Android"
Treehugger Robot [Tue, 23 Jul 2019 23:50:38 +0000 (23:50 +0000)]
Merge "OS: Use LOG_ALWAYS_FATAL for Android"

5 years agoMerge "Split ARRAY into fixed size ARRAY and VECTOR"
Treehugger Robot [Tue, 23 Jul 2019 22:24:12 +0000 (22:24 +0000)]
Merge "Split ARRAY into fixed size ARRAY and VECTOR"

5 years agoOS: Use LOG_ALWAYS_FATAL for Android
Myles Watson [Tue, 23 Jul 2019 20:35:40 +0000 (13:35 -0700)]
OS: Use LOG_ALWAYS_FATAL for Android

Test: bluetooth_test_gd --gtest_filter=*Death*
Change-Id: I0aa4e85a7fd000eb90c65c51d3ac372634583c69

5 years agoSplit ARRAY into fixed size ARRAY and VECTOR
Jakub Pawlowski [Fri, 19 Jul 2019 12:51:50 +0000 (14:51 +0200)]
Split ARRAY into fixed size ARRAY and VECTOR

Test: bluetooth_packet_parser_test
Change-Id: I438d7583fdb99054528b99a3a3a12ec58d115cb3

5 years agoRemove unnecessary include_dirs
Paul Duffin [Tue, 23 Jul 2019 09:36:10 +0000 (10:36 +0100)]
Remove unnecessary include_dirs

The header directory specified in the include_dirs property is already
included via the header_libs property.

Test: m avrcp_headers
Change-Id: Id3af155e64127c5bc14a17780fa77a4c6147e5d8

5 years agoMerge "Disable absolute volume for AirPods 2 with MAC address from 9C:64:8B"
Treehugger Robot [Mon, 22 Jul 2019 23:30:41 +0000 (23:30 +0000)]
Merge "Disable absolute volume for AirPods 2 with MAC address from 9C:64:8B"

5 years agoMerge "L2CAP: Cid, Mtu, SignalId type and constant"
Treehugger Robot [Mon, 22 Jul 2019 22:27:55 +0000 (22:27 +0000)]
Merge "L2CAP: Cid, Mtu, SignalId type and constant"

5 years agoPDL: Extract CustomFieldFixedSize
Myles Watson [Fri, 19 Jul 2019 23:07:36 +0000 (16:07 -0700)]
PDL: Extract CustomFieldFixedSize

Test: bluetooth_packet_parser_test
Change-Id: Ia93442ca1cc173d0b6c813a45c722f14d2f34fa0

5 years agoPDL: Add GenExtractor functions to fields
Myles Watson [Tue, 16 Jul 2019 16:50:23 +0000 (09:50 -0700)]
PDL: Add GenExtractor functions to fields

Test: bluetooth_packet_parser_test
Change-Id: I6ee3ae82e8e7949f0fd30dfae6f322dcc4769190