Audio HAL default implementation: reduce logspam
Legacy BT A2DP implementation of Audio HAL may be returning EAGAIN
from get_presentation_position, this is normal and shouldn't be
logged. Otherwise we create logspam as this HAL function is called
often.
Bug: 30222631
Change-Id: I9394dbc1d53c1f4136c2d538fccd519964ff1697
Test: play music via BT A2DP
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 1948b68..2d764b7 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -405,8 +405,9 @@
"get_presentation_position",
stream->get_presentation_position(stream, frames, &halTimeStamp),
// Don't logspam on EINVAL--it's normal for get_presentation_position
- // to return it sometimes.
- EINVAL);
+ // to return it sometimes. EAGAIN may be returned by A2DP audio HAL
+ // implementation.
+ EINVAL, EAGAIN);
if (retval == Result::OK) {
timeStamp->tvSec = halTimeStamp.tv_sec;
timeStamp->tvNSec = halTimeStamp.tv_nsec;