Skip to content

Commit

Permalink
DO NOT MERGE ANYWHERE: Partial Revert of ag/27467076 for Pixel
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mikhail Naganov committed Jun 6, 2024
1 parent 0be9192 commit d2d7a13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions media/libaudiohal/impl/StreamHalAidl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,12 @@ status_t StreamOutHalAidl::getRenderPosition(uint64_t *dspFrames) {
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;
}

Expand Down

0 comments on commit d2d7a13

Please sign in to comment.