OSDN Git Service
Sharvil Nanavati [Thu, 24 Jul 2014 21:24:27 +0000 (14:24 -0700)]
Expose thread's reactor so we can register new fds with it.
This change allows a thread's reactor loop to manage additional
file descriptors, e.g. sockets and queues, entirely within that
thread's context.
Chris Manton [Thu, 31 Jul 2014 16:22:09 +0000 (09:22 -0700)]
hci: Renaming of callback functions
Changing name to conform to *_cb convention already
in place. Further, current names will be re-used
for osi buffer resource management.
Sharvil Nanavati [Fri, 25 Jul 2014 22:09:51 +0000 (15:09 -0700)]
hash_map header uses standard integral types so it must include stdint.h.
Sharvil Nanavati [Fri, 25 Jul 2014 22:12:36 +0000 (15:12 -0700)]
Wake up reactor whenever a new object is registered/unregistered.
Before this change, if the reactor was blocked waiting for an event
and a new object was registered, it would not wait for events on the
new object until it woke up on its own. This change forces the reactor
to re-evaluate the file descriptor set whenever the object list is
modified.
Sharvil Nanavati [Fri, 25 Jul 2014 22:50:17 +0000 (15:50 -0700)]
Introduce a socket class
This socket implementation is limited to TCP server sockets and
provides no mechanism to connect to a remote host. It's primarily
intended to be used to interface with debugging tools. It's designed
to work seamlessly with the reactor (event-driven) model.
Zach Johnson [Mon, 28 Jul 2014 20:51:03 +0000 (13:51 -0700)]
Remove some unused code in L2CAP
Chris Manton [Tue, 3 Jun 2014 18:02:38 +0000 (11:02 -0700)]
osi: hash map implementation
Andre Eisenbach [Wed, 18 Feb 2015 00:53:48 +0000 (16:53 -0800)]
Fix gatt_main.c compile error due to log macro change
Chris Manton [Tue, 17 Jun 2014 18:17:29 +0000 (11:17 -0700)]
rfcomm: Check for null pointers on DLC request
The function to get the port control block from the DLCI
explicitly mentions it will return NULL if there is no
active rfcomm connection for the given DLCI.
Chris Manton [Fri, 21 Feb 2014 20:36:18 +0000 (12:36 -0800)]
Release GATT resources upon teardown
Sharvil Nanavati [Tue, 21 Jan 2014 02:20:28 +0000 (18:20 -0800)]
Add a system property for libbt-vendor.so initialization timeout
Use a system property, bluetooth.enable_timeout_ms, to specify in ms
how long to wait for libbt-vendor.so to initialize.
Justin Harrison [Thu, 19 Feb 2015 04:48:38 +0000 (04:48 +0000)]
am
45085bf6: Merge "Ignore service UUID length if no UUID filter is specified" into lmp-mr1-dev
* commit '
45085bf6ed93ea9398047c21bc4b94c8516f9daa':
Ignore service UUID length if no UUID filter is specified
Justin Harrison [Thu, 19 Feb 2015 04:44:12 +0000 (04:44 +0000)]
Merge "Ignore service UUID length if no UUID filter is specified" into lmp-mr1-dev
Andre Eisenbach [Thu, 19 Feb 2015 02:14:02 +0000 (02:14 +0000)]
am
114c9ce4: Merge "Increase SDP buffer from 750 bytes to 4096 bytes" into lmp-mr1-dev
* commit '
114c9ce459e9d9e40d55586da1d18d0d65c45c8d':
Increase SDP buffer from 750 bytes to 4096 bytes
Andre Eisenbach [Thu, 19 Feb 2015 01:16:36 +0000 (01:16 +0000)]
Merge "Increase SDP buffer from 750 bytes to 4096 bytes" into lmp-mr1-dev
Andre Eisenbach [Thu, 19 Feb 2015 00:33:34 +0000 (16:33 -0800)]
Ignore service UUID length if no UUID filter is specified
Bug:
19016326
Change-Id: I6156fee1d6079fec7879f47b6120befe2c4d35cd
Andre Eisenbach [Tue, 10 Feb 2015 00:27:01 +0000 (00:27 +0000)]
am
dfb3b2f2: Add flag indicating encrypted connections to btif_dm_get_connection_state()
* commit '
dfb3b2f2595dc16fe7f576a4b0c2f5e73db0327f':
Add flag indicating encrypted connections to btif_dm_get_connection_state()
Andre Eisenbach [Fri, 6 Feb 2015 04:00:45 +0000 (20:00 -0800)]
Add flag indicating encrypted connections to btif_dm_get_connection_state()
Add a check to btif_dm_get_connection_state() to see if the currently
active connection is encrypted.
Bug:
19186961
Change-Id: I27bcc6e296d272ffd17c0bbe97631ffa4df57ccd
Andre Eisenbach [Thu, 5 Feb 2015 05:02:29 +0000 (05:02 +0000)]
am
d6f2fa93: (-s ours) am
d6419cd6: am
0a8c803a: am
7f34538a: (-s ours) am
65aec3a3: am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
d6f2fa93052c1d9bdf6035ace6b32345013516db':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:52:37 +0000 (04:52 +0000)]
am
e791f732: (-s ours) am
ae9d174b: am
408dec19: am
977acabd: (-s ours) am
eebc8ab9: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
e791f73202a2832b4d20dbc1ecd4b520adbb75d3':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:52:25 +0000 (04:52 +0000)]
am
0ad6cfde: (-s ours) am
ce5ae4ab: am
a708936d: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
0ad6cfdee8857a7bc54d4c3eb98bf1cdc82dc9a7':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:38:21 +0000 (04:38 +0000)]
am
d6419cd6: am
0a8c803a: am
7f34538a: (-s ours) am
65aec3a3: am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
d6419cd6309bd20a2ab095c783bb6ad1f208bf4f':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:32:54 +0000 (04:32 +0000)]
am
0a8c803a: am
7f34538a: (-s ours) am
65aec3a3: am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
0a8c803a48fe5afa71d1f8660539012e9b1f9642':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:25:27 +0000 (04:25 +0000)]
am
7f34538a: (-s ours) am
65aec3a3: am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
7f34538ac0e447a88d1f54ff819c28b3574f0aa4':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:21:04 +0000 (04:21 +0000)]
am
65aec3a3: am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
65aec3a3f62c004d7073470f18330007b7ecf230':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:07:04 +0000 (04:07 +0000)]
am
ae9d174b: am
408dec19: am
977acabd: (-s ours) am
eebc8ab9: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
ae9d174bc0afe0a7ed0bb4fb82836338fbb6adb1':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 04:01:12 +0000 (04:01 +0000)]
am
408dec19: am
977acabd: (-s ours) am
eebc8ab9: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
408dec1991255be919b1605e5cfe983b7f7154e9':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 03:54:01 +0000 (03:54 +0000)]
am
977acabd: (-s ours) am
eebc8ab9: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
977acabd3744a3308057b1485c7ac8658698e96b':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 03:51:51 +0000 (03:51 +0000)]
am
6d429d9d: (-s ours) am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
6d429d9d0a1b537600c652dda2bc98d4c4ebd783':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 03:38:43 +0000 (03:38 +0000)]
am
eebc8ab9: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
eebc8ab9c5e362d721f8f606f0a564ca9aff89d9':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 03:26:29 +0000 (03:26 +0000)]
am
3efb9e2e: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
3efb9e2e11471a67329ad17d48ffa79118ea76c6':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 02:24:38 +0000 (02:24 +0000)]
am
ce5ae4ab: am
a708936d: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
ce5ae4abddaab8865bb44c83d2d44e14b0d7536b':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Andre Eisenbach [Thu, 5 Feb 2015 02:11:12 +0000 (02:11 +0000)]
am
a708936d: DO NOT MERGE Change pairing_cb to assume temporary pairing by default
* commit '
a708936da347b32f2a0811b5f33d9068c2b0de6f':
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
Prerepa Viswanadham [Wed, 10 Dec 2014 23:34:48 +0000 (15:34 -0800)]
Increase SDP buffer from 750 bytes to 4096 bytes
Bug
18670169
Change-Id: Ida1a6a57dcce94339a190974af4565f14157cdc2
Andre Eisenbach [Mon, 26 Jan 2015 21:49:36 +0000 (13:49 -0800)]
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
When pairing takes place, the pairing_cb.is_temp flag indicates whether
a pairing is temporary or permanent. Link keys are not stored for
temporary pairings. Since this is a "positive" flag, resetting the
pairing_cb control block (ex. memset to 0), it will assume persistent
pairing by default. Under certain circumstances, this can lead to a link
key being stored for temporarily secured connection.
This patch reverses the flag to be a "negative" flag. Renamed to
"persistent_bond", the default 0 meaning is now used to indicate a
temporary bond. If the lag is not properly set now, it will default to a
temporary bond and will not save the link key erronously.
Bug:
18345373
Change-Id: I06b1ba9331a70ebc29f4437bf836164658dec5ae
Andre Eisenbach [Mon, 26 Jan 2015 21:49:36 +0000 (13:49 -0800)]
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
When pairing takes place, the pairing_cb.is_temp flag indicates whether
a pairing is temporary or permanent. Link keys are not stored for
temporary pairings. Since this is a "positive" flag, resetting the
pairing_cb control block (ex. memset to 0), it will assume persistent
pairing by default. Under certain circumstances, this can lead to a link
key being stored for temporarily secured connection.
This patch reverses the flag to be a "negative" flag. Renamed to
"persistent_bond", the default 0 meaning is now used to indicate a
temporary bond. If the lag is not properly set now, it will default to a
temporary bond and will not save the link key erronously.
Bug:
18345373
Change-Id: I8558abc9eace609b1ba02485b0ff775fb6f3c6af
Andre Eisenbach [Mon, 26 Jan 2015 21:49:36 +0000 (13:49 -0800)]
DO NOT MERGE Change pairing_cb to assume temporary pairing by default
When pairing takes place, the pairing_cb.is_temp flag indicates whether
a pairing is temporary or permanent. Link keys are not stored for
temporary pairings. Since this is a "positive" flag, resetting the
pairing_cb control block (ex. memset to 0), it will assume persistent
pairing by default. Under certain circumstances, this can lead to a link
key being stored for temporarily secured connection.
This patch reverses the flag to be a "negative" flag. Renamed to
"persistent_bond", the default 0 meaning is now used to indicate a
temporary bond. If the lag is not properly set now, it will default to a
temporary bond and will not save the link key erronously.
Bug:
18345373
Change-Id: Ifb61e7a23db07888a625db9ab851548600183136
Prem Kumar [Fri, 30 Jan 2015 01:00:49 +0000 (01:00 +0000)]
Merge "bta_dm_search_cancel sends dm_search state machine complete events" into lmp-mr1-dev
Matthew Xie [Thu, 29 Jan 2015 01:30:13 +0000 (17:30 -0800)]
bta_dm_search_cancel sends dm_search state machine complete events
bta_dm_search_cancel moves dm_search state from active search to
search_canceling state. The function is also responsible of moving
the state out of canceling state.
Bug:
19017339
Change-Id: Idea0cb0e2987892a5fc0f66db8eed19f57c68b89
Andre Eisenbach [Mon, 26 Jan 2015 21:49:36 +0000 (13:49 -0800)]
Change pairing_cb to assume temporary pairing by default
When pairing takes place, the pairing_cb.is_temp flag indicates whether
a pairing is temporary or permanent. Link keys are not stored for
temporary pairings. Since this is a "positive" flag, resetting the
pairing_cb control block (ex. memset to 0), it will assume persistent
pairing by default. Under certain circumstances, this can lead to a link
key being stored for temporarily secured connection.
This patch reverses the flag to be a "negative" flag. Renamed to
"persistent_bond", the default 0 meaning is now used to indicate a
temporary bond. If the lag is not properly set now, it will default to a
temporary bond and will not save the link key erronously.
Bug:
18345373
Change-Id: I6e821595877ff30d64dc6e33602ac049cab3dd1e
Andre Eisenbach [Thu, 15 Jan 2015 23:37:10 +0000 (23:37 +0000)]
Merge "Relax max PCM frames per tick a bit" into lmp-mr1-dev
Andre Eisenbach [Mon, 12 Jan 2015 21:34:01 +0000 (13:34 -0800)]
LE: Add error status to failed write operation
Bug:
18833375
Change-Id: Ib91c8e92658a276d813954264897b02863f1148b
Andre Eisenbach [Wed, 7 Jan 2015 22:30:28 +0000 (14:30 -0800)]
Relax max PCM frames per tick a bit
Also made the value overwrite-able in bt_target.h.
Bug:
18913091
Change-Id: I64bbe453b35fdce6f127b3c23c0552b14d4ac49b
Tobias Melin [Wed, 17 Dec 2014 10:24:31 +0000 (11:24 +0100)]
Added check if the device address is random
A check if the device address is random is needed since in a
public device address the two most significatant bits can also be
equal to 01 (see Bluetooth specification Core_v4.1.pdf, page 2021
and page 2500).
Bug:
18784040
Change-Id: I4f967a426ebb825731461e202c0741ae0540ef6a
Andre Eisenbach [Wed, 17 Dec 2014 00:18:10 +0000 (16:18 -0800)]
Allow connection parameters updates by slave
GATT service discovery in the slave role does not update to fast connection
parameters when connected. Accordin to the 4.0 spec, the connection
parameter disable/enable call is used for only by the masster role.
The 4.1 and later spec allows the slave role to control the connection
parameter update so that a slave role GATT client can perform the service
discovery using fast connection parameters.
Also switched to requestiong 7.5ms connection interval by default during
service discovery.
Bug:
18266904
Change-Id: Ie6300587306be3d694937e3888069e252592be42
Andre Eisenbach [Tue, 9 Dec 2014 23:16:09 +0000 (23:16 +0000)]
Merge "LE: Register for service change indication" into lmp-mr1-dev
Andre Eisenbach [Tue, 9 Dec 2014 22:08:58 +0000 (14:08 -0800)]
Do not log LE encryption keys or passkey
Bug:
18687167
Change-Id: I2a2a7113e6bc7cfb22a6bd6f16d16ce2b7c84cff
Chaojing Sun [Sat, 6 Dec 2014 01:12:36 +0000 (17:12 -0800)]
LE: Register for service change indication
Some bonded remote devices require the client to register for service
change indication and actually set the client configuration descriptor
before service change indications can be removed.
This change add an additional step after device bonding has occured to
register for service change indication if possible.
Bug:
18173911
Change-Id: I25386faec0d58834ee2b0a9d1db2d2e052311264
Andre Eisenbach [Thu, 4 Dec 2014 23:04:23 +0000 (15:04 -0800)]
LE: Ignore non-volatile GATT service cache for non-bonded devices
If a device is not bonded, the non-volatile GATT service cache should
not be used. Only bonded devices have the capability to invalidate the
cache using the service changed indication.
Bug:
18571592
Change-Id: Ia75aa14f1c862a18237e78d24b63c22cf1dc82a8
Andre Eisenbach [Thu, 4 Dec 2014 21:37:25 +0000 (21:37 +0000)]
am
cf7f6a15: Prevent Java call for acquiring already held wakelock
* commit '
cf7f6a154aed48659260d391994dc59151be937b':
Prevent Java call for acquiring already held wakelock
Wei Wang [Thu, 4 Dec 2014 01:42:56 +0000 (01:42 +0000)]
Merge "Remove unnecessary check of multiple advertise instance count." into lmp-mr1-dev
Andre Eisenbach [Wed, 3 Dec 2014 18:35:53 +0000 (10:35 -0800)]
Prevent Java call for acquiring already held wakelock
Change-Id: Icf455b6aa7c0c1bf7abf7ea9700cfde17f6c7c2b
Matthew Xie [Wed, 3 Dec 2014 22:15:11 +0000 (22:15 +0000)]
Merge "PAN TAP fd is not monitored in all cases" into lmp-mr1-dev
Matthew Xie [Wed, 3 Dec 2014 04:18:03 +0000 (04:18 +0000)]
Merge "Make GKI_TIMER_INTERVAL_FOR_WAKELOCK configurable for different target" into lmp-mr1-dev
Matthew Xie [Wed, 3 Dec 2014 01:06:03 +0000 (17:06 -0800)]
Make GKI_TIMER_INTERVAL_FOR_WAKELOCK configurable for different target
Set the default value as 3000 ms
Bug:
18549150
Change-Id: I1d5b4fca627c22fdd8a32a41d5beac6837b6dff4
Andre Eisenbach [Wed, 26 Nov 2014 20:56:55 +0000 (12:56 -0800)]
Add server-side callback for change in MTU (2/4)
When a client requests to update the LE transport MTU, the server
currently does not get notified and can therefor not properly size
notifications appropriate to the current MTU.
Bug:
18388114
Change-Id: Ice355f8919d4f69876574df1d90ce7d31f42bc4f
Wei Wang [Wed, 26 Nov 2014 20:47:49 +0000 (12:47 -0800)]
Remove unnecessary check of multiple advertise instance count.
Bug:
18539121
Change-Id: I841e4323ed4995bd9f8117681a759f52995d071f
Zhenye Zhu [Tue, 25 Nov 2014 23:51:07 +0000 (15:51 -0800)]
PAN TAP fd is not monitored in all cases
Bug:
18271987
Change-Id: I348f3851a955b5277e7cdf0102583eaaef2ef0f3
Simon Wilson [Wed, 26 Nov 2014 00:59:38 +0000 (00:59 +0000)]
am
254b5ba2: gki_buffer: add missing mutex unlock
* commit '
254b5ba2e3f4c44b82a0369579b66bafcd0d6aa2':
gki_buffer: add missing mutex unlock
Simon Wilson [Tue, 25 Nov 2014 22:11:29 +0000 (14:11 -0800)]
gki_buffer: add missing mutex unlock
Bug:
18511282
Change-Id: Iea5248d5c9ba8690d0c2f462ec04784476309797
Matthew Xie [Mon, 24 Nov 2014 20:34:18 +0000 (20:34 +0000)]
Merge "Enforce Authentication for incoming HID connection" into lmp-mr1-dev
Simon Wilson [Sat, 22 Nov 2014 00:24:57 +0000 (00:24 +0000)]
am
654c376f: DO NOT MERGE Reduce TIMER_INTERVAL_FOR_WAKELOCK_IN_MS to 100ms
* commit '
654c376fda3035af5b9090edc2a0a32382baf21c':
DO NOT MERGE Reduce TIMER_INTERVAL_FOR_WAKELOCK_IN_MS to 100ms
Simon Wilson [Fri, 21 Nov 2014 17:37:49 +0000 (09:37 -0800)]
DO NOT MERGE Reduce TIMER_INTERVAL_FOR_WAKELOCK_IN_MS to 100ms
The bluedroid wakelock locked time has increased 2.5x since K.
Reduce the 3s interval to reduce the time that the wakelock is
held, allowing the kernel to suspend more frequently. By
reducing this, wakelock usage returns to roughly K levels.
This in turn reduces BT process power usage.
Bug:
18357273
Change-Id: I7c3bddffafb0fa59468b8dd5718220be8ac85506
Satya Calloji [Mon, 20 Oct 2014 04:28:46 +0000 (21:28 -0700)]
Clean up SetADV and ScanResp data memory leak.
Bug:
18045480
Change-Id: Ic433f4aa26bd08e84c53c447be9d5278e16ebd55
Andre Eisenbach [Tue, 18 Nov 2014 17:39:00 +0000 (09:39 -0800)]
LE: Use LE specific I/O capabilities
In an attempt to make the I/O capability configuration more reasable and
overwritable per platform, the BR/EDR specific I/O capabilities were
used for LE. In SMP, the I/O capabilities flag is mapped differently,
thus a separate flag is required to configure the LE I/O capabilities.
Bug:
18245986
Change-Id: I6b4ba8f8a1d60ea25729e49d305e3653e94928c6
Andre Eisenbach [Tue, 18 Nov 2014 17:15:26 +0000 (17:15 +0000)]
am
a59f47f2: DO NOT MERGE Remove overflow rate limiting when reading A2DP frames
* commit '
a59f47f27b2962828afd8d90d1a1d21206e32324':
DO NOT MERGE Remove overflow rate limiting when reading A2DP frames
Priti Aghera [Wed, 12 Nov 2014 18:28:35 +0000 (10:28 -0800)]
Enforce Authentication for incoming HID connection
Enforce Authentication in addition to encryption for all incoming
HID connections.
Bug
17887668
Change-Id: Ib0d6cd6d8e793823c541a1b4468dcce89f297181
(cherry picked from commit
6d6502909c1dd1766db1fea2cb638866e137a7bf)
Matthew Xie [Mon, 10 Nov 2014 18:24:46 +0000 (10:24 -0800)]
Use the device type from saved properties instead of assuming default
DUMO device can do both BLE and BREDR operations. It was wrong
to assign BLE or BREDR type to it.
Bug:
18275230
Change-Id: I8d6c17e5157ba29a1af459629de9e2d6f6dc5e99
Andre Eisenbach [Fri, 7 Nov 2014 23:46:04 +0000 (15:46 -0800)]
DO NOT MERGE Remove overflow rate limiting when reading A2DP frames
A2DP now supports adjusting the number of A2DP frames sent per timer
tick to adjust for timer drift and missed media task ticks. When the
signal to the headset/speakers becomes interrupted, the number of
packets to be read can queue up and rate limiting will not allow for the
queue to be cleared.
The overflow mechanism introduced in commit
4aebca4 will cause the media
task to stop sending packets completely, which can underflow the jutter
buffer on the remote device and lead to audio drop-outs.
This patch removes the overflow mechanism and also adds code do discard
audio frames that could not be sent to the remote device (weak signal
etc) to allow the device to stay in sync and not build up audio delays.
Also added additional debug logging and changed the UIPC flush mechanism
to address an issue where reading byte by byte causes an endless flush
loop if remote UIPC producer writes data faster than the flush loop
consumes it.
Bug:
18244205
Change-Id: I9a424984806bb2a464877399804b3355b2c439c3
(cherry picked from commit
c5916e97384f07ec5a2e061e6af24f70107c74a2)
Andre Eisenbach [Fri, 7 Nov 2014 23:46:04 +0000 (15:46 -0800)]
Remove overflow rate limiting when reading A2DP frames
A2DP now supports adjusting the number of A2DP frames sent per timer
tick to adjust for timer drift and missed media task ticks. When the
signal to the headset/speakers becomes interrupted, the number of
packets to be read can queue up and rate limiting will not allow for the
queue to be cleared.
The overflow mechanism introduced in commit
4aebca4 will cause the media
task to stop sending packets completely, which can underflow the jutter
buffer on the remote device and lead to audio drop-outs.
This patch removes the overflow mechanism and also adds code do discard
audio frames that could not be sent to the remote device (weak signal
etc) to allow the device to stay in sync and not build up audio delays.
Also added additional debug logging and changed the UIPC flush mechanism
to address an issue where reading byte by byte causes an endless flush
loop if remote UIPC producer writes data faster than the flush loop
consumes it.
Bug:
18326405
Change-Id: I9a424984806bb2a464877399804b3355b2c439c3
Chaojing Sun [Sat, 8 Nov 2014 00:42:46 +0000 (16:42 -0800)]
Bluetooth fails to turn off with keyboard and headset connected
When HOGP keyboard is connecting and BT off is requested, if there
is any HOGP data that was received during this state, it causes the
following side-effects:
- LE data was not thrown away in disconnecting state, instead it is
now being used as indication of link establishement
-The above triggers the link open callback for fix channel and
causes the BT off failure.
Check L2CAP link state and always discard the fixed channel data
received in disconnecting state solves the problem.
Bug:
17793437
Change-Id: I633d5e6346e952daa2abd642effad2f260954fdf
Satya Calloji [Thu, 6 Nov 2014 20:33:53 +0000 (20:33 +0000)]
am
b407515f: Fix "no instances found for adv" when stop BLE scanning.
* commit '
b407515ffa145b1a2cab01467da03c92aeb0e8eb':
Fix "no instances found for adv" when stop BLE scanning.
Satya Calloji [Fri, 10 Oct 2014 18:31:03 +0000 (11:31 -0700)]
Fix "no instances found for adv" when stop BLE scanning.
Bug:
17703806
Change-Id: I103d3637ad38d33b4370850a300b0d72bdaeb562
Andre Eisenbach [Tue, 4 Nov 2014 23:49:36 +0000 (23:49 +0000)]
am
2933de99: am
f37767a1: HOGP: Do not remove device from whitelist on encryption failure
* commit '
2933de995b21b8ae2ed6d6b682823f49aea8fa5e':
HOGP: Do not remove device from whitelist on encryption failure
Andre Eisenbach [Tue, 4 Nov 2014 23:45:15 +0000 (23:45 +0000)]
am
f37767a1: HOGP: Do not remove device from whitelist on encryption failure
* commit '
f37767a17b2d80828f7ac4fa170859cb9e2f0bc6':
HOGP: Do not remove device from whitelist on encryption failure
Andre Eisenbach [Tue, 4 Nov 2014 23:23:02 +0000 (15:23 -0800)]
HOGP: Do not remove device from whitelist on encryption failure
If the encryption times out during the re-connect process for a HOGP
device, the device is removed from the whitelist and thus will not
reconnect until it is added back to the list. On platforms that do not
have a way to reconnect to a device manually, this means the device will
never reconnect again until the stack is restarted.
This patch checks the reason for the encryption failure and does not
remove the device from the whitelist if the encryption failed to a non
authentication/key related error.
Bug:
18233442
Change-Id: Ifaec4a9224ff9281956715b38d34c2d7c3fecb01
Matthew Xie [Tue, 4 Nov 2014 00:19:18 +0000 (00:19 +0000)]
am
e50c7933: DO NOT MERGE Do not set sig_id in gerneral reject message per AVDTP SPEC 1.2 automerge:
595bcb4 -s ours automerge:
2369935 -s ours
automerge:
0570fd9 -s ours
* commit '
0570fd9c9cf0929140e8d16ebe78a5189f8b01bb':
Matthew Xie [Tue, 4 Nov 2014 00:19:14 +0000 (00:19 +0000)]
am
87303c76: Increment seq before adding to packet in avdt_scb_hdl_write_req_no_frag automerge:
98ad505 automerge:
f81ffdb
automerge:
6d11a01
* commit '
6d11a01aa3770a3b23086f08c9691617bb0c9578':
Matthew Xie [Mon, 3 Nov 2014 21:20:45 +0000 (21:20 +0000)]
am
e50c7933: DO NOT MERGE Do not set sig_id in gerneral reject message per AVDTP SPEC 1.2 automerge:
595bcb4 -s ours automerge:
2369935 -s ours
* commit '
e50c79337277f9da2c9cef52fd373bbc85df6255':
Matthew Xie [Mon, 3 Nov 2014 21:20:44 +0000 (21:20 +0000)]
am
87303c76: Increment seq before adding to packet in avdt_scb_hdl_write_req_no_frag automerge:
98ad505 automerge:
f81ffdb
* commit '
87303c76d7e472818b3379475241191cd2b3e3aa':
Matthew Xie [Mon, 3 Nov 2014 21:13:49 +0000 (21:13 +0000)]
DO NOT MERGE Do not set sig_id in gerneral reject message per AVDTP SPEC 1.2 automerge:
595bcb4 -s ours
automerge:
2369935 -s ours
* commit '
236993560aad078736afd36323ed0dafa13005c2':
Matthew Xie [Mon, 3 Nov 2014 21:13:21 +0000 (21:13 +0000)]
Increment seq before adding to packet in avdt_scb_hdl_write_req_no_frag automerge:
98ad505
automerge:
f81ffdb
* commit '
f81ffdb1804dfe759c6a67cfc40a7c4fb599b127':
Simon Wilson [Mon, 3 Nov 2014 20:56:14 +0000 (20:56 +0000)]
am
020cccca: am
5fe98634: am
ba2f6d99: Revert "anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer" automerge:
8403c6d
* commit '
020ccccabd8bfb7bb863433a86793d3df6c32ed5':
Simon Wilson [Mon, 3 Nov 2014 20:47:29 +0000 (20:47 +0000)]
am
5fe98634: am
ba2f6d99: Revert "anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer" automerge:
8403c6d
* commit '
5fe98634c3bd19660d2f3533f83b9beca15a94ab':
Simon Wilson [Mon, 3 Nov 2014 20:40:34 +0000 (20:40 +0000)]
am
ba2f6d99: Revert "anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer"
automerge:
8403c6d
* commit '
8403c6d2a012adf87bed9d34176bfaa6a343463c':
Mallikarjuna GB [Mon, 3 Nov 2014 20:37:52 +0000 (20:37 +0000)]
am
36eac517: am
27c93b25: am
46bfe63d: DO NOT MERGE AVRCP: Proper handling of Fragmented AVCTP packet automerge:
f9336d3 -s ours
* commit '
36eac517f8ac4220315673fb9fbe172ae5430c7d':
Maggie_Lee [Mon, 3 Nov 2014 20:37:51 +0000 (20:37 +0000)]
am
9624c4d6: am
36ba410e: am
c1ccb0d9: anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer automerge:
0e74efe
* commit '
9624c4d6ee066ffc70c9f920b073dafecfb81b8e':
Mallikarjuna GB [Mon, 3 Nov 2014 20:29:47 +0000 (20:29 +0000)]
am
27c93b25: am
46bfe63d: DO NOT MERGE AVRCP: Proper handling of Fragmented AVCTP packet automerge:
f9336d3 -s ours
* commit '
27c93b253feaea8f5144d3e8957478575c4df13c':
Maggie_Lee [Mon, 3 Nov 2014 20:29:46 +0000 (20:29 +0000)]
am
36ba410e: am
c1ccb0d9: anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer automerge:
0e74efe
* commit '
36ba410e35e924aad27cd6556e2346af5e606363':
Mallikarjuna GB [Mon, 3 Nov 2014 20:20:07 +0000 (20:20 +0000)]
am
46bfe63d: DO NOT MERGE AVRCP: Proper handling of Fragmented AVCTP packet
automerge:
f9336d3 -s ours
* commit '
f9336d34b5168d4c97476ea88dad586d481c8397':
Maggie_Lee [Mon, 3 Nov 2014 20:20:03 +0000 (20:20 +0000)]
am
c1ccb0d9: anthias:
17614185:Bluetooth: Getbuf returning invalid buffer pointer
automerge:
0e74efe
* commit '
0e74efe56b678c85f35e158a40d9828661cfa2d4':
Eric Laurent [Thu, 30 Oct 2014 16:03:11 +0000 (16:03 +0000)]
Merge "audio HAL: remove misleading error log" into lmp-mr1-dev
Eric Laurent [Thu, 30 Oct 2014 00:17:31 +0000 (17:17 -0700)]
audio HAL: remove misleading error log
Bug:
17916028.
Change-Id: I4badb9208eeb973a08b4f8463ee287f6bfb3dd01
Prerepa Viswanadham [Wed, 29 Oct 2014 18:51:16 +0000 (18:51 +0000)]
am
903285cb: am
472c2a7b: Don\'t starve a BT ACL link with 0 xmit quota
* commit '
903285cb2f4fef96f74de771e868b277453d6f21':
Don't starve a BT ACL link with 0 xmit quota
Prerepa Viswanadham [Tue, 28 Oct 2014 23:49:28 +0000 (23:49 +0000)]
am
472c2a7b: Don\'t starve a BT ACL link with 0 xmit quota
* commit '
472c2a7bb0ac070e596084f9422157f7872c6dca':
Don't starve a BT ACL link with 0 xmit quota
Matthew Xie [Tue, 28 Oct 2014 23:27:24 +0000 (23:27 +0000)]
DO NOT MERGE Do not set sig_id in gerneral reject message per AVDTP SPEC 1.2
automerge:
595bcb4 -s ours
* commit '
595bcb4c72aaa2a9a54a23b127dd5fa9842876ca':
DO NOT MERGE Do not set sig_id in gerneral reject message per AVDTP SPEC 1.2
Matthew Xie [Tue, 28 Oct 2014 23:26:48 +0000 (23:26 +0000)]
Increment seq before adding to packet in avdt_scb_hdl_write_req_no_frag
automerge:
98ad505
* commit '
98ad505f577599870cf0ae281a5d035e2e2453f9':
Increment seq before adding to packet in avdt_scb_hdl_write_req_no_frag
Matthew Xie [Tue, 28 Oct 2014 22:39:14 +0000 (22:39 +0000)]
Merge "Make sure now_us returns a value bigger than the previous one" into lmp-mr1-dev
Matthew Xie [Tue, 28 Oct 2014 18:05:26 +0000 (11:05 -0700)]
Make sure now_us returns a value bigger than the previous one
On some platforms clock_gettime may sometimes return a current
time that is earlier than a previous time. While it rarely
happens, we need cover the case anyway.
Bug:
18154020
Change-Id: I3846487aa45d0b11aeb63fa68af8826b864248fa
Andre Eisenbach [Fri, 24 Oct 2014 16:55:34 +0000 (09:55 -0700)]
LE: Make local privacy configurable
Bug:
17753401
Change-Id: I288ea8b6194d91d18485d0f3f1bbf997f97a26dd