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
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 9c49170..8aba8c7 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -119,7 +119,7 @@
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.
}