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

Commit c9b03670 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Steve Kondik
Browse files

audioflinger: OffloadThread state fix

When switching from one offload session to another that
reuses the same offload output, audio HAL is paused & flushed in
preparation for the new track.

OffloadThread must reset mHwPaused to allow proper state transitions
for the second track.

CRs-Fixed: 578165
Change-Id: I8173845e1782b5a8b372a82c7d337299a61e0efe
parent 7bb35102
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4350,6 +4350,9 @@ void AudioFlinger::OffloadThread::flushHw_l()
    mBytesRemaining = 0;
    mPausedWriteLength = 0;
    mPausedBytesRemaining = 0;
    // Treat flush as moving OffloadThread state back to Idle.
    mHwPaused = false;

    if (mUseAsyncWrite) {
        // discard any pending drain or write ack by incrementing sequence
        mWriteAckSequence = (mWriteAckSequence + 2) & ~1;