libaudiohal@aidl: Fix position and latency reporting

For latency, use the last returned value if the current
command did not provide latency (not every command does).
This avoids "Suspicious latency value reported by HAL..."
warnings.

Make sure that position and timestamp values are non-negative
(HAL may left them initialized to the default value `-1`).

Replace `if (status = ...; status != OK) return status` with
`RETURN_STATUS_IF_ERROR`. This also fixes `getRenderPosition`
which was returning `OK`.

Bug: 302132812
Bug: 302519087
Test: atest CtsMediaAudioTestCases
Change-Id: I5780eafd558bca85e966aa8374573df6a4133b9a
diff --git a/media/libaudiohal/impl/StreamHalAidl.h b/media/libaudiohal/impl/StreamHalAidl.h
index 3b369bd..4acc6ac 100644
--- a/media/libaudiohal/impl/StreamHalAidl.h
+++ b/media/libaudiohal/impl/StreamHalAidl.h
@@ -207,10 +207,13 @@
 
     status_t getLatency(uint32_t *latency);
 
+    // Always returns non-negative values.
     status_t getObservablePosition(int64_t *frames, int64_t *timestamp);
 
+    // Always returns non-negative values.
     status_t getHardwarePosition(int64_t *frames, int64_t *timestamp);
 
+    // Always returns non-negative values.
     status_t getXruns(int32_t *frames);
 
     status_t transfer(void *buffer, size_t bytes, size_t *transferred);