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

Commit 4b06aec0 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

Merge \"Attribute throttle time to previous loops write time\" into nyc-mr1-dev

am: bf6dc1af

Change-Id: I4bc857144d49760097f7344c1d58ad7444b66548
parents 8d54707d bf6dc1af
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3326,6 +3326,9 @@ bool AudioFlinger::PlaybackThread::threadLoop()
                                    " ret(%zd) deltaMs(%d) requires sleep %d ms",
                                    this, ret, deltaMs, throttleMs);
                            mThreadThrottleTimeMs += throttleMs;
                            // Throttle must be attributed to the previous mixer loop's write time
                            // to allow back-to-back throttling.
                            lastWriteFinished += throttleMs * 1000000;
                        } else {
                            uint32_t diff = mThreadThrottleTimeMs - mThreadThrottleEndMs;
                            if (diff > 0) {