OSDN Git Service

android-x86/system-bt.git
7 years agoFix broken linux build am: 2b59c4a084 am: 50a0237992
Jack He [Wed, 10 May 2017 02:46:48 +0000 (02:46 +0000)]
Fix broken linux build am: 2b59c4a084 am: 50a0237992
am: 08f3487615

Change-Id: I98ac424c52bc60668dc74858ad89a038493814dc

7 years agoFix broken linux build am: 2b59c4a084
Jack He [Wed, 10 May 2017 02:41:47 +0000 (02:41 +0000)]
Fix broken linux build am: 2b59c4a084
am: 50a0237992

Change-Id: I9d11fce707c63a0afedab4a28099e16201824728

7 years agoFix broken linux build
Jack He [Wed, 10 May 2017 02:37:03 +0000 (02:37 +0000)]
Fix broken linux build
am: 2b59c4a084

Change-Id: I2acaae3044cba1e50647e21c1104218211294b79

7 years agoFix broken linux build
Jack He [Thu, 4 May 2017 20:27:25 +0000 (13:27 -0700)]
Fix broken linux build

* Generic linux does not have property_get_int32. Instead,
  osi_property_get_int32() is created to handle OS_GENERIC cases
* Some linux header have sigevent.sigev_notify_attributes typed as
  (pthread_attr_t *) whereas others typed it as (void *), as any pointer
  can be implicitly casted to (void *), the current casting to (void *)
  is unncessary and will break build on systems using (pthread_attr_t *)

Test: make, unit test, no user visible effect
Change-Id: I24b33da453dc9d40656168a3bcd900d9c99219ce

7 years agoMerge "Swap BTA and HCI queues with message loops" am: f5db809606 am: 9d2452d7c1
Ajay Panicker [Mon, 8 May 2017 19:40:57 +0000 (19:40 +0000)]
Merge "Swap BTA and HCI queues with message loops" am: f5db809606 am: 9d2452d7c1
am: 3b81ccb7f4

Change-Id: Ife763c68ebfff695ff387947c74137e0b0f445bf

7 years agoMerge "Swap BTA and HCI queues with message loops" am: f5db809606
Ajay Panicker [Mon, 8 May 2017 19:37:57 +0000 (19:37 +0000)]
Merge "Swap BTA and HCI queues with message loops" am: f5db809606
am: 9d2452d7c1

Change-Id: I9bd040e18682cd3b10e88e90e4ecd4c74fb3a5b7

7 years agoMerge "Swap BTA and HCI queues with message loops"
Ajay Panicker [Mon, 8 May 2017 19:34:28 +0000 (19:34 +0000)]
Merge "Swap BTA and HCI queues with message loops"
am: f5db809606

Change-Id: I499fd6260777c054fa1763d1febf9be01234f1bc

7 years agoMerge "Reject LE COC if cid is duplicated" am: 95e3c5ac39 am: 890b25c8b1
Andre Eisenbach [Mon, 8 May 2017 19:28:28 +0000 (19:28 +0000)]
Merge "Reject LE COC if cid is duplicated" am: 95e3c5ac39 am: 890b25c8b1
am: 97331a79eb

Change-Id: Idea373689e7e82f5f9b99f6ce9ceec84313f2680

7 years agoMerge "Swap BTA and HCI queues with message loops"
Treehugger Robot [Mon, 8 May 2017 19:27:33 +0000 (19:27 +0000)]
Merge "Swap BTA and HCI queues with message loops"

7 years agoMerge "Reject LE COC if cid is duplicated" am: 95e3c5ac39
Andre Eisenbach [Mon, 8 May 2017 19:22:57 +0000 (19:22 +0000)]
Merge "Reject LE COC if cid is duplicated" am: 95e3c5ac39
am: 890b25c8b1

Change-Id: I2eaa7c7f7f2ae36251635c3c72016e495c28441c

7 years agoMerge "Reject LE COC if cid is duplicated"
Andre Eisenbach [Mon, 8 May 2017 19:19:57 +0000 (19:19 +0000)]
Merge "Reject LE COC if cid is duplicated"
am: 95e3c5ac39

Change-Id: I16e1c8bc032df0215f72187639fe9e8a31444192

7 years agoMerge "Reject LE COC if cid is duplicated"
Andre Eisenbach [Mon, 8 May 2017 19:13:56 +0000 (19:13 +0000)]
Merge "Reject LE COC if cid is duplicated"

7 years agoAdd additional failure modes for SMP PTS test cases am: fd102ca161 am: cd6b7988d6
ravishankar srivatsa [Mon, 8 May 2017 18:07:53 +0000 (18:07 +0000)]
Add additional failure modes for SMP PTS test cases am: fd102ca161 am: cd6b7988d6
am: 4a12410fdd

Change-Id: I58423d78aa65ea2a69ad0ef2363a1806a1b397d5

7 years agoAdd additional failure modes for SMP PTS test cases am: fd102ca161
ravishankar srivatsa [Mon, 8 May 2017 18:04:50 +0000 (18:04 +0000)]
Add additional failure modes for SMP PTS test cases am: fd102ca161
am: cd6b7988d6

Change-Id: Iecaf5f6655631388c10930b93a5b9a2825bc8744

7 years agoAdd additional failure modes for SMP PTS test cases
ravishankar srivatsa [Mon, 8 May 2017 18:01:51 +0000 (18:01 +0000)]
Add additional failure modes for SMP PTS test cases
am: fd102ca161

Change-Id: Ie808ef38dcd0367b54eee0f66362e4c2dac04407

7 years agoSwap BTA and HCI queues with message loops
Ajay Panicker [Wed, 1 Mar 2017 18:00:30 +0000 (10:00 -0800)]
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

7 years agoReject LE COC if cid is duplicated
Jaganath Kanakkassery [Tue, 2 May 2017 10:54:16 +0000 (16:24 +0530)]
Reject LE COC if cid is duplicated

This is for PTS test TP/LE/CFC/BV-20-C.

The scenario is there is already one COC between DUT and PTS.
Then PTS tries to establish one more COC with same cid which
should be rejected.

Change-Id: I094a4058ac0e7bb9d7344e66d9feafee17bc3d53
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
7 years agoLE advertise data parsing refactor
Jakub Pawlowski [Mon, 8 May 2017 16:24:36 +0000 (16:24 +0000)]
LE advertise data parsing refactor
am: cfd6525c3d

Change-Id: Ie40a45b7fee7c1b631b35713502616e7a7dc19c6

7 years agoCheck device name length
Jakub Pawlowski [Mon, 8 May 2017 16:24:11 +0000 (16:24 +0000)]
Check device name length
am: d7ed7c0e3d

Change-Id: I79056327664a9fe20bf8f2eb984920954bf9fd95

7 years agoAdd additional failure modes for SMP PTS test cases
ravishankar srivatsa [Thu, 4 May 2017 04:43:58 +0000 (10:13 +0530)]
Add additional failure modes for SMP PTS test cases

SM/MAS/SCJW/BI-01-C [Just Works, IUT Initiator, Secure Connections -Pairing Failed
For Lower tester to handle step 15.
Lower Tester responds with a Pairing Failed command in phase 2 with reason code
0x0C (Numeric Comparison Failed).

Bug: 37707831
Change-Id: Ia7103330d1d1ecb06e39502c2a0976585b203ba5
Signed-off-by: Ravishankar Srivatsa <Ravishankar.Srivatsa@intel.com>
Test: manual

7 years agoLE advertise data parsing refactor
Jakub Pawlowski [Fri, 28 Apr 2017 21:59:46 +0000 (14:59 -0700)]
LE advertise data parsing refactor

* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType
* check wether AD data is properly formatted when the packet is
  received. Some controllers were returning malformed data that
  resulted in stack crashes for BT5 packets.
* add tests to verify the helpers work as expected

Test: added net_test_stack_ad_parser
Bug: 37671082
Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05
(cherry picked from commit 103b2c44d3db6172a2dc9319e215eeece504316e)

7 years agoCheck device name length
Jakub Pawlowski [Fri, 28 Apr 2017 12:15:16 +0000 (05:15 -0700)]
Check device name length

BT spec limits the length of device name to 248 bytes. With the new
LE advertising packets, that can go up to 1650 bytes long, we must check
the length of device name received.

Bug: 37671082
Test: manual
Change-Id: Iad309d638003c2391014c9764605d84ed5717cb1
(cherry picked from commit 3a4e7622ff07772a512052c23cada59f5830941f)

7 years agobta_dm: Stop copying garbage am: 36d19de1aa am: da798e5e85
Martin Brabham [Sat, 6 May 2017 03:10:39 +0000 (03:10 +0000)]
bta_dm: Stop copying garbage am: 36d19de1aa am: da798e5e85
am: 8e764c5b3d

Change-Id: Iccc68b96164abd9ab5e493a0f6e3b6ae5912b264

7 years agobta_dm: Stop copying garbage am: 36d19de1aa
Martin Brabham [Sat, 6 May 2017 03:02:35 +0000 (03:02 +0000)]
bta_dm: Stop copying garbage am: 36d19de1aa
am: da798e5e85

Change-Id: I1ca5479b2a8355091a8fbf9771ac9133ab1f53ba

7 years agobta_dm: Stop copying garbage
Martin Brabham [Sat, 6 May 2017 03:00:31 +0000 (03:00 +0000)]
bta_dm: Stop copying garbage
am: 36d19de1aa

Change-Id: Ie723a15c8f9f9280dd93beaccbada8a1458b8717

7 years agobta_dm: Stop copying garbage
Martin Brabham [Mon, 1 May 2017 23:30:40 +0000 (16:30 -0700)]
bta_dm: Stop copying garbage

After we reach 7 ACL connections we have 7 peer device records.
Once we reach this then we lose a connection and shrink the list we
copy garbage into the last peer device record.  This can cause the flag
remove_dev_pending to be set to something > 0 thus true which causes the
stack to remove the device and its bonding information on the next
acl change event.

ACL Connections can happen from any connection (pairing, SDP, etc...)

Bug: 36598959
Test: Manual
Change-Id: Ifbaa4098edba442274ffde183960ef53169988e7

7 years agoMove hci_thread to a message loop and prevent thread from spinning am: 48294531bf...
Ajay Panicker [Sat, 6 May 2017 00:51:58 +0000 (00:51 +0000)]
Move hci_thread to a message loop and prevent thread from spinning am: 48294531bf am: 97b987c390
am: e0d1e28d46

Change-Id: Ie5b9676b6316a260db4299a91140aad4a62b2f54

7 years agoMove hci_thread to a message loop and prevent thread from spinning am: 48294531bf
Ajay Panicker [Sat, 6 May 2017 00:36:50 +0000 (00:36 +0000)]
Move hci_thread to a message loop and prevent thread from spinning am: 48294531bf
am: 97b987c390

Change-Id: I9d671f7ad9b426959aeffa924b2a8daa854dc4d1

7 years agoMove hci_thread to a message loop and prevent thread from spinning
Ajay Panicker [Sat, 6 May 2017 00:27:09 +0000 (00:27 +0000)]
Move hci_thread to a message loop and prevent thread from spinning
am: 48294531bf

Change-Id: I4b1e3da909a4cd6125c17f4dc56a0d73aad31f70

7 years agoMove hci_thread to a message loop and prevent thread from spinning
Ajay Panicker [Fri, 28 Apr 2017 22:26:38 +0000 (15:26 -0700)]
Move hci_thread to a message loop and prevent thread from spinning

Before this patch, if there was a message on the command queue and
there were no command credits, the thread reactor would spin trying
to process the message on the command queue and would continue until
a credit was received. This led to a bug where upon switching users,
hci_thread would spin and try to use 100% of the CPU. This is fixed
by moving over to a message loop and queue system. The message loop
processes all the messages. If there aren't enough command credits,
command messages are deferred to the command queue and popped off
whenever more credits are aquired. The deferred queue has priority
to credits over recently posted messages.

Bug: 37733903
Test: Swap users with the real time scheduling patch applied, and
      general Bluetooth usage.
      TestTracker: 86249
Change-Id: Ib775e47f6d4810d3d7d8af5b3ba84adc4ada3da5
(cherry picked from commit ffee0ee8a102101ded1d3fa398f20c4215e0c441)

7 years agoMerge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev
Philip Cuadra [Fri, 5 May 2017 22:26:03 +0000 (22:26 +0000)]
Merge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev
am: b7bdbe76e9

Change-Id: I7241ef62d5d80612c28a80a7f236e5f43769a088

7 years agoMove hci_thread to a message loop and prevent thread from spinning
Ajay Panicker [Fri, 5 May 2017 22:25:53 +0000 (22:25 +0000)]
Move hci_thread to a message loop and prevent thread from spinning
am: ffee0ee8a1

Change-Id: Id7e7baaba714fd88d7f1bb562070f131b8155d13

7 years agoMerge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 22:17:39 +0000 (22:17 +0000)]
Merge "Revert "Revert "Make Bluetooth audio threads use RT scheduling""" into oc-dev

7 years agoLE advertise data parsing refactor am: 103b2c44d3 am: 17899fab2f
Jakub Pawlowski [Fri, 5 May 2017 22:13:17 +0000 (22:13 +0000)]
LE advertise data parsing refactor am: 103b2c44d3 am: 17899fab2f
am: c78baf5da6

Change-Id: Ibc2e6aebdbdebe1229f73dd95d4a8fa4fda8f892

7 years agoLE advertise data parsing refactor am: 103b2c44d3
Jakub Pawlowski [Fri, 5 May 2017 22:09:41 +0000 (22:09 +0000)]
LE advertise data parsing refactor am: 103b2c44d3
am: 17899fab2f

Change-Id: I959de2110f7cb3778185445bce2ec1e4541046c0

7 years agoLE advertise data parsing refactor
Jakub Pawlowski [Fri, 5 May 2017 22:05:19 +0000 (22:05 +0000)]
LE advertise data parsing refactor
am: 103b2c44d3

Change-Id: I467cf2628393c11d316ad12664aa04f19106f036

7 years agoMove hci_thread to a message loop and prevent thread from spinning
Ajay Panicker [Fri, 28 Apr 2017 22:26:38 +0000 (15:26 -0700)]
Move hci_thread to a message loop and prevent thread from spinning

Before this patch, if there was a message on the command queue and
there were no command credits, the thread reactor would spin trying
to process the message on the command queue and would continue until
a credit was received. This led to a bug where upon switching users,
hci_thread would spin and try to use 100% of the CPU. This is fixed
by moving over to a message loop and queue system. The message loop
processes all the messages. If there aren't enough command credits,
command messages are deferred to the command queue and popped off
whenever more credits are aquired. The deferred queue has priority
to credits over recently posted messages.

Bug: 37733903
Test: Swap users with the real time scheduling patch applied, and
      general Bluetooth usage.
      TestTracker: 86249
Change-Id: Ib775e47f6d4810d3d7d8af5b3ba84adc4ada3da5

7 years agoLE advertise data parsing refactor
Jakub Pawlowski [Fri, 28 Apr 2017 21:59:46 +0000 (14:59 -0700)]
LE advertise data parsing refactor

* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType
* check wether AD data is properly formatted when the packet is
  received. Some controllers were returning malformed data that
  resulted in stack crashes for BT5 packets.
* add tests to verify the helpers work as expected

Test: added net_test_stack_ad_parser
Bug: 37671082
Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05

7 years agoCheck device name length am: 3a4e7622ff am: 082497f5f7
Jakub Pawlowski [Fri, 5 May 2017 09:08:51 +0000 (09:08 +0000)]
Check device name length am: 3a4e7622ff am: 082497f5f7
am: 475cac4041

Change-Id: Ie7bb842ae49fd4ece09a89104478de13146678aa

7 years agoCheck device name length am: 3a4e7622ff
Jakub Pawlowski [Fri, 5 May 2017 08:59:52 +0000 (08:59 +0000)]
Check device name length am: 3a4e7622ff
am: 082497f5f7

Change-Id: Ia320219295ff6c239e7a5e7d7d5a88cc809828ef

7 years agoCheck device name length
Jakub Pawlowski [Fri, 5 May 2017 08:51:50 +0000 (08:51 +0000)]
Check device name length
am: 3a4e7622ff

Change-Id: Ie5935fa0bb9b15c2a3caae3db43fdaebf4a83002

7 years agoCheck device name length
Jakub Pawlowski [Fri, 28 Apr 2017 12:15:16 +0000 (05:15 -0700)]
Check device name length

BT spec limits the length of device name to 248 bytes. With the new
LE advertising packets, that can go up to 1650 bytes long, we must check
the length of device name received.

Bug: 37671082
Test: manual
Change-Id: Iad309d638003c2391014c9764605d84ed5717cb1

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0 ...
Sridhar Vashist [Fri, 5 May 2017 01:26:52 +0000 (01:26 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0  -s ours am: 6c0de854a3  -s ours
am: f505a01c14  -s ours

Change-Id: Iebaa74fce96186c671bb789b7aa5f465f5ad3d83

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0 ...
Sridhar Vashist [Fri, 5 May 2017 01:23:51 +0000 (01:23 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0  -s ours am: 6c0de854a3  -s ours
am: 4311275640  -s ours

Change-Id: I432a3be6d12b09cdb9359f75e55868d6396e80fd

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0 ...
Sridhar Vashist [Fri, 5 May 2017 01:21:52 +0000 (01:21 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0  -s ours
am: 6c0de854a3  -s ours

Change-Id: I1461d75a0cdf2fb5a209b094df02830092c05141

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0 ...
Sridhar Vashist [Fri, 5 May 2017 01:21:51 +0000 (01:21 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am: 7d3de37da0  -s ours
am: 6c0de854a3  -s ours

Change-Id: Iaba991df9e9a60f45ef12b4b03a0b6e555b40a33

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
Sridhar Vashist [Fri, 5 May 2017 01:17:20 +0000 (01:17 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
am: 7d3de37da0  -s ours

Change-Id: I90f535c99d45ebf0def0b2b08031a21f998c1c2e

7 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
Sridhar Vashist [Fri, 28 Oct 2016 18:37:49 +0000 (13:37 -0500)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.

3DH packets have a lower tolerance to background noise. A2DP requiring higher
bandwidth & realtime playback is especially suscepitble in this scenario.

Bug: 37515006
Test: oem manual
Change-Id: Id4d7452a86fe864eceb88a9fb16a40dc921a1e13

7 years agoMerge "Limit btsnoop file size (5/9)" into oc-dev
Ajay Panicker [Thu, 4 May 2017 23:34:27 +0000 (23:34 +0000)]
Merge "Limit btsnoop file size (5/9)" into oc-dev
am: a46530704f  -s ours

Change-Id: I1408f63c75a01e4de60487499abc14d1c9c4cc6f

7 years agoLimit btsnoop file size (5/9)
Ajay Panicker [Thu, 4 May 2017 23:23:39 +0000 (23:23 +0000)]
Limit btsnoop file size (5/9)
am: 21ae30a6e5  -s ours

Change-Id: I1dc9b52163fb2c35c3c7e06444d93619f7f98956

7 years agoMerge "Limit btsnoop file size (5/9)" into oc-dev
Ajay Panicker [Thu, 4 May 2017 22:56:16 +0000 (22:56 +0000)]
Merge "Limit btsnoop file size (5/9)" into oc-dev

7 years agoMerge "Add supervision timeout workaround for Nexus Remote" into oc-dev
Jakub Pawlowski [Thu, 4 May 2017 20:27:01 +0000 (20:27 +0000)]
Merge "Add supervision timeout workaround for Nexus Remote" into oc-dev
am: 51e56f54c4

Change-Id: I1b9b2bb3974561f2920007d09b4bf43ebefebd1d

7 years agoMerge "Add supervision timeout workaround for Nexus Remote" into oc-dev
Jakub Pawlowski [Thu, 4 May 2017 20:22:57 +0000 (20:22 +0000)]
Merge "Add supervision timeout workaround for Nexus Remote" into oc-dev

7 years agoRemove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
Pavlin Radoslavov [Thu, 4 May 2017 20:21:00 +0000 (20:21 +0000)]
Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
am: d7809b1a8c

Change-Id: I90b107263feab693df2456be83d1c0517f321cb5

7 years agoMerge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability" am: d861719531...
Pavlin Radoslavov [Thu, 4 May 2017 18:40:13 +0000 (18:40 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability" am: d861719531 am: d4ff605732
am: f096faed1a

Change-Id: Icc28a63acfd837a7b516d1e4a987db123a8f734e

7 years agoMerge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability" am: d861719531
Pavlin Radoslavov [Thu, 4 May 2017 18:32:54 +0000 (18:32 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability" am: d861719531
am: d4ff605732

Change-Id: Iac92fa917a98cdf8e3c358d7386b4b27a688f98b

7 years agoMerge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"
Pavlin Radoslavov [Thu, 4 May 2017 18:27:24 +0000 (18:27 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"
am: d861719531

Change-Id: Iee78e052c01a772f30c6dcf19a9bf97036751f5c

7 years agoMerge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"
Treehugger Robot [Thu, 4 May 2017 18:23:50 +0000 (18:23 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"

7 years agoAdd supervision timeout workaround for Nexus Remote
Jakub Pawlowski [Tue, 28 Mar 2017 19:58:34 +0000 (12:58 -0700)]
Add supervision timeout workaround for Nexus Remote

The Nexus Remote would report 100ms supervision timeout in its preferred
connection parameters. In some noisy environments, this might cause
connection to be dropped. As a workaround, set the timeout to 3s for the
remote.

Test: manual
Bug: 36645397
Bug: 37717216
Change-Id: I665a854e9d55067ec1aca273c31d06c6114c48be
(cherry picked from commit 9e6747537a4a2c0143c26ab31e4597a017372e5f)

7 years agoRemove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
Pavlin Radoslavov [Thu, 4 May 2017 05:48:28 +0000 (22:48 -0700)]
Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability

The A2DP AAC Source capabilty should not include 96.0 and 88.2 kHz
sample rate - those were included unintentionally without being tested.

Bug: 37968743
Test: A2DP AAC streaming
Change-Id: Ia3228d4d14d3288acfda42fbaf8ab248ae530b48
(cherry picked from commit 4b93aeb450c4e42a80d8519528dc8fcfacc1d964)

7 years agoAdd supervision timeout workaround for Nexus Remote am: 9e6747537a am: ce0e5306db
Jakub Pawlowski [Thu, 4 May 2017 16:56:16 +0000 (16:56 +0000)]
Add supervision timeout workaround for Nexus Remote am: 9e6747537a am: ce0e5306db
am: a8ed61342e

Change-Id: I674832a273689570ef727fecd35da0b1ed0b7b8c

7 years agoAdd supervision timeout workaround for Nexus Remote am: 9e6747537a
Jakub Pawlowski [Thu, 4 May 2017 16:52:44 +0000 (16:52 +0000)]
Add supervision timeout workaround for Nexus Remote am: 9e6747537a
am: ce0e5306db

Change-Id: Ia97abb523bd9e4b60a844440f75770f55f555517

7 years agoAdd supervision timeout workaround for Nexus Remote
Jakub Pawlowski [Thu, 4 May 2017 16:49:44 +0000 (16:49 +0000)]
Add supervision timeout workaround for Nexus Remote
am: 9e6747537a

Change-Id: I89970cc9eaf72cbbbae294dc1a6816b612ed7579

7 years agoAdd supervision timeout workaround for Nexus Remote
Jakub Pawlowski [Tue, 28 Mar 2017 19:58:34 +0000 (12:58 -0700)]
Add supervision timeout workaround for Nexus Remote

The Nexus Remote would report 100ms supervision timeout in its preferred
connection parameters. In some noisy environments, this might cause
connection to be dropped. As a workaround, set the timeout to 3s for the
remote.

Test: manual
Bug: 36645397
Bug: 37717216
Change-Id: I665a854e9d55067ec1aca273c31d06c6114c48be

7 years agoRemove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
Pavlin Radoslavov [Thu, 4 May 2017 05:48:28 +0000 (22:48 -0700)]
Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability

The A2DP AAC Source capabilty should not include 96.0 and 88.2 kHz
sample rate - those were included unintentionally without being tested.

Bug: 37968743
Test: A2DP AAC streaming
Change-Id: Ia3228d4d14d3288acfda42fbaf8ab248ae530b48

7 years agoRevert "Revert "Make Bluetooth audio threads use RT scheduling""
Philip Cuadra [Wed, 3 May 2017 04:00:02 +0000 (21:00 -0700)]
Revert "Revert "Make Bluetooth audio threads use RT scheduling""

This reverts commit feb2d84f4b69392b5f37ae1ec9d53ac728514275.

Bluetooth threads that are used in audio have deadline
requirements for glitchless playback.  Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.

Bug 37518404

Test:  play Bluetooth audio, check for RT with systrace
(cherry picked from commit 96c42e70f5c6a74a737739aa9c297cd93540f43e)

7 years agoaudio_a2dp_hw: fix fd leak on open am: 2ae1ddbb73 am: f77c756a93
Andy Hung [Wed, 3 May 2017 01:52:09 +0000 (01:52 +0000)]
audio_a2dp_hw: fix fd leak on open am: 2ae1ddbb73 am: f77c756a93
am: 3dfb29aada

Change-Id: I919a8e9247c68710dd73b28ebe81c3e7aee54ccb

7 years agoaudio_a2dp_hw: fix fd leak on open am: 2ae1ddbb73
Andy Hung [Wed, 3 May 2017 01:47:10 +0000 (01:47 +0000)]
audio_a2dp_hw: fix fd leak on open am: 2ae1ddbb73
am: f77c756a93

Change-Id: I34e607c7c9a161c470992f281d4106f6c1eee0e8

7 years agoaudio_a2dp_hw: fix fd leak on open
Andy Hung [Wed, 3 May 2017 01:44:11 +0000 (01:44 +0000)]
audio_a2dp_hw: fix fd leak on open
am: 2ae1ddbb73

Change-Id: Ieed84c659c4b10d126ab31cf0d2fe1ad15083e27

7 years agoaudio_a2dp_hw: fix fd leak on open
Andy Hung [Wed, 3 May 2017 01:41:39 +0000 (01:41 +0000)]
audio_a2dp_hw: fix fd leak on open
am: f95d27bae9

Change-Id: I9a02980a141f132125ff12ad7dc8dec49c17da30

7 years agoaudio_a2dp_hw: fix fd leak on open
Andy Hung [Mon, 1 May 2017 22:04:57 +0000 (15:04 -0700)]
audio_a2dp_hw: fix fd leak on open

Open hal fds can be checked by

adb shell lsof | grep audio@2. | grep socket | wc

Test: connect and disconnect BT, check open fd.
Bug: 37726871

Change-Id: Id446c43515eceb0828cfb33807a4c0b4c6145a6d

7 years agoaudio_a2dp_hw: fix fd leak on open
Andy Hung [Mon, 1 May 2017 22:04:57 +0000 (15:04 -0700)]
audio_a2dp_hw: fix fd leak on open

Open hal fds can be checked by

adb shell lsof | grep audio@2. | grep socket | wc

Test: connect and disconnect BT, check open fd.
Bug: 37726871

Change-Id: Id446c43515eceb0828cfb33807a4c0b4c6145a6d
(cherry picked from commit cef156574c9928164b7a5e263a5494cf61ca39d8)

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Tue, 2 May 2017 22:24:25 +0000 (22:24 +0000)]
Do not GATT_ERROR on MTU change
am: 9e5f76c5dd

Change-Id: Ice5df1c6d256d82fc75294fc43167c2f07e30335

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Mon, 17 Apr 2017 20:38:39 +0000 (13:38 -0700)]
Do not GATT_ERROR on MTU change

Bug: 37305498
Test: manual on MSM8909
Change-Id: I07389620efc914d0ece52262edc2c35b498d5564
(cherry picked from commit f271c9109e5608acb393c9bef0bca9d2b0177f5d)

7 years agoMerge "Move ad2p back to system." into oc-dev
Steven Moreland [Sat, 29 Apr 2017 21:13:46 +0000 (21:13 +0000)]
Merge "Move ad2p back to system." into oc-dev
am: 3c05eb1b99

Change-Id: I657ad3827e7b2cc002c2affc906007ac620ce8a9

7 years agoMerge "Move ad2p back to system." into oc-dev
TreeHugger Robot [Sat, 29 Apr 2017 21:06:54 +0000 (21:06 +0000)]
Merge "Move ad2p back to system." into oc-dev

7 years agoMerge "Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into...
Android Build Merger (Role) [Sat, 29 Apr 2017 03:57:38 +0000 (03:57 +0000)]
Merge "Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours am: f67b6bfa1b  -s ours am: 805626f046  -s ours" into oc-dev-plus-aosp

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f...
Jacky Cheung [Sat, 29 Apr 2017 03:57:29 +0000 (03:57 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours am: f67b6bfa1b  -s ours
am: 102f2e3d05  -s ours

Change-Id: I2d7a36399faaf4801b5be7d2c73c57af253c076c

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f...
Jacky Cheung [Sat, 29 Apr 2017 03:57:29 +0000 (03:57 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours am: f67b6bfa1b  -s ours
am: 805626f046  -s ours

Change-Id: I11de1a247e4ed8a1518fdba054fd1bfd6ddeec44

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f...
Jacky Cheung [Sat, 29 Apr 2017 03:55:00 +0000 (03:55 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours
am: f67b6bfa1b  -s ours

Change-Id: I94a81ea270037bd5fc7420a52819421125fc5b5b

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f...
Jacky Cheung [Sat, 29 Apr 2017 03:54:59 +0000 (03:54 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am: b055f8b68a  -s ours
am: f67b6bfa1b  -s ours

Change-Id: I292355f59b73a0c7d4347f69fa5f8911a6a98d6c

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
Jacky Cheung [Sat, 29 Apr 2017 03:52:59 +0000 (03:52 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
am: b055f8b68a  -s ours

Change-Id: I7b31a9bb0a09d3e7bbb2b666331f4ac47a93efff

7 years agoMerge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
Jacky Cheung [Sat, 29 Apr 2017 03:48:18 +0000 (03:48 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev

7 years agoDO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing
Jakub Pawlowski [Thu, 27 Apr 2017 11:52:34 +0000 (04:52 -0700)]
DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing

When a device connect to android over LE, the default policy is to keep
this connection. If any app "claims" this connnection, and then stop
using it, we'll disconnect from the device after a short timeout.

If pairing is triggered to such device, that is connected but not used
by any app, it will cause disconnect after the pairing is finished. This
is because using SMP over fixed LE L2CAP channel is conseidered as
connecting, using, and disconnecting a channel by the stack. This is
obvious logic error - using fixed channels should not require
"connecting" to them.

As a temporary workaround, do not trigger a timeout when a fixed SMP
channel is closed over LE.

For LE only devices, this means they will stay connected after the
pairing until some app starts using them or they disconnect. For dual
mode devices, Classic connection will be established and SDP will be
performed. The classic connection will be disconnected if no app will
use it, and the LE connection to the device will stay up.

Bug: 37352720
Test: manual
Change-Id: Ic9d688aacf84e0267277b12b28dfa7cc57fdcea6
(cherry picked from commit 7c8bab231328956d3b7569280cb162be4e345422)

7 years agoMove ad2p back to system.
Steven Moreland [Thu, 27 Apr 2017 21:14:35 +0000 (14:14 -0700)]
Move ad2p back to system.

Test: built to vendor
Fixes: 37681782
Change-Id: I08542090d6b371e3c6de2e65d5c68d0f14c76737

7 years agoMerge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev
Philip Cuadra [Fri, 28 Apr 2017 02:11:21 +0000 (02:11 +0000)]
Merge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev
am: 59a2185c20

Change-Id: Ifd798d2d5270e797b1542867c5ae184946bf89ab

7 years agoMerge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev
Philip Cuadra [Fri, 28 Apr 2017 01:31:47 +0000 (01:31 +0000)]
Merge "Revert "Make Bluetooth audio threads use RT scheduling"" into oc-dev

7 years agoRevert "Make Bluetooth audio threads use RT scheduling"
Philip Cuadra [Fri, 28 Apr 2017 01:27:09 +0000 (01:27 +0000)]
Revert "Make Bluetooth audio threads use RT scheduling"

This reverts commit eaa42774f393eb3ccaee91a958e8df6a8fb09b91.

http://b/37733903
Test:  confirmed switching users does not hang.

Change-Id: Ic54e4ed2dda057e681df225a37a574c221cd8fc3

7 years agoMerge changes from topic 'bt5-cherry-pickerry-3' into oc-dev
Jakub Pawlowski [Fri, 28 Apr 2017 00:36:58 +0000 (00:36 +0000)]
Merge changes from topic 'bt5-cherry-pickerry-3' into oc-dev
am: 88342fb56e

Change-Id: Ic822b70a63867ae579e770c5cc39f56ffd26684f

7 years agoHandle remote not supporting LL_SLAVE_FEATURE_REQ
Jakub Pawlowski [Fri, 28 Apr 2017 00:36:54 +0000 (00:36 +0000)]
Handle remote not supporting LL_SLAVE_FEATURE_REQ
am: 3928d8e3ed

Change-Id: I567b879fc21065450f3955015189de8580cd3801

7 years agoExpose LE advertiser address for easier PTS tests (4/6)
Jakub Pawlowski [Fri, 28 Apr 2017 00:36:49 +0000 (00:36 +0000)]
Expose LE advertiser address for easier PTS tests (4/6)
am: e90b45e001

Change-Id: I7ff46ed6a5f3d9d5aba5108a5b0237c26e9a5655

7 years agoRead by UUID for PTS tests (4/5)
Jakub Pawlowski [Fri, 28 Apr 2017 00:36:43 +0000 (00:36 +0000)]
Read by UUID for PTS tests (4/5)
am: 76f2c8678e

Change-Id: I0d0c3c384d3ba192163bc1f5b8d6d2873e311f36

7 years agoPrevent buffer overflow caused by decrementing past zero am: 882db61b73 am: 6f883c5320
Ajay Panicker [Fri, 28 Apr 2017 00:24:41 +0000 (00:24 +0000)]
Prevent buffer overflow caused by decrementing past zero am: 882db61b73 am: 6f883c5320
am: 5089842163

Change-Id: I6b8392911a01dcb9df98a8a2a90c23857d1c25e8

7 years agoPrevent buffer overflow caused by decrementing past zero am: 882db61b73
Ajay Panicker [Fri, 28 Apr 2017 00:23:09 +0000 (00:23 +0000)]
Prevent buffer overflow caused by decrementing past zero am: 882db61b73
am: 6f883c5320

Change-Id: Ic006fece7c772d161da349904a299f9d53e06e95

7 years agoPrevent buffer overflow caused by decrementing past zero
Ajay Panicker [Fri, 28 Apr 2017 00:20:40 +0000 (00:20 +0000)]
Prevent buffer overflow caused by decrementing past zero
am: 882db61b73

Change-Id: I1de124b2baf7dd3c691df95680c20600680841c0

7 years agoFix issue with BLE advertising not started when local privacy is not enabled
Jacky Cheung [Fri, 28 Apr 2017 00:08:12 +0000 (00:08 +0000)]
Fix issue with BLE advertising not started when local privacy is not enabled
am: 72d2bbee15

Change-Id: Ifb666a393733e5f5f9a6a588442e3d8389da2181

7 years agoMerge changes from topic 'bt5-cherry-pickerry-3' into oc-dev
Jakub Pawlowski [Thu, 27 Apr 2017 22:20:37 +0000 (22:20 +0000)]
Merge changes from topic 'bt5-cherry-pickerry-3' into oc-dev

* changes:
  Fix LE disconnecting right after pairing
  Handle remote not supporting LL_SLAVE_FEATURE_REQ
  Expose LE advertiser address for easier PTS tests (4/6)
  Read by UUID for PTS tests (4/5)

7 years agoPrevent buffer overflow caused by decrementing past zero
Ajay Panicker [Tue, 13 Dec 2016 18:51:12 +0000 (10:51 -0800)]
Prevent buffer overflow caused by decrementing past zero

Bug: 33555809
Test: Sanity test with Bluetooth
Change-Id: I4c82d3c162ffdc9436f9cd8985061655a055774b

7 years agoLimit btsnoop file size (5/9)
Ajay Panicker [Tue, 18 Apr 2017 03:53:24 +0000 (20:53 -0700)]
Limit btsnoop file size (5/9)

Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Ia8741223cb31b2c20d9ef5607e9204cc3946b165
Change-Id: Ia8741223cb31b2c20d9ef5607e9204cc3946b165

7 years agoFix LE disconnecting right after pairing am: 7c8bab2313 am: 30c04f0ed5
Jakub Pawlowski [Thu, 27 Apr 2017 20:00:13 +0000 (20:00 +0000)]
Fix LE disconnecting right after pairing am: 7c8bab2313 am: 30c04f0ed5
am: 454d12a409

Change-Id: I5fe6c2155eb11ec6850ed5014f9ed9c060072cc9