OSDN Git Service
(root)
/
android-x86
/
frameworks-av.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b171a9
)
Attribute throttle time to previous loops write time
author
Andy Hung
<hunga@google.com>
Thu, 7 Jul 2016 02:10:29 +0000
(19:10 -0700)
committer
Andy Hung
<hunga@google.com>
Thu, 7 Jul 2016 02:10:29 +0000
(19:10 -0700)
Bug:
29991292
Change-Id: Ie3ecc9631e1dfa83fafc7b003495f59e981a0b6b
services/audioflinger/Threads.cpp
patch
|
blob
|
history
diff --git
a/services/audioflinger/Threads.cpp
b/services/audioflinger/Threads.cpp
index
f7e6422
..
dfa3cdd
100644
(file)
--- a/
services/audioflinger/Threads.cpp
+++ b/
services/audioflinger/Threads.cpp
@@
-3326,6
+3326,9
@@
bool AudioFlinger::PlaybackThread::threadLoop()
" ret(%zd) deltaMs(%d) requires sleep %d ms",
this, ret, deltaMs, throttleMs);
mThreadThrottleTimeMs += throttleMs;
+ // Throttle must be attributed to the previous mixer loop's write time
+ // to allow back-to-back throttling.
+ lastWriteFinished += throttleMs * 1000000;
} else {
uint32_t diff = mThreadThrottleTimeMs - mThreadThrottleEndMs;
if (diff > 0) {