audiohal: Do not log if EINVAL is received from get_presentation_position
This happens often, and it's normal. Avoid logging it down as this
causes logspam.
Bug: 33353073
Change-Id: Ia3b1b8af61bdf83e9bcde0e5bed0285af037df45
Test: cause the system to play some sounds (e.g. UI clicks), watch logcat
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 546b264..913b6ae 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -262,7 +262,10 @@
struct timespec halTimeStamp;
retval = mStreamCommon->analyzeStatus(
"get_presentation_position",
- mStream->get_presentation_position(mStream, &frames, &halTimeStamp));
+ mStream->get_presentation_position(mStream, &frames, &halTimeStamp),
+ // Don't logspam on EINVAL--it's normal for get_presentation_position
+ // to return it sometimes.
+ EINVAL);
if (retval == Result::OK) {
timeStamp.tvSec = halTimeStamp.tv_sec;
timeStamp.tvNSec = halTimeStamp.tv_nsec;