summaryrefslogtreecommitdiff
path: root/audio/2.0/default/StreamIn.cpp
diff options
context:
space:
mode:
authorMikhail Naganov <mnaganov@google.com>2017-02-10 08:37:19 -0800
committerMikhail Naganov <mnaganov@google.com>2017-02-10 08:37:19 -0800
commite867456982c1ee68e884294f5655abb6212ab533 (patch)
tree8f4ba3f4feeb5c5fc14c49df6bb18ecc2af4c658 /audio/2.0/default/StreamIn.cpp
parentdb4d6813abc43de44992bd48dd54c25ad6455b8e (diff)
audio: Remove timeout from waits on event flags in HAL driver threads
This fixes a power regression caused by periodic wakeups of the driver threads even when the device is idle. The timeout is really not needed, it used to be there to ensure that the thread exits its loop, but then an explicit wake-up call before closing the thread had been added for this purpose. Bug: 34682579 Test: Follow repro steps from the bug, compare power consumption to the legacy version of the audio HAL. Change-Id: I0bfc2079a449894c5d0bd6ef19b53ca425795a9e
Diffstat (limited to 'audio/2.0/default/StreamIn.cpp')
-rw-r--r--audio/2.0/default/StreamIn.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 9c49170ef0..8aba8c7b60 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -119,7 +119,7 @@ bool ReadThread::threadLoop() {
while(!std::atomic_load_explicit(mStop, std::memory_order_acquire)) {
// TODO: Remove manual event flag handling once blocking MQ is implemented. b/33815422
uint32_t efState = 0;
- mEfGroup->wait(static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL), &efState, NS_PER_SEC);
+ mEfGroup->wait(static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL), &efState);
if (!(efState & static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL))) {
continue; // Nothing to do.
}