Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88f1dd08 authored by Gareth Fenn's avatar Gareth Fenn Committed by Andy Hung
Browse files

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
Change-Id: I4c7db89277a6144b9b78223fa6f899c85adfb3fc
parent 0c67b62e
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -7145,11 +7145,14 @@ void DirectOutputThread::flushHw_l()
{
{
    PlaybackThread::flushHw_l();
    PlaybackThread::flushHw_l();
    mOutput->flush();
    mOutput->flush();
    mHwPaused = false;
    mFlushPending = false;
    mFlushPending = false;
    mTimestampVerifier.discontinuity(discontinuityForStandbyOrFlush());
    mTimestampVerifier.discontinuity(discontinuityForStandbyOrFlush());
    mTimestamp.clear();
    mTimestamp.clear();
    mMonotonicFrameCounter.onFlush();
    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 {
int64_t DirectOutputThread::computeWaitTimeNs_l() const {