audiohal: Remove timeouts in eventflag waits

Having a timeout is causing issues on hal driver thread startup.
If thread startup is delayed, then eventflag wait exits with
timeout. This leaves fmqs in an intermediate state, and a pending
wakeup for the server enables the client and the server to run
in parallel, causing races.

The legacy HAL interface didn't have any timeouts for read / write
operations, so there is no good reason for having them in
the wrapping interface.

The only difference with legacy HAL is that Treble HAL can be in
a separate process, and can crash, but this is handled separately.

Test: Check logs on startup, must be no fmq read / write errors
Bug: 35346610
Change-Id: Id3f79d31305afab194a4543bfb4501665518a27b
diff --git a/media/libaudiohal/EffectHalHidl.cpp b/media/libaudiohal/EffectHalHidl.cpp
index d74ef8a..a9d737a 100644
--- a/media/libaudiohal/EffectHalHidl.cpp
+++ b/media/libaudiohal/EffectHalHidl.cpp
@@ -135,7 +135,7 @@
     uint32_t efState = 0;
 retry:
     status_t ret = mEfGroup->wait(
-            static_cast<uint32_t>(MessageQueueFlagBits::DONE_PROCESSING), &efState, NS_PER_SEC);
+            static_cast<uint32_t>(MessageQueueFlagBits::DONE_PROCESSING), &efState);
     if (efState & static_cast<uint32_t>(MessageQueueFlagBits::DONE_PROCESSING)) {
         Result retval = Result::NOT_INITIALIZED;
         mStatusMQ->read(&retval);
diff --git a/media/libaudiohal/StreamHalHidl.cpp b/media/libaudiohal/StreamHalHidl.cpp
index 4054aaa..b66ba2b 100644
--- a/media/libaudiohal/StreamHalHidl.cpp
+++ b/media/libaudiohal/StreamHalHidl.cpp
@@ -338,8 +338,7 @@
     // TODO: Remove manual event flag handling once blocking MQ is implemented. b/33815422
     uint32_t efState = 0;
 retry:
-    status_t ret = mEfGroup->wait(
-            static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL), &efState, NS_PER_SEC);
+    status_t ret = mEfGroup->wait(static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL), &efState);
     if (efState & static_cast<uint32_t>(MessageQueueFlagBits::NOT_FULL)) {
         WriteStatus writeStatus;
         writeStatus.retval = Result::NOT_INITIALIZED;
@@ -597,8 +596,7 @@
     // TODO: Remove manual event flag handling once blocking MQ is implemented. b/33815422
     uint32_t efState = 0;
 retry:
-    status_t ret = mEfGroup->wait(
-            static_cast<uint32_t>(MessageQueueFlagBits::NOT_EMPTY), &efState, NS_PER_SEC);
+    status_t ret = mEfGroup->wait(static_cast<uint32_t>(MessageQueueFlagBits::NOT_EMPTY), &efState);
     if (efState & static_cast<uint32_t>(MessageQueueFlagBits::NOT_EMPTY)) {
         ReadStatus readStatus;
         readStatus.retval = Result::NOT_INITIALIZED;