OSDN Git Service

android-x86/system-bt.git
7 years agoPrint the LDAC adaptive bit rate adjustments am: 3c53aa771f
Pavlin Radoslavov [Wed, 19 Apr 2017 20:07:40 +0000 (20:07 +0000)]
Print the LDAC adaptive bit rate adjustments am: 3c53aa771f
am: 5a19bf9507

Change-Id: Idb29499870ef22fe81759b6819673adcf379557f

7 years agoPrint the LDAC adaptive bit rate adjustments
Pavlin Radoslavov [Wed, 19 Apr 2017 20:01:26 +0000 (20:01 +0000)]
Print the LDAC adaptive bit rate adjustments
am: 3c53aa771f

Change-Id: I916d0e35c90f6b4ab9cb80a9f6d9f0d65fbb4f3e

7 years agoFix line formatting per clang-format am: ce48fc7525 am: 35d372cf0d am: e2a25a1311
Pavlin Radoslavov [Wed, 19 Apr 2017 19:30:24 +0000 (19:30 +0000)]
Fix line formatting per clang-format am: ce48fc7525 am: 35d372cf0d am: e2a25a1311
am: a4629f67ef

Change-Id: Ib1f0eaaa913500af4f0ecc7ffb7cd257ffce8c4e

7 years agoFix line formatting per clang-format am: ce48fc7525 am: 35d372cf0d
Pavlin Radoslavov [Wed, 19 Apr 2017 19:24:25 +0000 (19:24 +0000)]
Fix line formatting per clang-format am: ce48fc7525 am: 35d372cf0d
am: e2a25a1311

Change-Id: I36d7c4f0f49d199dd7fe036c46e9aeaf510d4e86

7 years agoFix line formatting per clang-format am: ce48fc7525
Pavlin Radoslavov [Wed, 19 Apr 2017 19:22:55 +0000 (19:22 +0000)]
Fix line formatting per clang-format am: ce48fc7525
am: 35d372cf0d

Change-Id: I92512f68b228c4a8346212d56ca3a991ca2c439a

7 years agoFix line formatting per clang-format
Pavlin Radoslavov [Wed, 19 Apr 2017 19:20:23 +0000 (19:20 +0000)]
Fix line formatting per clang-format
am: ce48fc7525

Change-Id: I4a8916a40ca92b6baaee1199f7d568fb597d6783

7 years agoFix line formatting per clang-format
Pavlin Radoslavov [Wed, 19 Apr 2017 18:44:19 +0000 (11:44 -0700)]
Fix line formatting per clang-format

The fix is needed to resolve a merge conflict.

Test: Code compilation
Change-Id: I41cd79db1750b526fafa33e097c56a7cb46ba6af

7 years agoPrint the LDAC adaptive bit rate adjustments
Pavlin Radoslavov [Wed, 19 Apr 2017 17:50:16 +0000 (10:50 -0700)]
Print the LDAC adaptive bit rate adjustments

A2DP LDAC State:
  ...
  LDAC quality mode                                       : ABR
  LDAC transmission bitrate (Kbps)                        : 990
  LDAC saved transmit queue length                        : 0
  LDAC adaptive bit rate encode quality mode index        : 0
  LDAC adaptive bit rate adjustments                      : 4

Test: A2DP streaming to headsets that support LDAC
Bug: 37287785
Change-Id: Ife8017ca129fa9b06ea85f6029c553a52a306cc2
(cherry picked from commit a825f565504fa17d5458c57092f4c0ec0e539128)

7 years agoFix/update the computation of the total dropped packets for LDAC and AAC am: 9434886ffb
Pavlin Radoslavov [Wed, 19 Apr 2017 17:01:13 +0000 (17:01 +0000)]
Fix/update the computation of the total dropped packets for LDAC and AAC am: 9434886ffb
am: 883e33088f

Change-Id: I526e484e28a86257f48a00bbf6a7ffa20e8561e5

7 years agoFix/update the computation of the total dropped packets for LDAC and AAC
Pavlin Radoslavov [Wed, 19 Apr 2017 16:59:44 +0000 (16:59 +0000)]
Fix/update the computation of the total dropped packets for LDAC and AAC
am: 9434886ffb

Change-Id: I9b85f5327b145f45b50de5f6192f61fdbafc37c3

7 years agoManually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp...
Jakub Pawlowski [Wed, 19 Apr 2017 16:06:10 +0000 (16:06 +0000)]
Manually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp-master am: 1e79289a3d am: a93d037037
am: 49fbab06df

Change-Id: Ib479303dab79f8dbcd2cacbaf7776de1b449d883

7 years agoManually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp...
Jakub Pawlowski [Wed, 19 Apr 2017 16:04:43 +0000 (16:04 +0000)]
Manually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp-master am: 1e79289a3d
am: a93d037037

Change-Id: I6bafee58c5d1073c679e929386dfa698a58350d7

7 years agoManually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp...
Jakub Pawlowski [Wed, 19 Apr 2017 16:02:47 +0000 (16:02 +0000)]
Manually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp-master
am: 1e79289a3d

Change-Id: Id6e840155d3717eaa63d04f4f876bae78288e9a0

7 years agoManually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp...
The Android Automerger [Wed, 19 Apr 2017 15:35:44 +0000 (15:35 +0000)]
Manually merge commit '08215a3375a1e79fc9c1b2d12eba2ff26298910d' into stage-aosp-master

7 years agoFix/update the computation of the total dropped packets for LDAC and AAC
Pavlin Radoslavov [Wed, 19 Apr 2017 03:05:39 +0000 (20:05 -0700)]
Fix/update the computation of the total dropped packets for LDAC and AAC

Also:
 * Print the "LDAC transmission bitrate (Kbps)"
 * Print the "LDAC adaptive bit rate encode quality mode index"
   when the LDAC quality mode is ABR

A2DP LDAC State:
  ...
  LDAC quality mode                                       : ABR
  LDAC transmission bitrate (Kbps)                        : 990
  LDAC saved transmit queue length                        : 0
  LDAC adaptive bit rate encode quality mode index        : 0

Test: A2DP streaming to headsets that support LDAC
Bug: 37287785
Change-Id: I83b22090b087eb8a1e49d1853468b7dbbf9d9ad3
(cherry picked from commit 648ea508c95ade2d8cb8b2928c70ae123fab8334)

7 years agoRead by UUID for PTS tests (4/5)
Jakub Pawlowski [Fri, 14 Apr 2017 14:27:49 +0000 (07:27 -0700)]
Read by UUID for PTS tests (4/5)

Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: I072473c5f7b761707774efd89f8a22bfdf012135

7 years agoMerge "Read by UUID for PTS tests (4/5)"
Treehugger Robot [Wed, 19 Apr 2017 06:08:48 +0000 (06:08 +0000)]
Merge "Read by UUID for PTS tests (4/5)"

7 years agoMerge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b am: cb7f8c70b...
Hemant Gupta [Wed, 19 Apr 2017 00:53:49 +0000 (00:53 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b am: cb7f8c70b5 am: d4a2a01ec7
am: 3fb3bf6bee

Change-Id: If098c9e06fc70708c715afc9839a62823ef36e89

7 years agoMerge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b am: cb7f8c70b5
Hemant Gupta [Wed, 19 Apr 2017 00:51:52 +0000 (00:51 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b am: cb7f8c70b5
am: d4a2a01ec7

Change-Id: I6b9df5b14d770e0cc0bb179abfe581c34eec3fbd

7 years agoMerge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b
Hemant Gupta [Wed, 19 Apr 2017 00:49:49 +0000 (00:49 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working" am: d2aa2fc95b
am: cb7f8c70b5

Change-Id: I65110974cf2836bceda165e80f7318cb2e44a261

7 years agoMerge "AVRCP TG: Get Item Attribute command not working"
Hemant Gupta [Wed, 19 Apr 2017 00:48:18 +0000 (00:48 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working"
am: d2aa2fc95b

Change-Id: I674de144b19bc97c540d7f806c16cb3f29cb3f95

7 years agoMerge "AVRCP TG: Get Item Attribute command not working"
Treehugger Robot [Wed, 19 Apr 2017 00:41:26 +0000 (00:41 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working"

7 years agostack: AVRCP: add missing debug arguments am: 48a6e63aef
Hemant Gupta [Wed, 19 Apr 2017 00:40:27 +0000 (00:40 +0000)]
stack: AVRCP: add missing debug arguments am: 48a6e63aef
am: 059e4592a8

Change-Id: I42ba642dface9ede337c712d33a2261c17763b2b

7 years agostack: AVRCP: add missing debug arguments
Hemant Gupta [Wed, 19 Apr 2017 00:38:08 +0000 (00:38 +0000)]
stack: AVRCP: add missing debug arguments
am: 48a6e63aef

Change-Id: If0b180c097079265b5c96bfb2feca17da947ab3f

7 years agostack: AVRCP: add missing debug arguments am: 2dc048b0ed am: b40f1ad083 am: 3baa7f7667
Hemant Gupta [Tue, 18 Apr 2017 22:52:08 +0000 (22:52 +0000)]
stack: AVRCP: add missing debug arguments am: 2dc048b0ed am: b40f1ad083 am: 3baa7f7667
am: aa9279dabf

Change-Id: If8391be1c3bbae9b7439d3f86fffc9797e51c7d7

7 years agostack: AVRCP: add missing debug arguments
Hemant Gupta [Fri, 14 Apr 2017 06:37:37 +0000 (12:07 +0530)]
stack: AVRCP: add missing debug arguments

Fixes a crash while sending AVRCP Get Item Attribute response due to missing
function arguments.

Test: test with BMW kit, Crysler kit which trigger this bug

Bug: 37334553
Fixes: 37474772
Change-Id: Ie129e22e427896028a50e6b0ae8c2cdd151b0ea1
(cherry picked from commit 2dc048b0ed2684d8e538f0eaf67cd2b7ea79ce96)

7 years agostack: AVRCP: add missing debug arguments am: 2dc048b0ed am: b40f1ad083
Hemant Gupta [Tue, 18 Apr 2017 22:24:38 +0000 (22:24 +0000)]
stack: AVRCP: add missing debug arguments am: 2dc048b0ed am: b40f1ad083
am: 3baa7f7667

Change-Id: I7b513614a3f5b3f6abc718392494994b2d8b4d7e

7 years agostack: AVRCP: add missing debug arguments am: 2dc048b0ed
Hemant Gupta [Tue, 18 Apr 2017 22:19:35 +0000 (22:19 +0000)]
stack: AVRCP: add missing debug arguments am: 2dc048b0ed
am: b40f1ad083

Change-Id: Ifeaf62250d7d9b5ec4788c4ef7843dfa4d28da1e

7 years agostack: AVRCP: add missing debug arguments
Hemant Gupta [Tue, 18 Apr 2017 22:15:03 +0000 (22:15 +0000)]
stack: AVRCP: add missing debug arguments
am: 2dc048b0ed

Change-Id: I11e19332f16c577353f811ab87bcc384d9cdfcac

7 years agostack: AVRCP: add missing debug arguments
Hemant Gupta [Fri, 14 Apr 2017 06:37:37 +0000 (12:07 +0530)]
stack: AVRCP: add missing debug arguments

Fixes a crash while sending AVRCP Get Item Attribute response due to missing
function arguments.

Test: test with BMW kit, Crysler kit which trigger this bug

Bug: 37334553
Fixes: 37474772
Change-Id: Ie129e22e427896028a50e6b0ae8c2cdd151b0ea1

7 years agoMerge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev am...
Bailey Forrest [Tue, 18 Apr 2017 13:56:17 +0000 (13:56 +0000)]
Merge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev am: 2a0f9f8fca
am: 876b4e4b73

Change-Id: I5bcfddb9959be85697bbfc74903a02ec2e41f891

7 years agoMerge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev
Bailey Forrest [Tue, 18 Apr 2017 13:50:47 +0000 (13:50 +0000)]
Merge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev
am: 2a0f9f8fca

Change-Id: I9df8a4a703ed5c8af8f93e505a9e38cd2f513b02

7 years agoMerge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 13:42:18 +0000 (13:42 +0000)]
Merge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev

7 years agoRead by UUID for PTS tests (4/5)
Jakub Pawlowski [Fri, 14 Apr 2017 14:27:49 +0000 (07:27 -0700)]
Read by UUID for PTS tests (4/5)

Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: I072473c5f7b761707774efd89f8a22bfdf012135

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free am: 8137183ebd
Pavlin Radoslavov [Tue, 18 Apr 2017 01:44:32 +0000 (01:44 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free am: 8137183ebd
am: 13a356490f

Change-Id: Ie46ebbad5da50191974c6cadb06df0d4570ca9de

7 years agoDo not GATT_ERROR on MTU change am: f271c9109e am: 57e7660ce4 am: 016b74c9a7
Jacky Cheung [Tue, 18 Apr 2017 01:44:19 +0000 (01:44 +0000)]
Do not GATT_ERROR on MTU change am: f271c9109e am: 57e7660ce4 am: 016b74c9a7
am: b49489cd72

Change-Id: Ifd18fe15ea0709b02777ebddc3bc362b8dccd9c2

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free
Pavlin Radoslavov [Tue, 18 Apr 2017 01:26:00 +0000 (01:26 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free
am: 8137183ebd

Change-Id: I475c8bcf77e127df9e4561150e2e7b048a3f2316

7 years agoDo not GATT_ERROR on MTU change am: f271c9109e am: 57e7660ce4
Jacky Cheung [Tue, 18 Apr 2017 01:13:07 +0000 (01:13 +0000)]
Do not GATT_ERROR on MTU change am: f271c9109e am: 57e7660ce4
am: 016b74c9a7

Change-Id: Ib880f762e23729196c9da6dcc26022d3e0c9ddb7

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free
Pavlin Radoslavov [Fri, 14 Apr 2017 10:45:18 +0000 (03:45 -0700)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free

Bug: 37285767
Test: Code compilation
Change-Id: I53f759ea477079b0b6aed4bcbeefb645886263d6
(cherry picked from commit 86ae6c0200347fb5734491555be4a4d59eaabfea)

7 years agoDo not GATT_ERROR on MTU change am: f271c9109e
Jacky Cheung [Tue, 18 Apr 2017 01:08:02 +0000 (01:08 +0000)]
Do not GATT_ERROR on MTU change am: f271c9109e
am: 57e7660ce4

Change-Id: Id8f4c458340b05106a499ab2851209113b0ad084

7 years agoBTA HF_CLIENT: Always reply to +BCS am: c8f8075024
Sanket Agarwal [Tue, 18 Apr 2017 01:06:24 +0000 (01:06 +0000)]
BTA HF_CLIENT: Always reply to +BCS am: c8f8075024
am: 8f516048d2

Change-Id: Ia80be0f6cf562827ac3de864b55f4e1c77ccb058

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Tue, 18 Apr 2017 01:03:02 +0000 (01:03 +0000)]
Do not GATT_ERROR on MTU change
am: f271c9109e

Change-Id: Iab8d8d1c770b8d93fb62ff2210b55b23cd08d990

7 years agoBTA HF_CLIENT: Always reply to +BCS
Sanket Agarwal [Tue, 18 Apr 2017 00:40:52 +0000 (00:40 +0000)]
BTA HF_CLIENT: Always reply to +BCS
am: c8f8075024

Change-Id: Id46d9eebed56ce1fa30ef2d3725c8016187c8781

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

7 years agoAVRCP CT: Only call handle_rc_features if target registered
Bailey Forrest [Fri, 31 Mar 2017 04:43:28 +0000 (21:43 -0700)]
AVRCP CT: Only call handle_rc_features if target registered

If target is not registered, handle_rc_features would clear feature
flags before handle_rc_ctrl_features can use them.

Bug: b/35807779
Test: AVRCP controller track info works on iOS.
Change-Id: Iee781f2fc926a053ba9cf30089d3a49e56b94539
(cherry picked from commit 7745e29576703a84f4a6b47f13b3cec068033e28)

7 years agoFix a race condition during HCI module shutdown am: 51b86e9fa5
Pavlin Radoslavov [Mon, 17 Apr 2017 23:05:45 +0000 (23:05 +0000)]
Fix a race condition during HCI module shutdown am: 51b86e9fa5
am: b39965dd71

Change-Id: I2aeebdefa666a3e7a33db6b99b5cc9f628bb6609

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0...
Pavlin Radoslavov [Mon, 17 Apr 2017 23:05:33 +0000 (23:05 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0200 am: 804f314dcc am: fc5f89b8fb
am: 7d81ef2ce9

Change-Id: I401136b82c8e694145ddde4d511eab463b2d0478

7 years agoFix a race condition during HCI module shutdown
Pavlin Radoslavov [Mon, 17 Apr 2017 22:55:22 +0000 (22:55 +0000)]
Fix a race condition during HCI module shutdown
am: 51b86e9fa5

Change-Id: I76ab6e9b7e91fd5a98f9e2517676075996669265

7 years agoBTA HF_CLIENT: Always reply to +BCS
Sanket Agarwal [Wed, 22 Feb 2017 19:55:34 +0000 (11:55 -0800)]
BTA HF_CLIENT: Always reply to +BCS

Phones don't like when we don't reply to +BCS codec-negotiation. We were
having this behavior because not always do we want to accept a
connection request over SCO. Instead of not replying to +BCS (which is
essentially a codec negotiation) we rather refuse the SCO request when
it comes in. This creates other issues such as some phones trying to
connect SCO in an infinite loop but it still keeps interoperability with
other devices such as iPhones and Microsoft phones intact

Bug: b/35469963
Bug: b/35431871
Bug: b/35419773

Test: SCO (Phone Audio) test with iPhone, Microsoft and Nexus phones

Change-Id: I5319edcb4da9d66c6d6b3a49742248c90dee98e6
(cherry picked from commit ad372cfa3376f882046284a5655ed9c6fdf24daf)

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0...
Pavlin Radoslavov [Mon, 17 Apr 2017 22:45:26 +0000 (22:45 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0200 am: 804f314dcc
am: fc5f89b8fb

Change-Id: I88427349979009fc14110649adb1436539df9eaf

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0200
Pavlin Radoslavov [Mon, 17 Apr 2017 22:32:21 +0000 (22:32 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free am: 86ae6c0200
am: 804f314dcc

Change-Id: I2dad2cf7bdfc2d067fb1665b370917397830051a

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free
Pavlin Radoslavov [Mon, 17 Apr 2017 22:27:50 +0000 (22:27 +0000)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free
am: 86ae6c0200

Change-Id: I611bb32f00f1665707d810f7355b20ec696cb2b9

7 years agoDo not remove device security record on LMP timeout am: 4f484079fd
Andre Eisenbach [Fri, 14 Apr 2017 18:49:34 +0000 (18:49 +0000)]
Do not remove device security record on LMP timeout am: 4f484079fd
am: 329d2ff2f3

Change-Id: I8e04dffb5bfee05e45c5897cdf5f74921ccd0ea3

7 years agoFix a race condition during HCI module shutdown am: a3292051d9 am: 95ea3f7a15 am...
Pavlin Radoslavov [Fri, 14 Apr 2017 18:49:24 +0000 (18:49 +0000)]
Fix a race condition during HCI module shutdown am: a3292051d9 am: 95ea3f7a15 am: c343d03ed4
am: db48dc01fd

Change-Id: Ia5849a29e8bc84afb379ac78abd16263650d2819

7 years agoMerge "Move audio.a2dp.default to vendor" into oc-dev am: 81eba70e0d
Po-Chien Hsueh [Fri, 14 Apr 2017 18:49:13 +0000 (18:49 +0000)]
Merge "Move audio.a2dp.default to vendor" into oc-dev am: 81eba70e0d
am: 5b0dc8df58

Change-Id: I54aed97856bc57c5cf9b3971ed27f382a5c6f247

7 years agoDo not remove device security record on LMP timeout am: 1f5ec7304f am: 688e5d66e8...
Andre Eisenbach [Fri, 14 Apr 2017 18:49:02 +0000 (18:49 +0000)]
Do not remove device security record on LMP timeout am: 1f5ec7304f am: 688e5d66e8 am: 423e58a4ec
am: 8308292225

Change-Id: I2f62a80496c9e3b51e1c8524f0dea47ef80c42fb

7 years agoMerge "HFP: Disable BTRH feature" into oc-dev am: d084b7c9ac
Yoshiharu Kurita [Fri, 14 Apr 2017 18:48:51 +0000 (18:48 +0000)]
Merge "HFP: Disable BTRH feature" into oc-dev am: d084b7c9ac
am: 976b810ab8

Change-Id: I85cd334999f83c33815800c7567da81b0fd57516

7 years agoAdd support for inband ringing feature am: 9cb269c25b
Jack He [Fri, 14 Apr 2017 15:56:33 +0000 (15:56 +0000)]
Add support for inband ringing feature am: 9cb269c25b
am: 660de2a683

Change-Id: I38d448c851856254af9150ab7d68faca91e4b46f

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free
Pavlin Radoslavov [Fri, 14 Apr 2017 10:45:18 +0000 (03:45 -0700)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free

Bug: 37285767
Test: Code compilation
Change-Id: I53f759ea477079b0b6aed4bcbeefb645886263d6

7 years agoFix a race condition during HCI module shutdown
Pavlin Radoslavov [Thu, 13 Apr 2017 21:33:30 +0000 (14:33 -0700)]
Fix a race condition during HCI module shutdown

If an HCI event (e.g., incoming event) happens during
HCI module shutdown, and the processing of that event
calls update_command_response_timer() right after
"alarm_free(command_response_timer)" in the beginning
of hci_module_shut_down(), then update_command_response_timer()
will try to schedule an alarm on command_response_timer that is NULL.

Test: Enable/disable Bluetooth, added unit tests
Bug: 37241256
Change-Id: I7fd58446caedc135e906953644201f88b5df32bb
(cherry picked from commit a3292051d9c088769b0f4e46ffaf7c66b1127194)

7 years agoDo not remove device security record on LMP timeout
Andre Eisenbach [Fri, 14 Apr 2017 07:59:32 +0000 (07:59 +0000)]
Do not remove device security record on LMP timeout
am: 4f484079fd

Change-Id: If1eb044333ea61e87847ad3cae8edb493ded887e

7 years agoFix a race condition during HCI module shutdown am: a3292051d9 am: 95ea3f7a15
Pavlin Radoslavov [Fri, 14 Apr 2017 07:27:57 +0000 (07:27 +0000)]
Fix a race condition during HCI module shutdown am: a3292051d9 am: 95ea3f7a15
am: c343d03ed4

Change-Id: I9ace0008c743f8ad3de7da02e37ca0d9319a2065

7 years agoFix a race condition during HCI module shutdown am: a3292051d9
Pavlin Radoslavov [Fri, 14 Apr 2017 07:21:00 +0000 (07:21 +0000)]
Fix a race condition during HCI module shutdown am: a3292051d9
am: 95ea3f7a15

Change-Id: I29ca75b6c67266a5a2564dcce9ad3c3103d7ed71

7 years agoFix a race condition during HCI module shutdown
Pavlin Radoslavov [Fri, 14 Apr 2017 07:13:59 +0000 (07:13 +0000)]
Fix a race condition during HCI module shutdown
am: a3292051d9

Change-Id: I2116b3d5e0c992a4fbd35745ee5c9b3f14fdb1a9

7 years agoFix a race condition during HCI module shutdown
Pavlin Radoslavov [Thu, 13 Apr 2017 21:33:30 +0000 (14:33 -0700)]
Fix a race condition during HCI module shutdown

If an HCI event (e.g., incoming event) happens during
HCI module shutdown, and the processing of that event
calls update_command_response_timer() right after
"alarm_free(command_response_timer)" in the beginning
of hci_module_shut_down(), then update_command_response_timer()
will try to schedule an alarm on command_response_timer that is NULL.

Test: Enable/disable Bluetooth, added unit tests
Bug: 37241256
Change-Id: I7fd58446caedc135e906953644201f88b5df32bb

7 years agoDo not remove device security record on LMP timeout
Andre Eisenbach [Thu, 13 Apr 2017 21:49:36 +0000 (14:49 -0700)]
Do not remove device security record on LMP timeout

If an LMP timeout is encountered in the middle of authentication, the
link key is removed from the controller (but not from NVRAM). This can
result in a follow up connction triggering a LINK_KEY_MISSING reply,
which in turn can cause a remote device to initiate pairing which will
then finally remove the link key stored in NVRAM as well.

This change prevents the link key from being removed from the Bluetooth
controller in case of a timeout during link authentication.

Bug: 36798442
Test: manual
Change-Id: Ic89a16b45756e3d40b2e374c645c8f245f6ce3fc
(cherry picked from commit 1f5ec7304fc4e297f9f9868b5bd9382c2a26c8cc)

7 years agoMerge "Move audio.a2dp.default to vendor" into oc-dev
Po-Chien Hsueh [Fri, 14 Apr 2017 03:04:56 +0000 (03:04 +0000)]
Merge "Move audio.a2dp.default to vendor" into oc-dev
am: 81eba70e0d

Change-Id: I83bf5d47624f8ac4bf248ad8dce4a9b72b7e2e4f

7 years agoMerge "Move audio.a2dp.default to vendor" into oc-dev
TreeHugger Robot [Fri, 14 Apr 2017 02:45:48 +0000 (02:45 +0000)]
Merge "Move audio.a2dp.default to vendor" into oc-dev

7 years agoDo not remove device security record on LMP timeout am: 1f5ec7304f am: 688e5d66e8
Andre Eisenbach [Fri, 14 Apr 2017 00:55:34 +0000 (00:55 +0000)]
Do not remove device security record on LMP timeout am: 1f5ec7304f am: 688e5d66e8
am: 423e58a4ec

Change-Id: Ica760836df055e5c09c82d3af73592983418fa43

7 years agoDo not remove device security record on LMP timeout am: 1f5ec7304f
Andre Eisenbach [Fri, 14 Apr 2017 00:50:12 +0000 (00:50 +0000)]
Do not remove device security record on LMP timeout am: 1f5ec7304f
am: 688e5d66e8

Change-Id: Icb4aace3361dd0238ce9f68120f7442d6ea596e4

7 years agoDo not remove device security record on LMP timeout
Andre Eisenbach [Fri, 14 Apr 2017 00:44:32 +0000 (00:44 +0000)]
Do not remove device security record on LMP timeout
am: 1f5ec7304f

Change-Id: I429d8cfb4d048174764400096de655777411410c

7 years agoDo not remove device security record on LMP timeout
Andre Eisenbach [Thu, 13 Apr 2017 21:49:36 +0000 (14:49 -0700)]
Do not remove device security record on LMP timeout

If an LMP timeout is encountered in the middle of authentication, the
link key is removed from the controller (but not from NVRAM). This can
result in a follow up connction triggering a LINK_KEY_MISSING reply,
which in turn can cause a remote device to initiate pairing which will
then finally remove the link key stored in NVRAM as well.

This change prevents the link key from being removed from the Bluetooth
controller in case of a timeout during link authentication.

Bug: 36798442
Test: manual
Change-Id: Ic89a16b45756e3d40b2e374c645c8f245f6ce3fc

7 years agoMerge "HFP: Disable BTRH feature" into oc-dev
Yoshiharu Kurita [Thu, 13 Apr 2017 20:25:43 +0000 (20:25 +0000)]
Merge "HFP: Disable BTRH feature" into oc-dev
am: d084b7c9ac

Change-Id: Ib1bc691a92b1a47624321011cfd7b8a94fd6f02b

7 years agoAdd support for inband ringing feature
Jack He [Thu, 13 Apr 2017 20:08:16 +0000 (20:08 +0000)]
Add support for inband ringing feature
am: 9cb269c25b

Change-Id: Icbc6277f714e2c0c045f73b983f169d579214956

7 years agoMerge "HFP: Disable BTRH feature" into oc-dev
TreeHugger Robot [Thu, 13 Apr 2017 20:05:37 +0000 (20:05 +0000)]
Merge "HFP: Disable BTRH feature" into oc-dev

7 years agoMove audio.a2dp.default to vendor
Po-Chien Hsueh [Tue, 7 Mar 2017 02:27:21 +0000 (10:27 +0800)]
Move audio.a2dp.default to vendor

Default HAL should go to /vendor/.

Bug: 35907904
Bug: 35979581
Test: Compiled and checked install path. Verified on Sailfish with
$ lsof | grep default. MP3 playback over my BT headset.

Change-Id: I93a341cc96b8d991dea52070f633566bf71f0dc0

7 years agoAVRCP TG: Get Item Attribute command not working
Hemant Gupta [Thu, 13 Apr 2017 14:34:36 +0000 (20:04 +0530)]
AVRCP TG: Get Item Attribute command not working

Usecase:
1) Connect from carkit supporting AVRCP 1.4/1.5 CT to DUT
2) Issue get item attribute command with valid attribute list.

Expected behaviour:
Get item attribute command succeeds and returns the requested
attributes of particular item

Observed result:
Get Item attribute command fails with BAD Param Error

Root Cause:
Wrong structure from tAVRC_COMMAND was being passed to fill_attribute_id_array
which was leading to error being returned.

Fix:
Use get_attrs of type tAVRC_GET_ATTRS_CMD instead of get_elem_attrs of type
tAVRC_GET_ELEM_ATTRS_CMD when remote device requests for get item attributes.

Test: Checked that now bad param error is not returned in response for
get item attribute command from remote device.

Bug: 37302234
Change-Id: I9245f726f37ffd666d143d2232dac868a2cc3268

7 years agoHFP: Disable BTRH feature
Yoshiharu Kurita [Wed, 25 Nov 2015 09:00:30 +0000 (18:00 +0900)]
HFP: Disable BTRH feature

Fluoride does not notify application layer upon AT+BTRH, and always
sends error response (BTRH is not supported) to remote device.
That is, Fluoride does not support BTRH feature.
But BTRH is enabled by default, so OK is sent to remote device by mistake
before the error response is sent. This makes some carkits unstable.

Bug: 29587048
Test: make, PTS test

Change-Id: If1aa32291491982851ecd480c4ba8390f39a27a2
Merged-In: If1aa32291491982851ecd480c4ba8390f39a27a2
(cherry picked from commit a25ef0b60b4ca10385dac02334dc3e4e2ad23edb)

7 years agoAdd support for inband ringing feature
Jack He [Fri, 3 Feb 2017 01:42:40 +0000 (17:42 -0800)]
Add support for inband ringing feature

* Change HFP init API so that the HFP feature bit field depends on
  whether in-band ringing is supported on the device
* Feature disabled by default unless system property enables it

Bug: 19171297
Test: mm -j 40, HFP regression test, testplans/82144
Change-Id: Ib8ba28ac6e70eb23b2a2ad11c5805793911a4e43
(cherry picked from commit 7a9892c63bad8f8d93681fb74d5532a79387b60e)

7 years agoReduce the audio A2DP HAL output audio stream buffer size am: 9db04a2c01
Pavlin Radoslavov [Wed, 12 Apr 2017 19:40:13 +0000 (19:40 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size am: 9db04a2c01
am: c8c09500b6

Change-Id: Ie36718fe900a43c662ff780bd9789f4357383f67

7 years agoReduce the audio A2DP HAL output audio stream buffer size
Pavlin Radoslavov [Wed, 12 Apr 2017 19:34:28 +0000 (19:34 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size
am: 9db04a2c01

Change-Id: I9548b399ad6ca3fc156bb69453a5e668006fa725

7 years agoReduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e am: c7fe75f5...
Pavlin Radoslavov [Wed, 12 Apr 2017 02:51:26 +0000 (02:51 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e am: c7fe75f5a0 am: 320cf5cc13
am: 771803a94a

Change-Id: I9fccf1e4db3f0a6400ab01ec13f6da14c0d25279

7 years agoReduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e am: c7fe75f5a0
Pavlin Radoslavov [Wed, 12 Apr 2017 02:45:24 +0000 (02:45 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e am: c7fe75f5a0
am: 320cf5cc13

Change-Id: Iad27ceb84ef3bb6384b3531c455b6bfb2e32cd62

7 years agoReduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e
Pavlin Radoslavov [Wed, 12 Apr 2017 02:39:26 +0000 (02:39 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size am: 5e9f56940e
am: c7fe75f5a0

Change-Id: I2608003161b8d9492c044207744d127ae95549c9

7 years agoReduce the audio A2DP HAL output audio stream buffer size
Pavlin Radoslavov [Wed, 12 Apr 2017 02:34:25 +0000 (02:34 +0000)]
Reduce the audio A2DP HAL output audio stream buffer size
am: 5e9f56940e

Change-Id: Ib4af0fad802cd629f4008f52b0ec99a9ef1829e3

7 years agoReduce the audio A2DP HAL output audio stream buffer size
Pavlin Radoslavov [Wed, 5 Apr 2017 23:38:42 +0000 (16:38 -0700)]
Reduce the audio A2DP HAL output audio stream buffer size

Reduce the audio A2DP HAL output audio stream buffer size
(per constant AUDIO_STREAM_OUTPUT_BUFFER_PERIODS) from 4 to 2.
After the change, the output buffer size is double the buffer period.

Bug: 35849921
Test: A2DP streaming with various codec settings. Testplans/83305.
Change-Id: I2a15d468e748a03b481bf2117903ab06cddd02a3
(cherry picked from commit 5e9f56940e1865d16892639e4c9144a65547626e)

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 23:02:32 +0000 (23:02 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b am: e0702cd5b8  -s ours am: c918b22853
am: a104f3f382

Change-Id: Ia479e4c19db42e37eb750fe45999e328245277a7

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 23:02:19 +0000 (23:02 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b am: e0702cd5b8  -s ours am: dd6f2cc7aa
am: 814e783f2e

Change-Id: I547ba5f513d7ee9504683dfc62147cad1071e00d

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:54:06 +0000 (22:54 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b am: e0702cd5b8  -s ours
am: c918b22853

Change-Id: I4a76bea5e4936535b30146b305ccea7dc48efbcb

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:53:40 +0000 (22:53 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b am: e0702cd5b8  -s ours
am: dd6f2cc7aa

Change-Id: I7c679f003d404c4808c457c6644a26d4500d72ea

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:49:06 +0000 (22:49 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b
am: e0702cd5b8  -s ours

Change-Id: I3157998e2357ece35235b6636d9ab45bcc60ef60

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:48:40 +0000 (22:48 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1 am: 72270d976b
am: e0702cd5b8  -s ours

Change-Id: I9e26974ca9cf13f5c497ed94e11dcda4e108212f

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:38:39 +0000 (22:38 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e am: 2feb43b5b1
am: 72270d976b

Change-Id: I6dbf93e14a6c31092d2ecce2738b7680b738220c

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:33:09 +0000 (22:33 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901 am: 0ddb124e6e
am: 2feb43b5b1

Change-Id: I3d16a2939976a326ca20056b29818e2df550ee67

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:28:08 +0000 (22:28 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305 am: 7752061901
am: 0ddb124e6e

Change-Id: I61b9f5741d5fd6035fb7d472b83dc9df54eb3483

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:23:08 +0000 (22:23 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5 am: 005eb1d305
am: 7752061901

Change-Id: I1f821df2a72958ed17ce5bf8baed431a52dfb087

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:18:07 +0000 (22:18 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf am: 585e0c08f5
am: 005eb1d305

Change-Id: Ic4f826e4f963f969c360fe39c6e720c3fb013d23

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6...
Jack He [Tue, 11 Apr 2017 22:13:06 +0000 (22:13 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6 am: e6620d18cf
am: 585e0c08f5

Change-Id: If70a5f9b56845e758c2a2a3150936a72cac9f438

7 years agoCheck LE advertising data length before caching advertising records am: 1bef3546a6
Jack He [Tue, 11 Apr 2017 22:08:06 +0000 (22:08 +0000)]
Check LE advertising data length before caching advertising records am: 1bef3546a6
am: e6620d18cf

Change-Id: I412c0dd7854d7f6157e1974e285078909543bb41

7 years agoCheck LE advertising data length before caching advertising records
Jack He [Tue, 11 Apr 2017 22:03:05 +0000 (22:03 +0000)]
Check LE advertising data length before caching advertising records
am: 1bef3546a6

Change-Id: Ibbf6183833d7f00937742fa337a04569c4ef3c2f