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

Commit 1606b3f9 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio: allow standby for direct track" into nyc-dev

parents 32dc5a99 9cd7ad10
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4996,6 +4996,10 @@ bool AudioFlinger::DirectOutputThread::shouldStandby_l()
    bool trackPaused = false;
    bool trackStopped = false;

    if ((mType == DIRECT) && audio_is_linear_pcm(mFormat) && !usesHwAvSync()) {
        return !mStandby;
    }

    // do not put the HAL in standby when paused. AwesomePlayer clear the offloaded AudioTrack
    // after a timeout and we will enter standby then.
    if (mTracks.size() > 0) {