History log of /external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4fa77d1bc661bc72e00e81ce17af0ac4569d41d 04-Dec-2014 Andre Eisenbach <eisenbach@google.com> am cf7f6a15: Prevent Java call for acquiring already held wakelock

* commit 'cf7f6a154aed48659260d391994dc59151be937b':
Prevent Java call for acquiring already held wakelock
cf7f6a154aed48659260d391994dc59151be937b 03-Dec-2014 Andre Eisenbach <eisenbach@google.com> Prevent Java call for acquiring already held wakelock

Change-Id: Icf455b6aa7c0c1bf7abf7ea9700cfde17f6c7c2b
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
e6c363badaac6084e84775de59acb3976c80111d 03-Dec-2014 Matthew Xie <mattx@google.com> Make GKI_TIMER_INTERVAL_FOR_WAKELOCK configurable for different target

Set the default value as 3000 ms
Bug: 18549150

Change-Id: I1d5b4fca627c22fdd8a32a41d5beac6837b6dff4
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
a99c2d913308b0fe17324225d62936c009ed1e4e 22-Nov-2014 Simon Wilson <simonwilson@google.com> 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
654c376fda3035af5b9090edc2a0a32382baf21c 21-Nov-2014 Simon Wilson <simonwilson@google.com> 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
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
c11e1662d70bb5455a51c7b103cbe19876b58f44 28-Oct-2014 Matthew Xie <mattx@google.com> 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
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
f061e74b81863771b174d1717a6165034dbad8e5 09-Oct-2014 Mattias Agren <magren@broadcom.com> Added missing A2DP priority on java alarm service

Running GKI timer engine via JAVA alarm service was causing severe
timer preemption at times which affects A2DP media task timer. This in
turn was stressing the compensation logic towards UIPC resulting in
very bursty reads of up to 40 UIPC frames at a time. This led to
instabilities on the UIPC pipe and trickled upwards in audio framework.
Inclusion of java alarm thread in A2DP high priority thread list results
in a much smoother data flow for entire A2DP data path and improved
audio quality.

Bug: 17520043
Change-Id: I7cea6ec64aa5b973b5fff767389a8827e681619e
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
25067c0afc4d3ed95181b91801d3d638d9aa3f8f 22-Jul-2014 Andre Eisenbach <eisenbach@google.com> Fix integer overflow in GKI timer calculation

Fix an integer overflow in the GKI timer elapsed time calculation that
would cause Bluetooth Stereo Audio (A2DP) playback to stop suddenly
after a period of INT32_MAX microseconds (about 35 minutes) of
continuous uptime of the phone/tablet.

Bug: 16412377
Change-Id: I28cd3155a23444e41b26b3f3b8424cc2a3c5bf91
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
3857e59a3ab800b47aac6f0b3eee7c65eb20faf5 07-Jul-2014 Andre Eisenbach <eisenbach@google.com> Fix GKI timers to take execution time into account

Previously, the GKI timer system would not take the time taken for
updating the timers into account when re-scheduling the next timer. This
would by design introduce timer drift into the system.

This patch measures the time taken for an alarm to be triggered to
report the correct number of ticks to the GKI timer subsystem, as well
as measuring the time taken for updating the timers to adjust the next
alarm accordingly.

This patch dramatically improves A2DP audio quality on various devices
which currently suffer timer drift problems.

Change-Id: Ia99454abcb2a6889c47b1d8e267705f29ebe7b64
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
ceec4d1f71f9b71bc1175f684699be45b96d9efc 02-Jul-2014 Sharvil Nanavati <sharvil@google.com> Use POSIX timer for non-wake alarms in bluedroid.

After this change, bluedroid will go through AlarmManager for wake
alarms (>= 3s) and POSIX timers + wake lock for short deadlines.
This change allows A2DP to continue streaming while the screen is
off.

Change-Id: I56622a6873aa431842dd1d97e830849ac2fe6773
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
b5382489d4092d6e8418297ce7bd5d0c82ad2eef 30-Jun-2014 Sharvil Nanavati <sharvil@google.com> Remove more unused code from GKI timers.

Change-Id: I4fc3a64312b49a3dd23d80454244f8eb6340d8e6
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
d42dba5420e5636dfcf71f883d73821ac923d549 30-Jun-2014 Sharvil Nanavati <sharvil@google.com> Remove more unused code from GKI.

Specifically:
- ISR code (since bluedroid is entirely userspace)
- logging macros
- newlines in log macros
- GKI_get_time_stamp (unused function)
- GKI_freeze
- unused timer variables and macros

Change-Id: I8e0676c28842d87c4148059ebb0320367658bc16
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
8e50f047de2999e89b6a19ec9bf513017fcde3f9 28-Jun-2014 Matthew Xie <mattx@google.com> resolved conflicts for merge of 6449e497 to master

Change-Id: I01ef7ea6c4ce49c9d775b355fb5b082b25ffbc39
a14e2a014660460401a732abb017af1291ab89aa 06-Jun-2014 Sharvil Nanavati <sharvil@google.com> Eliminate dead code: remove GKI_sched* from the codebase.

Change-Id: I607bd3bf88ef8847c8a7e984a54eabedd4fb7516

Conflicts:
bta/hf_client/bta_hf_client_api.c
bta/hf_client/bta_hf_client_main.c
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
10aecea0649e523ad9e94b5d0256e72729ec5875 29-May-2014 Sharvil Nanavati <sharvil@google.com> Implement GKI timers based on wake alarms and wake locks.

Before this change, bluedroid was unable to acquire wake locks
because the Bluetooth process didn't have permissions to write to
/sys/power/wake_*. We are now making wake locks accessible to
bluedroid through a HAL callout back into Java code.

The previous design did not use wake alarms. Bluedroid would attempt
to hold a wake lock until all pending timers expired, which is awful
if a timer is scheduled seconds or minutes from now. There is a
15min timer in bluedroid now so holding a wake lock for the entire
duration of pending alarms is unacceptable (power cost). The new
implementation uses a hybrid approach: if the next deadline is < 3s
away, we take a wake lock. If it is further than 3s away, we set a
wake alarm and release the wake lock.

As a result of this change, we have also eliminated a thread whose
sole purpose was to wake up every 10ms and update timers.

Change-Id: I46cd4edfcad2f5dce23c4003a14a617e7bf00541
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
2a1d89f9d1e3c5f0b7402df4e2823be76a1b81b0 04-May-2014 Sharvil Nanavati <sharvil@google.com> Start cleaning up log macros.

Change-Id: I228fef0198caeb47618a07c4c46526f611933e07
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
6449e497dfe4d500810c3e7b4d7d056027c33a0e 06-Jun-2014 Sharvil Nanavati <sharvil@google.com> Eliminate more dead code in GKI.

Change-Id: I4c0000445535e5300b83a18f5f6ca45f1ef797da
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
82d0a118de082b95cc41b63de8fcd79c9f1f0831 06-Jun-2014 Sharvil Nanavati <sharvil@google.com> Eliminate dead code: remove GKI_sched* from the codebase.

Change-Id: I607bd3bf88ef8847c8a7e984a54eabedd4fb7516
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
9bce2266bae83dfeb57319076dee569324a6d0a8 29-May-2014 Sharvil Nanavati <sharvil@google.com> Implement GKI timers based on wake alarms and wake locks.

Before this change, bluedroid was unable to acquire wake locks
because the Bluetooth process didn't have permissions to write to
/sys/power/wake_*. We are now making wake locks accessible to
bluedroid through a HAL callout back into Java code.

The previous design did not use wake alarms. Bluedroid would attempt
to hold a wake lock until all pending timers expired, which is awful
if a timer is scheduled seconds or minutes from now. There is a
15min timer in bluedroid now so holding a wake lock for the entire
duration of pending alarms is unacceptable (power cost). The new
implementation uses a hybrid approach: if the next deadline is < 3s
away, we take a wake lock. If it is further than 3s away, we set a
wake alarm and release the wake lock.

As a result of this change, we have also eliminated a thread whose
sole purpose was to wake up every 10ms and update timers.

Change-Id: I46cd4edfcad2f5dce23c4003a14a617e7bf00541
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
0212487880be33e255d49f6e38dbb035d1f77750 04-May-2014 Sharvil Nanavati <sharvil@google.com> Start cleaning up log macros.

Change-Id: I228fef0198caeb47618a07c4c46526f611933e07
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
477057cc54dde60732f9a97232f0042c2c64f3a8 24-May-2014 Matthew Xie <mattx@google.com> Revert "add wakelock control callback"

This reverts commit cd7896c5c4bffa5a6f9a414177ea0038d6172964.
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
8075fbd743d5eb3937a11156abf2c9a4f051434c 23-May-2014 Dmitry Grinberg <dmitrygr@google.com> am 262685fe: am cd7896c5: add wakelock control callback

* commit '262685fe26c0ccc7e196def7db1d7447c51efdbb':
add wakelock control callback
cd7896c5c4bffa5a6f9a414177ea0038d6172964 22-May-2014 Dmitry Grinberg <dmitrygr@google.com> add wakelock control callback

Change-Id: Iffa8f33767a037fceb4757cdff07f25f30acf453
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
54db2c249efa91082c5a167a924a527ec73ff38d 13-Apr-2014 Sharvil Nanavati <sharvil@google.com> Remove executable bit on source files.

Change-Id: Id456478aea626f57fed3479346e8fb4dbd0fafa6
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
d2ccbbb73c7851d2fa28dc212d2fffc0ad4e5d50 13-Apr-2014 Sharvil Nanavati <sharvil@google.com> Remove executable bit on source files.

Change-Id: Id456478aea626f57fed3479346e8fb4dbd0fafa6
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
a90d343e16e19e25ea6a813f4a9f6cd922989b01 05-Mar-2014 Narayan Kamath <narayan@google.com> Fix conditional waits in GKI_wait.

The absolute time calculation uses CLOCK_MONOTONIC, so
make sure pthread_condattr_setclock is called with
CLOCK_MONOTONIC.

Change-Id: I0f20871e36db511961b1f17ecd3225180e893db9
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
5cd8bff2dd0337cb52bf48f312e3d2d55a8882fb 01-Feb-2014 Mike J. Chen <mjchen@google.com> Major warnings cleanup

Mostly fixing unused parameter warnings.
A few other warnings also fixed like possible use of
unitialized variables (no real issue found, just compiler couldn't
follow the path), signed vs unsigned warning.

Also fixed some typos, indent issues, removal of dead code, etc.

Change-Id: I95eb887aefc4d559d7921f71a0af5f3bfb01ac01
Signed-off-by: Mike J. Chen <mjchen@google.com>
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
bcfbc24314a79e40e1036cdea62f42b612981b1c 22-Jan-2014 Sharvil Nanavati <sharvil@google.com> 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
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c
5738f83aeb59361a0a2eda2460113f6dc9194271 13-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot cdeccf6fdd8c2d494ea2867cb37a025bf8879baf

Change-Id: Ia2de32ccb97a9641462c72363b0a8c4288f4f36d
/external/bluetooth/bluedroid/gki/ulinux/gki_ulinux.c