commit | 5db373e75617f76ae581eb7d7997177df05bc229 | [log] [tgz] |
---|---|---|
author | Gareth Fenn <gareth.fenn@broadcom.com> | Thu Jun 06 15:38:23 2024 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Jun 06 15:38:23 2024 +0000 |
tree | cf04c88f02fc01730e58554f7a7813224d592aa1 | |
parent | 93e49122e284a1d934f2e759263d56800e705c22 [diff] [blame] |
AudioFlinger: do not reset mHwPaused on flush The hardware pause feature is hidden from the track clients. Make the current implementation consistent that when mHwPaused is set it requires a resume() after a flush(). Test: see bug Bug: 335784313 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:88f1dd08f127ca918a261428aac7928defa156c3) Merged-In: I4c7db89277a6144b9b78223fa6f899c85adfb3fc Change-Id: I4c7db89277a6144b9b78223fa6f899c85adfb3fc
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index dc90ef5..0766a0d 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp
@@ -7101,11 +7101,14 @@ { PlaybackThread::flushHw_l(); mOutput->flush(); - mHwPaused = false; mFlushPending = false; mTimestampVerifier.discontinuity(discontinuityForStandbyOrFlush()); mTimestamp.clear(); mMonotonicFrameCounter.onFlush(); + // We do not reset mHwPaused which is hidden from the Track client. + // Note: the client track in Tracks.cpp and AudioTrack.cpp + // has a FLUSHED state but the DirectOutputThread does not; + // those tracks will continue to show isStopped(). } int64_t DirectOutputThread::computeWaitTimeNs_l() const {