OSDN Git Service

android-x86/system-bt.git
7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist am: e90e72bb82...
Ruina Liu [Wed, 31 May 2017 00:42:09 +0000 (00:42 +0000)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist am: e90e72bb82  -s ours
am: c139d021b2  -s ours

Change-Id: Iff016ad67d9c076a6a877d9f2f35e10971861620

7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
Ruina Liu [Wed, 31 May 2017 00:38:38 +0000 (00:38 +0000)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
am: e90e72bb82  -s ours

Change-Id: Iee3ecc2a5c6d81a4fc2e72e8e21cd0d898199624

7 years agoDO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist
Ruina Liu [Thu, 24 Sep 2015 02:04:16 +0000 (10:04 +0800)]
DO NOT MERGE ANYWHERE Fix connect second BLE fail while BREDR coexist

In scenario where BREDR/BLE links coexist, and BLE
transport is doing round-robin but BREDR transport is
not use round-robin, when uplayer trigger to transmit
BLE data, the BREDR lcb_pool with smaller array index
will break the for loop firstly. This can block the
L2cap packets transmission of the following BLE lcb_pool
even though there is available BLE controller buffer.

If BLE_INCLUDE is TRUE, then BREDR/BLE links maybe
coexist, change break to continue statement, so the
data transmission will not be blocked by the other
transport type in round-robin case.

Change-Id: I7ca739dfbf02acd2e30527c16ca616a7bad70c51
CR-Id: ALPS02303646

7 years agoGet rid of unused tGATT_SCCB am: 8663a87ea0
Jakub Pawlowski [Tue, 30 May 2017 22:49:35 +0000 (22:49 +0000)]
Get rid of unused tGATT_SCCB am: 8663a87ea0
am: 5f0437a072

Change-Id: Ie76765b915100ba31447bbb4eb729aeac4a527ca

7 years agoGet rid of unused tGATT_SCCB
Jakub Pawlowski [Tue, 30 May 2017 22:41:17 +0000 (22:41 +0000)]
Get rid of unused tGATT_SCCB
am: 8663a87ea0

Change-Id: I0b87a463e12d0487f7e827eee581fa132a246fba

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
Andre Eisenbach [Tue, 30 May 2017 21:10:55 +0000 (21:10 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev am: b044bae800  -s ours
am: 310ce8b220  -s ours

Change-Id: I7d82f8364fd0958ced81d4696dfc5fd8d7bb0955

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
Andre Eisenbach [Tue, 30 May 2017 21:06:25 +0000 (21:06 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev
am: b044bae800  -s ours

Change-Id: Ic7314f6710c10c670ea3a4a24b4865661ee1451e

7 years agoMerge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw...
TreeHugger Robot [Tue, 30 May 2017 21:00:28 +0000 (21:00 +0000)]
Merge "DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb" into cw-f-dev

7 years agoGet rid of unused tGATT_SCCB
Jakub Pawlowski [Sat, 27 May 2017 01:51:27 +0000 (18:51 -0700)]
Get rid of unused tGATT_SCCB

Test: compilation test
Change-Id: I32fee6a93442c8415f7d855c1e4802bceb6fe5ff

7 years agoDO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb
Andre Eisenbach [Thu, 3 Nov 2016 21:53:49 +0000 (14:53 -0700)]
DO NOT MERGE ANYWHERE Remove incorrect assert in btm_read_rssi_cb

|data| may be NULL if the RSSI request times out.
See btm_read_rssi_timeout implementation for details.

Bug: 32587130
Test: manual
Change-Id: Ide9dee819e1db24a39c05b086cd4c0b558ca23ef

7 years agoMerge "HSP: Use peer_version during SCO setup" am: 5519f0d619
Jack He [Sat, 27 May 2017 02:04:49 +0000 (02:04 +0000)]
Merge "HSP: Use peer_version during SCO setup" am: 5519f0d619
am: f941095d46

Change-Id: Iacc5db4f2fd1e24e279af8cbbc80b3a7a06458b9

7 years agoMerge "HSP: Use peer_version during SCO setup"
Jack He [Sat, 27 May 2017 02:02:19 +0000 (02:02 +0000)]
Merge "HSP: Use peer_version during SCO setup"
am: 5519f0d619

Change-Id: Ifd0d25560888922dfd6ae31a5ce2e51e3ace6899

7 years agoMerge "HSP: Use peer_version during SCO setup"
Treehugger Robot [Sat, 27 May 2017 01:58:34 +0000 (01:58 +0000)]
Merge "HSP: Use peer_version during SCO setup"

7 years agoMerge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878 am: 10ef0e8527
Jakub Pawlowski [Sat, 27 May 2017 00:57:45 +0000 (00:57 +0000)]
Merge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878 am: 10ef0e8527
am: 64b6a9c12c

Change-Id: I53f08acb54e483d1e943c1ba4868fc45dceab1f8

7 years agoMerge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878
Jakub Pawlowski [Sat, 27 May 2017 00:55:17 +0000 (00:55 +0000)]
Merge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878
am: 10ef0e8527

Change-Id: I19412f34ab531f4c38fc1c32686bbcaabb25cfe9

7 years agoMerge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878
Treehugger Robot [Sat, 27 May 2017 00:50:22 +0000 (00:50 +0000)]
Merge changes I0f43061b,I48c18401,I5073e800,I2c0926c7,I73120878

* changes:
  Get rid of AMP_INCLUDED
  Get rid of GAP control block
  Get rid of GAP_TRACE_* logs
  Get rid of GAP_CONN_INCLUDED
  BLE GAP simplification

7 years agoGATT: Interop fix for service changed indications am: 43c7f9f477
Myles Watson [Fri, 26 May 2017 23:18:54 +0000 (23:18 +0000)]
GATT: Interop fix for service changed indications am: 43c7f9f477
am: fb071c4783

Change-Id: Icc33cdab9468411b415f5265659198c4b8c28384

7 years agoGet rid of AMP_INCLUDED
Jakub Pawlowski [Fri, 26 May 2017 22:54:23 +0000 (15:54 -0700)]
Get rid of AMP_INCLUDED

Change-Id: I0f43061b150cfc61bb31cfc7a580592454cfbf9f

7 years agoGet rid of GAP control block
Jakub Pawlowski [Fri, 26 May 2017 22:49:07 +0000 (15:49 -0700)]
Get rid of GAP control block

Instead of global GAP control block, use separate block for gap_conn.cc
and gap_ble.cc

Change-Id: I48c18401390300f80285ba5491e8d91ee63d55ef

7 years agoGet rid of GAP_TRACE_* logs
Jakub Pawlowski [Fri, 26 May 2017 22:16:15 +0000 (15:16 -0700)]
Get rid of GAP_TRACE_* logs

This is a step required for making GAP testable, and not dependent on
any global log structures.

Change-Id: I5073e800cf842864021328308feb59a409927b2b

7 years agoGATT: Interop fix for service changed indications
Myles Watson [Fri, 26 May 2017 23:14:13 +0000 (23:14 +0000)]
GATT: Interop fix for service changed indications
am: 43c7f9f477

Change-Id: Ie6017226118fa60f5d05034a2e04a4dcbd31828a

7 years agoGATT: Interop fix for service changed indications
Myles Watson [Fri, 26 May 2017 00:24:49 +0000 (17:24 -0700)]
GATT: Interop fix for service changed indications

The Pixel C Keyboard disconnects if it receives an indication
for which it hasn't registered.

Test: Add a GATT service with Pixel C connected
Bug: 34352677
Change-Id: I1f717db40b2ba9ec21feac5fd9e339c09f140d51

7 years agoGet rid of GAP_CONN_INCLUDED
Jakub Pawlowski [Fri, 26 May 2017 21:36:51 +0000 (14:36 -0700)]
Get rid of GAP_CONN_INCLUDED

Change-Id: I2c0926c7c935b6efe1f0ea35a86ed89edb746096

7 years agoBLE GAP simplification
Jakub Pawlowski [Thu, 25 May 2017 16:05:23 +0000 (09:05 -0700)]
BLE GAP simplification

Test: manual
Change-Id: I73120878aadf41e54f8eb1aae75e9f9bbb1df942

7 years agoHSP: Use peer_version during SCO setup
Jack He [Tue, 23 May 2017 02:23:04 +0000 (19:23 -0700)]
HSP: Use peer_version during SCO setup

* HSP profile should use peer_version obtained through SDP search to
  determine its behavior during SCO setup instead of a local version
  during initialization
* Added a WARNING message if SDP search failed to get remote HSP
  version, the default behavior is to use HSP 1.0
* Changed SDP search initialization to look for one UUID at a time
* See Bluetooth Erratum 3507

Test: make, HSP PTS test
Bug: 38210042
Change-Id: I67ce615a785b25a2e9304613a29d9be66a656c54

7 years agoRemove dead code from GAP am: bd40666323
Jakub Pawlowski [Fri, 26 May 2017 19:21:51 +0000 (19:21 +0000)]
Remove dead code from GAP am: bd40666323
am: af43d92665

Change-Id: I38006520ff90630b114419eeb82a662122772ff2

7 years agoRemove dead code from GAP
Jakub Pawlowski [Fri, 26 May 2017 19:19:51 +0000 (19:19 +0000)]
Remove dead code from GAP
am: bd40666323

Change-Id: If144088be038a51592f8013373db1c96d40f5e02

7 years agoRemove dead code from GAP
Jakub Pawlowski [Fri, 26 May 2017 17:25:02 +0000 (10:25 -0700)]
Remove dead code from GAP

Test: none
Change-Id: I23badbf73420e4af26e6d84f7b04fcd56100b122

7 years agoMerge "MCAP: Add a test tool for MCAP" am: 70e0eada0b
Jack He [Thu, 25 May 2017 22:43:57 +0000 (22:43 +0000)]
Merge "MCAP: Add a test tool for MCAP" am: 70e0eada0b
am: d2cb086e1b

Change-Id: Ifb6fa1a21bd30e00ea1616beec113601954ac17f

7 years agoMerge "MCAP: Add a test tool for MCAP"
Jack He [Thu, 25 May 2017 22:39:27 +0000 (22:39 +0000)]
Merge "MCAP: Add a test tool for MCAP"
am: 70e0eada0b

Change-Id: Idcd521156ce5fb4a087abcde02eaac92cd36c876

7 years agoFix GATT Server disconnecting for no reason am: 16bb48b320
Jakub Pawlowski [Thu, 25 May 2017 22:34:58 +0000 (22:34 +0000)]
Fix GATT Server disconnecting for no reason am: 16bb48b320
am: 5fc17ef4b7

Change-Id: I4f2acc6268bd24e689d727cd97300e0ece66c732

7 years agoRevert "Fix GATT Server disconnecting for no reason" am: 63e8f19255
Jakub Pawlowski [Thu, 25 May 2017 22:34:55 +0000 (22:34 +0000)]
Revert "Fix GATT Server disconnecting for no reason" am: 63e8f19255
am: 5ba92b64da

Change-Id: Ibb34c34a67623fba589a9e2a2599b00011c8d487

7 years agoMerge "MCAP: Add a test tool for MCAP"
Treehugger Robot [Thu, 25 May 2017 22:32:19 +0000 (22:32 +0000)]
Merge "MCAP: Add a test tool for MCAP"

7 years agoFix GATT Server disconnecting for no reason
Jakub Pawlowski [Thu, 25 May 2017 22:30:29 +0000 (22:30 +0000)]
Fix GATT Server disconnecting for no reason
am: 16bb48b320

Change-Id: I6c511d6825620e87503fce76f7c70114f8fd87fc

7 years agoRevert "Fix GATT Server disconnecting for no reason"
Jakub Pawlowski [Thu, 25 May 2017 22:30:26 +0000 (22:30 +0000)]
Revert "Fix GATT Server disconnecting for no reason"
am: 63e8f19255

Change-Id: I6e717171f346ce5d7331f8ea13821e6b54bdb5d6

7 years agoFix crashes when GAP operation is interrupted by disconnection am: feec106412
Jakub Pawlowski [Thu, 25 May 2017 21:22:39 +0000 (21:22 +0000)]
Fix crashes when GAP operation is interrupted by disconnection am: feec106412
am: 99664212c1

Change-Id: Iede38cf945d63498158f7967eac3c20b8b4e331b

7 years agoFix crashes when GAP operation is interrupted by disconnection
Jakub Pawlowski [Thu, 25 May 2017 21:18:09 +0000 (21:18 +0000)]
Fix crashes when GAP operation is interrupted by disconnection
am: feec106412

Change-Id: I3e714e751e0110cbff1ad6459e5e51b1cd324e56

7 years agoFix GATT Server disconnecting for no reason
Jakub Pawlowski [Thu, 25 May 2017 16:09:12 +0000 (09:09 -0700)]
Fix GATT Server disconnecting for no reason

Connections created by GAP profile should be ephemeral, and not
interfere with the connection timeout.

When a device is bonded, listing services through DM would cause a
DM APP to create a connection, and later to disconnect. This causes
connection to timeout. In case a device was already connected, this
should not happen.

Bug: 34951749
Test: manual
Change-Id: Iad04fd9eed4c664f35131442e3f83a704497a067

7 years agoRevert "Fix GATT Server disconnecting for no reason"
Jakub Pawlowski [Thu, 25 May 2017 20:24:28 +0000 (13:24 -0700)]
Revert "Fix GATT Server disconnecting for no reason"

This reverts commit b69edd55ffe953d4f71f4a948e3feb2243223980.

7 years agoMCAP: Add a test tool for MCAP
Jack He [Thu, 18 May 2017 05:26:05 +0000 (22:26 -0700)]
MCAP: Add a test tool for MCAP

* Add a command line tool for MCAP related tests
* This tool can access the Bluetooth stack via a command line program
* Type "help" to obtain a list of available console commands in this
  Bluetooth
* Bluetooth must be disabled when this tool is running

Bug: 37867299
Test: make, PTS MCAP test
Change-Id: I106e6625ee8a29b7fdad88cdfeb99419054ef771

7 years agoFix crashes when GAP operation is interrupted by disconnection
Jakub Pawlowski [Thu, 25 May 2017 15:21:53 +0000 (08:21 -0700)]
Fix crashes when GAP operation is interrupted by disconnection

Also fixes potential issue while allocating control blocks.

Test: none
Bug: 38499153
Change-Id: I5101ac97476953cdfece45c3fa9b909e38b9d2dd

7 years agoFix GATT Server disconnecting for no reason am: b69edd55ff
Jakub Pawlowski [Thu, 25 May 2017 14:25:23 +0000 (14:25 +0000)]
Fix GATT Server disconnecting for no reason am: b69edd55ff
am: 96c6be22d9

Change-Id: I21a5025712598779f7d0501031aa7bf4690fd853

7 years agoFix GATT Server disconnecting for no reason
Jakub Pawlowski [Thu, 25 May 2017 14:21:53 +0000 (14:21 +0000)]
Fix GATT Server disconnecting for no reason
am: b69edd55ff

Change-Id: I02d9ded4520eabb317b85a5a10888e9432c991cf

7 years agoFix GATT Server disconnecting for no reason
Jakub Pawlowski [Wed, 24 May 2017 23:15:21 +0000 (16:15 -0700)]
Fix GATT Server disconnecting for no reason

When two devices are bonded, even if the device is supposed to act just
as a GATT Server, service discovery is performed. Doing "read by type"
should not trigger connection timeout, or disconnection, as the server
should wait for the client to finish connection.

Please note that it does not GATT Client behaviour, as they manage the
connection timeout through L2CA_SendFixedChnlData called on each data
packet.

Bug: 34951749
Test: manual
Change-Id: If53cf63dc204238a60839497992c870b1b39aa60

7 years agoMCAP: Add test interface for PTS test (2/2) am: 722ce12bab
Jack He [Wed, 24 May 2017 20:45:47 +0000 (20:45 +0000)]
MCAP: Add test interface for PTS test (2/2) am: 722ce12bab
am: 445f930bc8

Change-Id: If205315f7e2dde0fd2bd99fb03793d5159399a1f

7 years agoMCAP: Add test interface for PTS test (2/2)
Jack He [Wed, 24 May 2017 20:42:46 +0000 (20:42 +0000)]
MCAP: Add test interface for PTS test (2/2)
am: 722ce12bab

Change-Id: Idf202cccd67609408beb0f7ca7b98b75b914abf8

7 years agoMCAP: Add test interface for PTS test (2/2)
Jack He [Sat, 13 May 2017 20:52:12 +0000 (13:52 -0700)]
MCAP: Add test interface for PTS test (2/2)

* PTS tests requires MCAP APIs to be called at protocol level
* This CL creates a test interface to enable the above functionality

Bug: 37867299
Test: make, no user visible effect
Change-Id: I15cc6cc613ce8f7c57564296e45077ab877c269b

7 years agoMCAP: Fix bugs in MCAP stack am: b3a8dc2ece
Jack He [Tue, 23 May 2017 22:53:34 +0000 (22:53 +0000)]
MCAP: Fix bugs in MCAP stack am: b3a8dc2ece
am: 76c828952b

Change-Id: I82124c3cba4009b4f33d2188afd31e67cd6b98d8

7 years agoMCAP: Fix bugs in MCAP stack
Jack He [Tue, 23 May 2017 22:50:39 +0000 (22:50 +0000)]
MCAP: Fix bugs in MCAP stack
am: b3a8dc2ece

Change-Id: I325234385a1b27cfdef45a785b09880b56570f93

7 years agoMCAP: Fix bugs in MCAP stack
Jack He [Thu, 18 May 2017 05:22:18 +0000 (22:22 -0700)]
MCAP: Fix bugs in MCAP stack

* Fix error response message for clock sync opcodes
* Fix error response message for CREATE_MDL opcode
* Fix logging in the MCAP stack

Bug: 37867299
Test: make, PTS MCAP test
Change-Id: I7a37ac04806bca20d732357f00b4761577b4be19

7 years agoMerge "Remove logspam when initializing logging for Bluetooth" am: 0e3621da9f
Ajay Panicker [Mon, 22 May 2017 22:11:56 +0000 (22:11 +0000)]
Merge "Remove logspam when initializing logging for Bluetooth" am: 0e3621da9f
am: 040a8c6a4e

Change-Id: I8df73a5791ad79c9111d350efd6d38b9b20b9377

7 years agoMerge "Remove logspam when initializing logging for Bluetooth"
Ajay Panicker [Mon, 22 May 2017 22:03:56 +0000 (22:03 +0000)]
Merge "Remove logspam when initializing logging for Bluetooth"
am: 0e3621da9f

Change-Id: I37043759504c279eb9063df8dddfa35762843462

7 years agoRemove logspam when adding GATT attributes am: 60177e01c4
Ajay Panicker [Mon, 22 May 2017 22:03:56 +0000 (22:03 +0000)]
Remove logspam when adding GATT attributes am: 60177e01c4
am: 0c68aa7656

Change-Id: Iec79072ff63213b76330187af93e171beca133a8

7 years agoRemove logspam when adding GATT attributes
Ajay Panicker [Mon, 22 May 2017 21:57:58 +0000 (21:57 +0000)]
Remove logspam when adding GATT attributes
am: 60177e01c4

Change-Id: I1f740dbf89ae5a2888a053d31d37d292748872e7

7 years agoMerge "Remove logspam when initializing logging for Bluetooth"
Treehugger Robot [Mon, 22 May 2017 21:55:19 +0000 (21:55 +0000)]
Merge "Remove logspam when initializing logging for Bluetooth"

7 years agoRemove logspam when adding GATT attributes
Ajay Panicker [Wed, 17 May 2017 01:46:22 +0000 (18:46 -0700)]
Remove logspam when adding GATT attributes

Bug: 37905488
Test: Code still compiles
Change-Id: I479fc82a15f977b7e3d50b07302241909efc8856

7 years agoRemove logspam when initializing logging for Bluetooth
Ajay Panicker [Wed, 17 May 2017 05:43:51 +0000 (22:43 -0700)]
Remove logspam when initializing logging for Bluetooth

Bug: 37803501
Test: Code still compiles
Change-Id: I9326e58aff0d80e441cb92c41e0e4a7d70e32b1b

7 years agoMerge "Protect the message loop from accesses after HCI shutdown" am: e5a161ef01
Pavlin Radoslavov [Thu, 18 May 2017 01:26:54 +0000 (01:26 +0000)]
Merge "Protect the message loop from accesses after HCI shutdown" am: e5a161ef01
am: 5240933dbd

Change-Id: Iaf00aea595eacd9da669de3c968e2dc0ad1e2b40

7 years agoMerge "Protect the message loop from accesses after HCI shutdown"
Pavlin Radoslavov [Thu, 18 May 2017 01:23:24 +0000 (01:23 +0000)]
Merge "Protect the message loop from accesses after HCI shutdown"
am: e5a161ef01

Change-Id: I00d1ae80216d84119234b79d3110bc0f9560b6bf

7 years agoMerge "Protect the message loop from accesses after HCI shutdown"
Treehugger Robot [Thu, 18 May 2017 01:12:49 +0000 (01:12 +0000)]
Merge "Protect the message loop from accesses after HCI shutdown"

7 years agoProtect concurrent access to local state used during BLE scanning am: eb43e9cf12
Jakub Pawlowski [Thu, 18 May 2017 00:19:50 +0000 (00:19 +0000)]
Protect concurrent access to local state used during BLE scanning am: eb43e9cf12
am: e6b3b39b8a

Change-Id: Iddd799d38d71606131424ab6514f3c7e49786c69

7 years agoProtect concurrent access to local state used during BLE scanning
Jakub Pawlowski [Thu, 18 May 2017 00:16:49 +0000 (00:16 +0000)]
Protect concurrent access to local state used during BLE scanning
am: eb43e9cf12

Change-Id: Ic5b8a1677799e18402921b874a0f58c2e0aa1541

7 years agoProtect the message loop from accesses after HCI shutdown
Pavlin Radoslavov [Wed, 17 May 2017 01:50:43 +0000 (18:50 -0700)]
Protect the message loop from accesses after HCI shutdown

Bug: 38330724
Test: Manual: enable/disable Bluetooth
Change-Id: Iaece4cd608c67b28b436ded9fcc51c0bf28f4098

7 years agoProtect concurrent access to local state used during BLE scanning
Jakub Pawlowski [Wed, 17 May 2017 22:23:22 +0000 (15:23 -0700)]
Protect concurrent access to local state used during BLE scanning

Make sure that all access happens on jni thread

Bug: 38298938
Test: Code compilation
Change-Id: I38246626d2c6390586b314b27889dd9ba905f406

7 years agoBlacklist Kinivo BTC350 for Absolute Volume am: e1fca1bacd
Marie Janssen [Wed, 17 May 2017 20:57:35 +0000 (20:57 +0000)]
Blacklist Kinivo BTC350 for Absolute Volume am: e1fca1bacd
am: 7413f9baa6

Change-Id: I472a6d8c938d8c511f06b9f612b8cc0b5034c624

7 years agoBlacklist Kinivo BTC350 for Absolute Volume
Marie Janssen [Wed, 17 May 2017 20:54:03 +0000 (20:54 +0000)]
Blacklist Kinivo BTC350 for Absolute Volume
am: e1fca1bacd

Change-Id: Ie0771c6e1607130851d9cbf4f69ddfad1e07013b

7 years agoBlacklist Kinivo BTC350 for Absolute Volume
Marie Janssen [Wed, 17 May 2017 01:40:45 +0000 (18:40 -0700)]
Blacklist Kinivo BTC350 for Absolute Volume

The volume is erratic on the speakers when the speaker is reporting
linear increase, with decreases for higher volumes.

Test: check that absolute volume not used for Kinivo Speakers
Bug: 37872586
Change-Id: Ic5f409e8631bece66a75372b916faa9c104e2024

7 years agoDisable MONO channel mode for LDAC am: f7e48dff99
Pavlin Radoslavov [Wed, 17 May 2017 01:47:02 +0000 (01:47 +0000)]
Disable MONO channel mode for LDAC am: f7e48dff99
am: 1338709b40

Change-Id: I468a18879c6513b63a5313886474037c0a95de44

7 years agoDisable MONO channel mode for LDAC
Pavlin Radoslavov [Wed, 17 May 2017 01:45:33 +0000 (01:45 +0000)]
Disable MONO channel mode for LDAC
am: f7e48dff99

Change-Id: I320fe419ed51b9b85944a485e022932fa36ff4de

7 years agoDisable MONO channel mode for LDAC
Pavlin Radoslavov [Tue, 16 May 2017 23:20:23 +0000 (16:20 -0700)]
Disable MONO channel mode for LDAC

Bug: 38351937
Test: A2DP streaming to LDAC headset and switching MONO/STEREO in Settings
Change-Id: I20c5069fd5d104b9ebe767ae2728af7d7b2ae1d9

7 years agoDiscover primary service by UUID for PTS tests (1/4) am: 45aebe75f7
Jakub Pawlowski [Tue, 16 May 2017 20:41:18 +0000 (20:41 +0000)]
Discover primary service by UUID for PTS tests (1/4) am: 45aebe75f7
am: b72096e5aa

Change-Id: Ib02b37c8890027110b90bd04a0e164da4ed7ceb1

7 years agoDiscover primary service by UUID for PTS tests (1/4)
Jakub Pawlowski [Tue, 16 May 2017 20:29:24 +0000 (20:29 +0000)]
Discover primary service by UUID for PTS tests (1/4)
am: 45aebe75f7

Change-Id: Id2f05d32e1dfb8632c50707cb19af1a80a91f8da

7 years agoDiscover primary service by UUID for PTS tests (1/4)
Jakub Pawlowski [Tue, 16 May 2017 17:47:54 +0000 (10:47 -0700)]
Discover primary service by UUID for PTS tests (1/4)

Bug: 38123054
Test: manual
Change-Id: Ic97a964ca2a25a84c6abcf41acb0f3fb583488a2

7 years agoFix crash on GATT service unregistration am: 0d89212035
Jakub Pawlowski [Mon, 15 May 2017 18:37:02 +0000 (18:37 +0000)]
Fix crash on GATT service unregistration am: 0d89212035
am: b479d98407

Change-Id: I07f5aee7f419d5f0e6cefdfded61191e0a0edfac

7 years agoFix crash on GATT service unregistration
Jakub Pawlowski [Mon, 15 May 2017 18:34:01 +0000 (18:34 +0000)]
Fix crash on GATT service unregistration
am: 0d89212035

Change-Id: I85f1bc7e5823c359f9f1d96b4fdf6ff12f35c127

7 years agoFix crash on GATT service unregistration
Jakub Pawlowski [Mon, 15 May 2017 07:58:07 +0000 (00:58 -0700)]
Fix crash on GATT service unregistration

When SDP_MAX_RECORDS were reached in SDP db, which usually happen by
registering big number of GATT services, unregistration of a service was
causing a crash. This was because we moved from memory after the array
into last element.

Bug: 38265174
Test: manual
Change-Id: I7b0235213fb07c85dcc1245f1c840b41267521d5

7 years agoFix BLE white list issues am: 8451ad010e
Emil Lenngren [Fri, 12 May 2017 22:46:37 +0000 (22:46 +0000)]
Fix BLE white list issues am: 8451ad010e
am: 3a8dc25485

Change-Id: Iee978c8551798ec02503969821cdc9355e97a386

7 years agoFix BLE white list issues
Emil Lenngren [Fri, 12 May 2017 22:39:20 +0000 (22:39 +0000)]
Fix BLE white list issues
am: 8451ad010e

Change-Id: Ic3a2f4f77f7d74f4021a68df3f996b5c9e0920c9

7 years agoFix BLE white list issues
Emil Lenngren [Mon, 19 Dec 2016 19:21:19 +0000 (19:21 +0000)]
Fix BLE white list issues

Since Bluetooth 4.2 and errata ESR08 there may not be more than one
connection between two LE device addresses. Also the stack assumes
there is at maximum one connection to the same address. This patch
makes sure there are no connected devices in the white list when a
connection attempt is started. Since some (even 4.2) controllers don't
handle this correctly, currently this method is used regardless of
controller in this patch.

When the maximum L2CAP connections were reached and a new connection
was established to a device using auto connect, the stack hung and
would no longer create new connections until Bluetooth was restarted,
since the state change to BLE_CONN_IDLE was forgotten. This patch
resets the state correctly, and also never initiates a connection
unless there is space to avoid connect-disconnect loop.

There were also bugs in the background_connections hash map; memory was
not freed when an element was erased and an incorrect hash function
which used the pointer to a bd addr instead of the bd addr itself which
basically meant that elements were never removed. This patch removes
the dynamic memory allocation and uses a correct hash function.

There was a bug that might lead to that the white list was filled
beyond its maximum, due to the counter was updated on the HCI command
complete event, which might run too late. Now the space is instead
calculated based on what commands have been sent to the controller.

The address type of the address added to the white list must also be
tracked, otherwise it might be updated due to a BLE scan, and later the
wrong address is removed from the white list. This patch fixes this.
(Preferably 49-bit bd addrs should be used as identifier through the
whole stack but we're not there yet.)

There was a queue of size 10 with pending white list operations. That
queue got full if there was initially 10 devices in the white list,
then the 10 devices were removed and immediately after 10 other devices
were added. This patch removes the queue altogether by instead syncing
against the background_connections hash map.

Bug: https://code.google.com/p/android/issues/detail?id=219910
Test: stress-testing with a bunch of BLE devices and inspecting HCI log
Change-Id: I78de654ffbea5f4962a189caf984f7f2934e8fbe

7 years agoDon't ignore the A2DP Sink preferred SBC codec config am: d62e522131
Pavlin Radoslavov [Fri, 12 May 2017 18:48:06 +0000 (18:48 +0000)]
Don't ignore the A2DP Sink preferred SBC codec config am: d62e522131
am: 625da700c3

Change-Id: I112318372ffefad47337aeb1f18c081552462a8b

7 years agoSet the RTP Header Marker bit selectively per A2DP codec am: 3b8391cd47
Pavlin Radoslavov [Fri, 12 May 2017 18:48:02 +0000 (18:48 +0000)]
Set the RTP Header Marker bit selectively per A2DP codec am: 3b8391cd47
am: 4542775aaa

Change-Id: I477ec3ace25eff48c31bb1f587c75ce80036c8d7

7 years agoDon't ignore the A2DP Sink preferred SBC codec config
Pavlin Radoslavov [Fri, 12 May 2017 18:46:06 +0000 (18:46 +0000)]
Don't ignore the A2DP Sink preferred SBC codec config
am: d62e522131

Change-Id: I0b85499fa56336a735101eab886f52ea0fd8692a

7 years agoSet the RTP Header Marker bit selectively per A2DP codec
Pavlin Radoslavov [Fri, 12 May 2017 18:46:02 +0000 (18:46 +0000)]
Set the RTP Header Marker bit selectively per A2DP codec
am: 3b8391cd47

Change-Id: I6678114e4e9c423b198aa15ee5da12cd973d46d7

7 years agoDon't ignore the A2DP Sink preferred SBC codec config
Pavlin Radoslavov [Fri, 12 May 2017 10:02:08 +0000 (03:02 -0700)]
Don't ignore the A2DP Sink preferred SBC codec config

If the A2DP Sink device sends "Set Configuration" with its preferred
SBC configuration, try using that configuration when selecting
the codec parameters instead of the A2DP Sink SBC capability.

Test: A2DP streaming, PTS AVDTP Tests: TC_ACP_SRC_SIG_SMG_BV_18_C,
      TC_ACP_SRC_SIG_SMG_BV_20_C, TC_ACP_SRC_SIG_SMG_BV_22_C
      PTS A2DP Tests: A2DP/SRC/SET/BV-04-I, A2DP/SRC/SET/BV-06-I
Bug: 37723311
Bug: 35664023
Change-Id: I48e2aa664b899c1cda5df4d1f86f9cfa3a9a67f6

7 years agoSet the RTP Header Marker bit selectively per A2DP codec
Pavlin Radoslavov [Fri, 12 May 2017 08:16:10 +0000 (01:16 -0700)]
Set the RTP Header Marker bit selectively per A2DP codec

Add a mechanism to set the RTP Header Marker bit per codec.
Currently, the Marker bit is set only for AAC.

Test: A2DP streaming, PTS AVDTP tests: TC_ACP_SRC_TRA_BTR_BV_01_C,
      TC_INT_SRC_SIG_SMG_BV_17_C, TC_INT_SRC_TRA_BTR_BV_01_C
Bug: 37723283
Change-Id: I9b8e77d44c750746c169df9628d5539ad2406b92

7 years agoImprove GATT Server database handling. am: 6395f1547e
Jakub Pawlowski [Fri, 12 May 2017 08:28:19 +0000 (08:28 +0000)]
Improve GATT Server database handling. am: 6395f1547e
am: 44087dbb60

Change-Id: I604c841e1bfe343f30cbb11c513a751f5a099fa6

7 years agoImprove GATT Server database handling.
Jakub Pawlowski [Fri, 12 May 2017 08:26:20 +0000 (08:26 +0000)]
Improve GATT Server database handling.
am: 6395f1547e

Change-Id: I1519dd0981b430a9a76a91126ad403616a856cea

7 years agoImprove GATT Server database handling.
Jakub Pawlowski [Tue, 9 May 2017 12:02:38 +0000 (05:02 -0700)]
Improve GATT Server database handling.

- use references instead of pointers where possible. Thanks to it we can
  remove some reduntant null checks and simplify the code.
- use directly allocated memory instead of own buffers. Thanks to it the
  stack uses around 12kb less of memory after startup.
- use list and vector from std library, instead of some hand-written
  implementations.

This patch is a prerequisite for further server refactoring, that will
further reduce the space used, make unit-testing possible, and enable
proper handling of PTS GATT tests.

Test: sl4a GattReadTest
Bug: 38225928
Change-Id: I1620be682259ccb8f0c02754806e355e3f1ad0c1

7 years agoDisable output_sample.pcm am: daf55dfda0
Joseph Pirozzo [Thu, 11 May 2017 23:38:18 +0000 (23:38 +0000)]
Disable output_sample.pcm am: daf55dfda0
am: 7f264f124b

Change-Id: I7f5e128a92e21c9f72cd751970b355a96001ed2d

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation am...
Jacky Cheung [Thu, 11 May 2017 23:23:30 +0000 (23:23 +0000)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation am: 0ce25115e9  -s ours
am: 6ba79a8618  -s ours

Change-Id: Ic4e5bf9b9503fc72a6a081f58970c9998ba061ca

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
Jacky Cheung [Thu, 11 May 2017 23:19:01 +0000 (23:19 +0000)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
am: 0ce25115e9  -s ours

Change-Id: I105198593ba9994002205567038778162dc9e6d0

7 years agoDisable output_sample.pcm
Joseph Pirozzo [Thu, 11 May 2017 23:11:31 +0000 (23:11 +0000)]
Disable output_sample.pcm
am: daf55dfda0

Change-Id: Ifdc79bb2e4c3530c50f985a8cc1a949e25266b11

7 years agoDO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation
Jacky Cheung [Wed, 10 May 2017 21:23:06 +0000 (14:23 -0700)]
DO NOT MERGE ANYWHERE Check ACL link on non-opportunistic connection creation

At the time of connection, the idle timeout could have been set to a fixed
value, which is likely to be related to the completion of service discovery
after bonding.  A check on ACL link allows the idle timeout to be reset to no
timeout, which would eliminate local host disconnections observed due to
idle timeouts.

Bug: 37352720
Test: manual
Change-Id: Ie0b24b83020d502cf7c55421a27659215253b4d2

7 years agoDisable output_sample.pcm
Joseph Pirozzo [Thu, 11 May 2017 16:36:47 +0000 (09:36 -0700)]
Disable output_sample.pcm

Update include files to include bt_target.h as it has the necessary
defines to correctly allow bdroid_buildcfg.h to enable and disable
dumping to output_sample.pcm.

Bug: 38180732
Test: Stream Bluetooth audio to device and observe that
output_sample.pcm does not get written or appended to.

Change-Id: Ia7926f93a47489686d315e3c9abd1618cb8adda3

7 years agoMerge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed" am: d93b54eada
Pavlin Radoslavov [Thu, 11 May 2017 02:20:31 +0000 (02:20 +0000)]
Merge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed" am: d93b54eada
am: 4b6b594ae7

Change-Id: I7046dacb5a93b995c1695059e56fbaa7847dc8dc

7 years agoMerge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed"
Pavlin Radoslavov [Thu, 11 May 2017 02:19:00 +0000 (02:19 +0000)]
Merge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed"
am: d93b54eada

Change-Id: I2c6324ab93de6bfd2f1cf2dc7cef52c6be955863

7 years agoMerge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed"
Treehugger Robot [Thu, 11 May 2017 02:10:07 +0000 (02:10 +0000)]
Merge "Removed A2DP_GetTrackBitsPerSample() API because it is not needed"

7 years agoMerge changes from topic 'eSCO' am: a5095e6eac
Jack He [Thu, 11 May 2017 02:01:49 +0000 (02:01 +0000)]
Merge changes from topic 'eSCO' am: a5095e6eac
am: 96b45e07ea

Change-Id: I5518a14dfa62f3aa64a9d9e17054219ffe19d99b

7 years agoeSCO: Additional fix to get eSCO working for HFP and HSP (3/5) am: 400ac497f4
Jack He [Thu, 11 May 2017 02:01:45 +0000 (02:01 +0000)]
eSCO: Additional fix to get eSCO working for HFP and HSP (3/5) am: 400ac497f4
am: 1faf995c95

Change-Id: Id6089050ae0f8170c1461f61f24ea2ed2369d87e

7 years agoeSCO: Remove BTM_WBS_INCLUDED from the stack (2/5) am: 3e634d6c1e
Myles Watson [Thu, 11 May 2017 02:01:41 +0000 (02:01 +0000)]
eSCO: Remove BTM_WBS_INCLUDED from the stack (2/5) am: 3e634d6c1e
am: 01e4189eb2

Change-Id: Ief7ca14cda07fa76c94e1e31ef96b3f054cc96f4