OSDN Git Service
Zhihai Xu [Mon, 10 Mar 2014 10:25:05 +0000 (10:25 +0000)]
am
91f01220: DO NOT MERGE trouble syncing with fitbit and can\'t turn off bluetooth.
* commit '
91f012208070d71e6e9e0f38aa36e78e99f2ff4e':
DO NOT MERGE trouble syncing with fitbit and can't turn off bluetooth.
Zhihai Xu [Wed, 15 Jan 2014 01:46:26 +0000 (17:46 -0800)]
DO NOT MERGE trouble syncing with fitbit and can't turn off bluetooth.
this is to work around broadcom firmware problem to handle
unsolicited command complete event for HCI_LE_Create_Connection_Cancel
and LE connection complete event with status error code (0x2)
unknown connection identifier from bluetooth controller
the workaround is to release the HCI connection to avoid out of sync
with bluetooth controller, which cause BT can't be turned off.
bug:
11614046
Change-Id: Ia5c5ad0c6c9b1a4f03253cac8a7caaf21341c88c
Andre Eisenbach [Sat, 8 Mar 2014 06:24:51 +0000 (06:24 +0000)]
am
b74fe9e2: DO NOT MERGE LE: Add service UUIDs and data to advertising data
* commit '
b74fe9e2c9fc0939f5c18282c985622f20b78d2a':
DO NOT MERGE LE: Add service UUIDs and data to advertising data
Andre Eisenbach [Fri, 8 Nov 2013 18:23:52 +0000 (10:23 -0800)]
DO NOT MERGE LE: Add service UUIDs and data to advertising data
Add support for UUIDs and custom service data in the advertising and
scan response records.
Cherry picking ble advertising changes from master to KLP MR2.
b/
13137996
Change-Id: I6470427ad194871488cc90f3ab384b9ecf326b15
Matthew Xie [Tue, 11 Feb 2014 22:54:03 +0000 (22:54 +0000)]
Merge "Don't leak process-private data on Change Local Name command."
Sharvil Nanavati [Mon, 10 Feb 2014 06:21:48 +0000 (22:21 -0800)]
Don't leak process-private data on Change Local Name command.
The Change Local Name command to the controller doesn't zero out
the contents of the command buffer before setting the contents. As
a result, the controller sees both the new device name and then
random data left over on the heap from previous operations. This
random data may contain sensitive information. Although the device
name is null-terminated, a controller may inadvertently leak the
additional information over the network.
This change fixes the behaviour by zeroing out the entire command
buffer before copying the device name into it. If the device name
doesn't occupy the entire buffer, the rest of it will be zero.
http://b/
12949068
Change-Id: I4dd6ce6dd6709589fcd1e23f974db820820bc8e1
Elliott Hughes [Fri, 7 Feb 2014 22:29:57 +0000 (22:29 +0000)]
Merge "Accept takes a socklen_t, not an int."
Elliott Hughes [Fri, 7 Feb 2014 20:23:05 +0000 (12:23 -0800)]
Accept takes a socklen_t, not an int.
Change-Id: I0e89aae4a560c3ed9821cbb4432f56e25f3d1c94
Matthew Xie [Tue, 28 Jan 2014 20:27:06 +0000 (20:27 +0000)]
Merge "Fix calls to pthread_setschedparam."
Colin Cross [Tue, 28 Jan 2014 00:47:42 +0000 (00:47 +0000)]
Merge "external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH"
Colin Cross [Sat, 25 Jan 2014 05:00:32 +0000 (21:00 -0800)]
external/bluetooth/bluedroid: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it
with LOCAL_MODULE_RELATIVE_PATH.
Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
Sharvil Nanavati [Wed, 22 Jan 2014 08:04:45 +0000 (00:04 -0800)]
Fix calls to pthread_setschedparam.
When the scheduling priority is set to SCHED_NORMAL, you may not
specify a non-zero priority. The current implementation does
exactly that resulting in the call failing and returning EINVAL.
This change ensures that a priority of 0 is set when the desired
scheduler policy is set to SCHED_NORMAL.
http://b/
12304174
Change-Id: I945cae175b7bdd29dd8fc130ff6396b88ec33fcb
Matthew Xie [Tue, 12 Nov 2013 03:01:23 +0000 (19:01 -0800)]
am
46ebeb1d: Merge "LE: Increase number of simultaneous connections" into klp-dev
* commit '
46ebeb1d5f2536445590d142f01247de4e24893c':
LE: Increase number of simultaneous connections
Matthew Xie [Tue, 12 Nov 2013 02:56:19 +0000 (02:56 +0000)]
Merge "LE: Increase number of simultaneous connections" into klp-dev
Andre Eisenbach [Fri, 1 Nov 2013 21:47:52 +0000 (14:47 -0700)]
LE: Increase number of simultaneous connections
Currently the maximum number of parallel connections is 4. This patch
increases the limit to allow for more devices.
bug
11571899
Change-Id: I42b77e6b67f59d7d430d879a5fb0eb80982160b5
Zhihai Xu [Mon, 11 Nov 2013 23:09:29 +0000 (15:09 -0800)]
am
72658f48: BLE is disconnected due to BLE service record discovery failure.
* commit '
72658f48d653be0786ef924bb3abbf7df1ec6592':
BLE is disconnected due to BLE service record discovery failure.
Zhihai Xu [Mon, 11 Nov 2013 01:25:45 +0000 (17:25 -0800)]
BLE is disconnected due to BLE service record discovery failure.
the root cause of the problem is:
In BLE GATT client state machine, When It is in discovery state,
any command to access the service, characteristic and descriptor
will be queued, these commands will be executed after BLE service
discovery complete. When we queue the command, we will copy these
message. The problem is we didn't copy these message correctly.
We didn't deep copy these messages. There are pointers inside
these messages. These pointers are still point to the old message
which are already freed. When the messages are reused, the original
content will lost. The queued commands will be corrupted.
This is very serious issue, which can cause a lot of stability problem.
bug:
11620252
Change-Id: I93082a9dbcc3a676f5f791c2b1ea98e49b165813
Matthew Xie [Fri, 8 Nov 2013 19:35:20 +0000 (11:35 -0800)]
am
dbba0e65: Replace Broadcom proprietary license header with apache 2 header
* commit '
dbba0e652e0ce23dd691df3c03979ec6e32c8db3':
Replace Broadcom proprietary license header with apache 2 header
Matthew Xie [Fri, 8 Nov 2013 18:13:21 +0000 (10:13 -0800)]
Replace Broadcom proprietary license header with apache 2 header
bug
11591406
Change-Id: Ibb9c6b3865e6d757236f1c5896775bb6f28e47be
Matthew Xie [Thu, 7 Nov 2013 19:12:13 +0000 (11:12 -0800)]
am
04e05e9a: Merge "LE: Add devices to the inquiry db before connecting" into klp-dev
* commit '
04e05e9a39cbed22a099458c35207795a0039043':
LE: Add devices to the inquiry db before connecting
Matthew Xie [Thu, 7 Nov 2013 19:06:39 +0000 (19:06 +0000)]
Merge "LE: Add devices to the inquiry db before connecting" into klp-dev
Zhihai Xu [Thu, 7 Nov 2013 19:05:40 +0000 (11:05 -0800)]
am
dfd036d9: Merge "fix a memory leakage when Queue search or discovery event." into klp-dev
* commit '
dfd036d96a745af198a532748a600d0c4d6ab1f4':
fix a memory leakage when Queue search or discovery event.
Zhihai Xu [Thu, 7 Nov 2013 19:00:17 +0000 (19:00 +0000)]
Merge "fix a memory leakage when Queue search or discovery event." into klp-dev
Andre Eisenbach [Thu, 7 Nov 2013 07:35:48 +0000 (23:35 -0800)]
LE: Add devices to the inquiry db before connecting
Ensure that the remote device type is set correctly by reading the
device information from non-volatile storage and (re-)adding it to
the inquiry database before connecting to a remote GATT device.
bug
11573208
Change-Id: Ifa69da3d5871aed5293ea5e611144874b67afe72
Zhihai Xu [Thu, 7 Nov 2013 03:23:13 +0000 (19:23 -0800)]
fix a memory leakage when Queue search or discovery event.
bug:
11562902
Change-Id: I16ba8cfb727d05e5d324c6301ba0ab23e729232b
Zhihai Xu [Thu, 7 Nov 2013 03:11:57 +0000 (19:11 -0800)]
am
c04aadc3: Merge "Fixes random host disconnection after establishing connection" into klp-dev
* commit '
c04aadc3d5925fa499aa0449f4e94a04308480ea':
Fixes random host disconnection after establishing connection
Zhihai Xu [Thu, 7 Nov 2013 03:06:33 +0000 (03:06 +0000)]
Merge "Fixes random host disconnection after establishing connection" into klp-dev
Sunny Kapdi [Wed, 7 Aug 2013 19:30:20 +0000 (12:30 -0700)]
Fixes random host disconnection after establishing connection
Host starts encryption twice when the remote device is
already paired. The host sends disconnect when the
second encryption attempt returns failure. This fix
avoids duplicate encryption attempt.
bug:
11450719
Change-Id: I8ec5c4a953180ec17585aece757810421bc44aae
Matthew Xie [Thu, 7 Nov 2013 00:11:44 +0000 (16:11 -0800)]
am
6088d83d: Merge "whitelist well tested devices for absolute volume feature" into klp-dev
* commit '
6088d83d6ce30275b15fd0e5955a83f709f03172':
whitelist well tested devices for absolute volume feature
Matthew Xie [Thu, 7 Nov 2013 00:05:25 +0000 (00:05 +0000)]
Merge "whitelist well tested devices for absolute volume feature" into klp-dev
Matthew Xie [Wed, 6 Nov 2013 01:19:39 +0000 (17:19 -0800)]
whitelist well tested devices for absolute volume feature
We are blacklisting all the devices that are not in whitelist
instead of blacklisting known bad devices.
bug
11124170
Change-Id: I044970df611d2a800d7698d4a63331644ab107ce
Zhihai Xu [Wed, 6 Nov 2013 06:58:02 +0000 (22:58 -0800)]
am
29fdb17a: Merge "need to save the BLE HID UUID to NVRAM" into klp-dev
* commit '
29fdb17a232f45c5550e7fa8d773f87e06ac58f1':
need to save the BLE HID UUID to NVRAM
Zhihai Xu [Wed, 6 Nov 2013 06:54:58 +0000 (06:54 +0000)]
Merge "need to save the BLE HID UUID to NVRAM" into klp-dev
Zhihai Xu [Wed, 6 Nov 2013 02:06:54 +0000 (18:06 -0800)]
need to save the BLE HID UUID to NVRAM
need to save the BLE HID UUID to NVRAM.
otherwise we will miss the HID profile setting
in device profile list of the BLE HID device after reboot.
bug:
11541617
Change-Id: I11e1c871768e999ec1f48396018c3be379cc1b7d
Matthew Xie [Wed, 6 Nov 2013 02:02:49 +0000 (18:02 -0800)]
am
8fb6973d: Merge "Add toyota venza to the auto pair blacklist" into klp-dev
* commit '
8fb6973d0988a91f7debfddd7dfb79a730138f52':
Add toyota venza to the auto pair blacklist
Matthew Xie [Wed, 6 Nov 2013 01:25:24 +0000 (01:25 +0000)]
Merge "Add toyota venza to the auto pair blacklist" into klp-dev
Matthew Xie [Tue, 5 Nov 2013 05:55:07 +0000 (21:55 -0800)]
am
e38180dc: Merge "Bluetooth: Send Error for Invalid AT Command." into klp-dev
* commit '
e38180dc7880e5aea76637138661d54bcd9cf875':
Bluetooth: Send Error for Invalid AT Command.
Zhihai Xu [Tue, 5 Nov 2013 05:53:53 +0000 (21:53 -0800)]
am
2003ec03: Merge "A typo to set wrong max connection interval value when we create a BLE connection." into klp-dev
* commit '
2003ec03dbf7c82cdb655fa64746397a1e775cc0':
A typo to set wrong max connection interval value when we create a BLE connection.
Zhihai Xu [Tue, 5 Nov 2013 05:53:20 +0000 (21:53 -0800)]
am
cd9ceb9f: Merge "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on" into klp-dev
* commit '
cd9ceb9f48d633b68570e5f70768475c8fe93af1':
Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on
Sunny Kapdi [Tue, 5 Nov 2013 05:53:19 +0000 (21:53 -0800)]
am
7a5c5910: Fixes BLE HCI commands concurrency issue
* commit '
7a5c5910c1df73ab86e57d18c4e6e35a623d98ce':
Fixes BLE HCI commands concurrency issue
Matthew Xie [Mon, 4 Nov 2013 22:11:14 +0000 (22:11 +0000)]
Merge "Bluetooth: Send Error for Invalid AT Command." into klp-dev
Zhihai Xu [Sun, 3 Nov 2013 03:42:28 +0000 (03:42 +0000)]
Merge "A typo to set wrong max connection interval value when we create a BLE connection." into klp-dev
Sunny Kapdi [Mon, 29 Jul 2013 05:29:37 +0000 (10:59 +0530)]
Bluetooth: Send Error for Invalid AT Command.
Some Headsets send HFP 1.6 cmds even when it is not
supported by DUT.Send error response in those cases.
bug
11450717
Change-Id: If7745959c00fd49bd737b41a49adba9e726aa5c7
Zhihai Xu [Sat, 2 Nov 2013 00:09:49 +0000 (00:09 +0000)]
Merge "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on" into klp-dev
Zhihai Xu [Fri, 25 Oct 2013 23:47:49 +0000 (16:47 -0700)]
A typo to set wrong max connection interval value when we create a BLE connection.
when we set the max connection interval value,
we should use BTM_BLE_CONN_INT_MAX_DEF instead of BTM_BLE_CONN_INT_MIN
bug:
11390678
Change-Id: Ia3f6d5e9cb91b2e998d014ed4849eff8455af770
Sunny Kapdi [Wed, 14 Aug 2013 02:43:49 +0000 (19:43 -0700)]
Fixes BLE HCI commands concurrency issue
Removes HCI LE Read Remote features command call
to prevent the concurrency between this command and
HCI LE start encryption command.
CRs-fixed: 517330
bug:
11450568
Change-Id: I6445ab8095a4261c2a3f84acea1c546e6924f50d
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
Matthew Xie [Tue, 29 Oct 2013 22:55:49 +0000 (15:55 -0700)]
am
41e761b1: Merge "Treat devices advertising random addr. as LE only" into klp-dev
* commit '
41e761b106b50eb6bf08ae6a027bf27486b571cc':
Treat devices advertising random addr. as LE only
Matthew Xie [Tue, 29 Oct 2013 22:51:35 +0000 (22:51 +0000)]
Merge "Treat devices advertising random addr. as LE only" into klp-dev
Andre Eisenbach [Fri, 25 Oct 2013 23:17:45 +0000 (16:17 -0700)]
Treat devices advertising random addr. as LE only
Some remote devices use random addresses, but are not setting the
"BR/EDR not supported" flag. Thus we try to connect to the device using
BR/EDR.
This patch ignores the ADV flags if the device is using a random
address and always makes the connection over the LE transport.
bug
11418071
Change-Id: I628775b819abd8f17745aaf98db4bb3c59166955
Matthew Xie [Thu, 24 Oct 2013 23:18:24 +0000 (16:18 -0700)]
am
93449a36: Merge "Blacklist Devices that donot handle absolute volume well" into klp-dev
* commit '
93449a36de3b17e95f442ebd49614fa30707cbbb':
Blacklist Devices that donot handle absolute volume well
Matthew Xie [Thu, 24 Oct 2013 23:05:57 +0000 (23:05 +0000)]
Merge "Blacklist Devices that donot handle absolute volume well" into klp-dev
Matthew Xie [Thu, 24 Oct 2013 08:09:52 +0000 (01:09 -0700)]
Blacklist Devices that donot handle absolute volume well
Use vendor prefix address, include hbs730 headset, passat carkit
bug
11124170
Change-Id: I80f634366ce332c55581d7b1e36641e5ce3ad346
Zhihai Xu [Thu, 24 Oct 2013 01:33:21 +0000 (18:33 -0700)]
am
03d68523: Merge "Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT" into klp-dev
* commit '
03d685233071eb9faa390f85869775d1058a0279':
Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT
Zhihai Xu [Thu, 24 Oct 2013 01:25:32 +0000 (01:25 +0000)]
Merge "Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT" into klp-dev
Zhihai Xu [Wed, 23 Oct 2013 23:42:38 +0000 (16:42 -0700)]
am
cbd63326: Merge "LE: Only prepend valid HID report IDs" into klp-dev
* commit '
cbd63326930172f8b336a6e56f10eb8cfc9e8646':
LE: Only prepend valid HID report IDs
Zhihai Xu [Wed, 23 Oct 2013 23:33:31 +0000 (23:33 +0000)]
Merge "LE: Only prepend valid HID report IDs" into klp-dev
Zhihai Xu [Tue, 22 Oct 2013 22:26:33 +0000 (15:26 -0700)]
Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT
The root cause is bta_gattc_disable de-register the HH GATT IF
which cause bta_hh_cleanup_disable called
before we receive BTA_HH_INT_CLOSE_EVT.
The fix is "don't deregister HH GATT IF in bta_gattc_disable and
let HH module to de-register the HH GATT IF by bta_hh_le_deregister".
because HH GATT IF is a special GATT IF
which won't be exposed to uplayer and
HH GATT IF belong to BTA HH module, it should be managed by BTA HH.
bug:
11284861
Change-Id: Ia14cd2be3f3548a4d1e2dcfbc89fa3a75d9651db
Andre Eisenbach [Tue, 22 Oct 2013 14:49:45 +0000 (07:49 -0700)]
LE: Only prepend valid HID report IDs
If a remote HOGP device does not supply a valid report ID, do not
prepend it to the HID report.
This fixes interop issues with various LE mice, where the cursor would
not move on screen as expected.
BLTH02618447
Bug:
11342157
Change-Id: I7832bb091654a5625f37b1531bd80fad9bbe6a51
Matthew Xie [Sun, 20 Oct 2013 18:38:37 +0000 (11:38 -0700)]
am
926267d2: Merge "Handle CL opening state in bta_jv_free_rfc_cb" into klp-dev
* commit '
926267d2240595fdc638176a7c6aa9e532fa179f':
Handle CL opening state in bta_jv_free_rfc_cb
Matthew Xie [Sun, 20 Oct 2013 18:32:32 +0000 (18:32 +0000)]
Merge "Handle CL opening state in bta_jv_free_rfc_cb" into klp-dev
Matthew Xie [Sun, 20 Oct 2013 08:04:06 +0000 (01:04 -0700)]
Handle CL opening state in bta_jv_free_rfc_cb
When the local device is openning an rfc channel and is being closed
before it's opened, we should close the channel instead of ignoring.
bug
11299049
Change-Id: I702500d489c8b3d3764e36340106433232a127c0
Zhihai Xu [Fri, 18 Oct 2013 00:16:45 +0000 (17:16 -0700)]
am
0c2e29d5: BTU SIGSEGV on RFCOMM connect to Linux bluetooth dongle
* commit '
0c2e29d5ae7cfd154c790703886d361708b02bbc':
BTU SIGSEGV on RFCOMM connect to Linux bluetooth dongle
Zhihai Xu [Thu, 17 Oct 2013 03:00:38 +0000 (20:00 -0700)]
BTU SIGSEGV on RFCOMM connect to Linux bluetooth dongle
fix a typo which cause the crash.
bug:
11260131
Change-Id: I1cbe9f4d20be39f3ca13577687ac92b88b06e366
zzy [Sun, 13 Oct 2013 19:49:35 +0000 (12:49 -0700)]
am
031d239b: When rfcomm incoming queue is not empty, waiting for app ready to drain the data
* commit '
031d239b408618294a5980cb3933e03e185f96cf':
When rfcomm incoming queue is not empty, waiting for app ready to drain the data
zzy [Tue, 8 Oct 2013 23:54:08 +0000 (16:54 -0700)]
When rfcomm incoming queue is not empty, waiting for app ready to drain the data
Fixed the issue that rfcomm inbound packets could be out of order when host
flow control is activating.
bug
11031800
Change-Id: Idc1eb6633bb070f1ab2b33a9751fd7d714764d45
Zhihai Xu [Mon, 7 Oct 2013 22:11:22 +0000 (15:11 -0700)]
Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on
we should use the same role as the previous connection, if phone walk out of range,
and reconnect back from remote device.
bug:
10648781
Change-Id: I6abd77067d26769067ba2fbd45d9e8f75cf7c764
Matthew Xie [Thu, 10 Oct 2013 01:02:21 +0000 (18:02 -0700)]
am
65b8e0f3: Merge "Remove MMS support from MAP SDP" into klp-dev
* commit '
65b8e0f360f7fe7be001087c899eebc507115f9d':
Remove MMS support from MAP SDP
Matthew Xie [Thu, 10 Oct 2013 00:46:15 +0000 (00:46 +0000)]
Merge "Remove MMS support from MAP SDP" into klp-dev
Matthew Xie [Wed, 9 Oct 2013 23:47:45 +0000 (16:47 -0700)]
am
6b728e41: Merge "Interleave br/edr device discovery with BLE device scan for some targets" into klp-dev
* commit '
6b728e412c22549ef51c19315ccf9ab3b7e16885':
Interleave br/edr device discovery with BLE device scan for some targets
Matthew Xie [Wed, 9 Oct 2013 23:40:09 +0000 (23:40 +0000)]
Merge "Interleave br/edr device discovery with BLE device scan for some targets" into klp-dev
Matthew Xie [Mon, 30 Sep 2013 19:44:10 +0000 (12:44 -0700)]
Interleave br/edr device discovery with BLE device scan for some targets
This change only applies to targets which do not support interleaved scan
in controller.
bug
8508849
Change-Id: Ia99faf92c942b4b33abfde2708eff25ec9cd5468
zzy [Wed, 9 Oct 2013 22:24:05 +0000 (15:24 -0700)]
am
7939ed0c: added filter remove api to control the # of child node for bt_config.xml
* commit '
7939ed0c9a50c769e9e648a2d7751e0894b485ed':
added filter remove api to control the # of child node for bt_config.xml
zzy [Sat, 28 Sep 2013 00:05:37 +0000 (17:05 -0700)]
added filter remove api to control the # of child node for bt_config.xml
Bug
10949832
Change-Id: I10589b9d0a0b4b8d7cbf66122c66bb2e99be04a1
Matthew Xie [Wed, 9 Oct 2013 21:20:56 +0000 (14:20 -0700)]
Remove MMS support from MAP SDP
When we support MMS in the future. Revert this patch.
bug
10296324
Change-Id: I9d65895d6cb55b3967efcddc2c37b3f95ba3ce38
Andre Eisenbach [Tue, 8 Oct 2013 17:32:07 +0000 (10:32 -0700)]
am
ccf9c15f: LE: Improved handling of illegal GATT PDUs
* commit '
ccf9c15f52eea21858d994601d71308e84c7c859':
LE: Improved handling of illegal GATT PDUs
Andre Eisenbach [Wed, 2 Oct 2013 22:37:21 +0000 (15:37 -0700)]
LE: Improved handling of illegal GATT PDUs
Do additional length checks when handling malformed messages. These
messages are never valid, and should be dropped if seen.
Before starting to parse out PDU content, it is verified that the
buffer contains sufficient bytes and error condition is returned
if this is not the case.
Bug:
11045073
Change-Id: Ifb792d1575e0514f33e75ed73247ea638807901e
Matthew Xie [Wed, 2 Oct 2013 07:40:27 +0000 (00:40 -0700)]
Add toyota venza to the auto pair blacklist
bug
10904063
Change-Id: Ia14f00eb45ff8ba1d7df73db575aff552af7677a
Zhihai Xu [Fri, 4 Oct 2013 23:34:06 +0000 (16:34 -0700)]
am
a7a4a61c: Merge "Crash after unpairing BT keyboard" into klp-dev
* commit '
a7a4a61c943578f705062098d1677ab4a8b0d5f2':
Crash after unpairing BT keyboard
Zhihai Xu [Fri, 4 Oct 2013 23:30:20 +0000 (16:30 -0700)]
am
379743be: Failure to start playback on A2DP sink after connection
* commit '
379743beded881127703334e1dda2cd327ec651d':
Failure to start playback on A2DP sink after connection
Zhihai Xu [Fri, 4 Oct 2013 23:25:06 +0000 (23:25 +0000)]
Merge "Crash after unpairing BT keyboard" into klp-dev
Elliott Hughes [Thu, 3 Oct 2013 05:11:16 +0000 (22:11 -0700)]
am
3190d499: Merge "Fix uipc.c to never pass -1 to FD_ISSET."
* commit '
3190d499c91fb8ac3246c4a401e4764465f635a4':
Fix uipc.c to never pass -1 to FD_ISSET.
Elliott Hughes [Thu, 3 Oct 2013 05:07:21 +0000 (05:07 +0000)]
Merge "Fix uipc.c to never pass -1 to FD_ISSET."
Elliott Hughes [Thu, 3 Oct 2013 04:28:50 +0000 (21:28 -0700)]
Fix uipc.c to never pass -1 to FD_ISSET.
The behavior of FD_ISSET when passed -1 is undefined.
I checked all calls of FD_SET and FD_CLR in this file, and they all
seem to be correctly guarded. None of the FD_ISSET calls were, so I
added a SAFE_FD_ISSET macro to return false when passed -1, which is
presumably what the callers intended.
This allows Bluetooth to be enabled on a device where the C library
aborts if passed any out of range fd.
Bug:
11047121
Change-Id: I261404a5a80884d5e9edab8beb3c93969113dc76
Zhihai Xu [Sun, 29 Sep 2013 22:12:55 +0000 (15:12 -0700)]
Crash after unpairing BT keyboard
The crash is caused to access an array use invalid index value.
The solution is to check the index before access the array.
bug:
10992001
Change-Id: Iad83764de9545fb2348105cf9cd9d32a85f1d654
Zhihai Xu [Sun, 29 Sep 2013 20:42:13 +0000 (13:42 -0700)]
Failure to start playback on A2DP sink after connection
This is what happen:
after Headset is connected, we call start_audio_datapath which will send AVDTP_Start command to Headset,
Headset reject it with bad state. Bluedroid stack will ack failure to start_audio_datapath.
The next time we write audio data to bluetooth, we will call start_audio_datapath again to send AVDTP_Start command to Headset
Headset reject it with bad state again. Bluedroid stack will ack failure to start_audio_datapath.
When the third time we call start_audio_datapath, right at that time we receive AVDTP_Start command from Headset.
Handle AVDTP_Start command and Handle start_audio_datapath are in two different threads.
Handle AVDTP_Start command is in btu_task thread.
Handle start_audio_datapath() is in btif_task thread.
We have race condition in this case
Because when btif_task processed BTIF_AV_START_STREAM_REQ_EVT(triggered by start_audio_datapath),
it don't know we receive AVDTP_Start command which is processed in btu_task.
btif_task will send a message BTA_AV_API_START_EVT to btu_task, which will be handled by bta_av_do_start.
AVDTP_start command from headset is handled by bta_av_start_ok.
bta_av_start_ok will send BTA_AV_START_EVT with suspending true to btif_task and send AVDTP_Suspend command
to headset to suspend the AVDTP for reconfiguration purpose.
in bta_av_do_start, we will check whether the AVDTP is already started, we will know the AVDTP is already start at this time because
bta_av_do_start is also running in btu_task. We will send BTA_AV_START_EVT with success to btif_task.
In the btif_task, BTA_AV_START_EVT will be processed by btif_av_state_opened_handler:
For the first BTA_AV_START_EVT with suspending true sent by bta_av_start_ok, it will ignore it:
if ((p_av->start.status == BTA_SUCCESS) && (p_av->start.suspending == TRUE))
return TRUE;
For the second BTA_AV_START_EVT with success sent by bta_av_do_start , it will ack success to start_audio_datapath, and change to
BTIF_AV_STATE_STARTED/BTAV_AUDIO_STATE_STARTED, after receive success ack from bluedroid stack, we will start send Audio data to bluetooth.
At last we received AVDTP_Suspend response accept from Headset, we will send BTA_AV_SUSPEND_EVT to btif_task, which will be
handled by btif_av_state_started_handler. It will call btif_a2dp_on_suspended and call audio_state_cb with new audio state
BTAV_AUDIO_STATE_STOPPED.
so The state between bluedroid stack and audio data path is out of sync.
The fix is to send failure message if we know we suspend AVDTP in bta_av_do_start,
also make sure we won't miss acknowledgement for pending start if we exit opened state,
to avoid audio data path dead lock.
bug:
10953908
Change-Id: I1704839977324b7c4e234eb843cddf3719e10d2c
Matthew Xie [Thu, 26 Sep 2013 23:33:57 +0000 (16:33 -0700)]
am
a3c389f3: Merge "Avoid potential buffer overrun in bd2str caused by signed char"
* commit '
a3c389f35287c9b1642c6f9a35fd22ff28f47919':
Avoid potential buffer overrun in bd2str caused by signed char
Matthew Xie [Thu, 26 Sep 2013 23:28:34 +0000 (23:28 +0000)]
Merge "Avoid potential buffer overrun in bd2str caused by signed char"
Chris Dearman [Tue, 2 Jul 2013 21:13:44 +0000 (14:13 -0700)]
Avoid potential buffer overrun in bd2str caused by signed char
Use uint8_t to avoid sign extension as char's may be signed.
As a further safeguard, use snprintf()
Change-Id: Icdd4dba9b270bde41547677fa2f98bf215401a23
Matthew Xie [Wed, 18 Sep 2013 21:02:44 +0000 (14:02 -0700)]
am
a30d95ac: Increase default bluetooth name from 15 to 31.
* commit '
a30d95acf60f04531923e8ab06d976744697bf51':
Increase default bluetooth name from 15 to 31.
Matthew Xie [Wed, 18 Sep 2013 19:30:36 +0000 (12:30 -0700)]
Increase default bluetooth name from 15 to 31.
bug
7441329
Change-Id: I79d64e77f206268ace06ce0f7b16119f63655bec
Zhihai Xu [Tue, 17 Sep 2013 16:59:44 +0000 (09:59 -0700)]
am
17b504d0: native crash while skipping songs with A2DP connected
* commit '
17b504d0b0b90de00f5f0c59a3601e7b7f444730':
native crash while skipping songs with A2DP connected
Zhihai Xu [Tue, 17 Sep 2013 01:16:47 +0000 (18:16 -0700)]
native crash while skipping songs with A2DP connected
this is caused by out of bound(invalid) index, pass to AVRC_MsgReq
bug:
10787111
Change-Id: I5b06c646342d0d4e9202c6e22e1c1d67275efb43
Mattias Agren [Sat, 14 Sep 2013 04:07:07 +0000 (21:07 -0700)]
am
b8ceaa48: Set default a2dp sbc encoding quality to high
* commit '
b8ceaa484a09be14263d5f10d022a272f9602378':
Set default a2dp sbc encoding quality to high
Zhihai Xu [Sat, 14 Sep 2013 04:01:47 +0000 (21:01 -0700)]
am
003284a0: Merge "fix wrong PBAP profile SDP record which may cause some carkit interop problem." into klp-dev
* commit '
003284a0c70b60a7c959ea3bbc023e0fbda26be1':
fix wrong PBAP profile SDP record which may cause some carkit interop problem.
Mattias Agren [Fri, 5 Apr 2013 15:27:27 +0000 (17:27 +0200)]
Set default a2dp sbc encoding quality to high
* Increased bitpool to high quality setting (53). * Added rate quality
reduction to medium quality for basic rate connections * Enhanced
a2dp frame calculation ratio to smooth out frame distrubution * Removed
iop scaling patch.
Bug
8252054
Change-Id: I20725d0decfe5f820e1c03407889b6272e830aca
Zhihai Xu [Sat, 14 Sep 2013 03:59:15 +0000 (03:59 +0000)]
Merge "fix wrong PBAP profile SDP record which may cause some carkit interop problem." into klp-dev
Zhihai Xu [Sat, 14 Sep 2013 03:58:27 +0000 (20:58 -0700)]
am
307e8d05: Merge "a2dp media packet sent too slow, which cause packet overflow." into klp-dev
* commit '
307e8d05d0fc11fd07111005c379655b89b9c217':
a2dp media packet sent too slow, which cause packet overflow.
Zhihai Xu [Sat, 14 Sep 2013 03:56:22 +0000 (03:56 +0000)]
Merge "a2dp media packet sent too slow, which cause packet overflow." into klp-dev
Zhihai Xu [Sat, 14 Sep 2013 02:31:18 +0000 (19:31 -0700)]
a2dp media packet sent too slow, which cause packet overflow.
the error message: btif_media_aa_prep_2_send congestion buf count 24
The reason is we increase all bluedroid thread related TX data path priority:
media, timer, BTU and HCI_WORKER, but we didn't increase the RX data path
priority: userial_read_thread. If the RX thread is blocked, it will also
affect TX, because the HCI have flow control, we need receive HCI Number of
Completed Packets Events to continue send packet to the controller.
If we HCI complete Packets Event packets is blocked, the HCI flow control
will block the HCI packet trnasmission until we get HCI complete packets
event to know how many buffer is available in the controller.
I tested with a chrysler CIP/VP4 carkit which show this error message,
After I apply this fix, I can't reproduce this problem any more.
This look like good fix for this issue.
bug:
8252054
Change-Id: Ic78b9abb69648c50aa63e2b3c8b90038018fb6b5
Zhihai Xu [Sat, 14 Sep 2013 00:38:49 +0000 (17:38 -0700)]
fix wrong PBAP profile SDP record which may cause some carkit interop problem.
bug:
10488422
Change-Id: I8fb4a73a631c84dc812f44593743905f2d2ad108