DO NOT MERGE ANYWHERE: Partial Revert of ag/27467076 for Pixel

Roll back the aspect of ag/27467076 ("libaudiohal@aidl:
Align position reporting with HIDL") regarding compressed
offload streams.

The revert is intended for 24D1-release only, it addresses
a problem specific to the Pixel audio HAL. The Pixel team is
working on a long-term solution for the 24Q3 branch.

Reason for revert: b/343334029

Bug: 343334029
Test: repro steps from the bug
Test: atest CtsMediaAudioTestCases
Change-Id: Icef4429260b0b0360dd7191e76c0d60418b48d7d
diff --git a/media/libaudiohal/impl/StreamHalAidl.cpp b/media/libaudiohal/impl/StreamHalAidl.cpp
index 5a0edd5..58259d1 100644
--- a/media/libaudiohal/impl/StreamHalAidl.cpp
+++ b/media/libaudiohal/impl/StreamHalAidl.cpp
@@ -686,11 +686,12 @@
     int64_t mostRecentResetPoint;
     if (!mContext.isAsynchronous() && audio_has_proportional_frames(mConfig.format)) {
         mostRecentResetPoint = statePositions.framesAtStandby;
+        *dspFrames = aidlFrames <= mostRecentResetPoint ? 0 : aidlFrames - mostRecentResetPoint;
     } else {
-        mostRecentResetPoint =
-                std::max(statePositions.framesAtStandby, statePositions.framesAtFlushOrDrain);
+        // Pixel HAL of 24D1 resets the position on flush/drain for compressed offload streams,
+        // thus is does not have to be reset here.
+        *dspFrames = aidlFrames;
     }
-    *dspFrames = aidlFrames <= mostRecentResetPoint ? 0 : aidlFrames - mostRecentResetPoint;
     return OK;
 }