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

Commit d7b39321 authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am a6f4fb1f: am ecfdd7ff: Merge "Limit AudioFlinger log." into ics-mr0

* commit 'a6f4fb1fbbaf6cb13ad6b813a4cecbc28ba02776':
  Limit AudioFlinger log.
parents 0fb0d7c5 2ce99907
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1909,7 +1909,9 @@ bool AudioFlinger::MixerThread::threadLoop()
    size_t mixBufferSize = mFrameCount * mFrameSize;
    // FIXME: Relaxed timing because of a certain device that can't meet latency
    // Should be reduced to 2x after the vendor fixes the driver issue
    nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
    // increase threshold again due to low power audio mode. The way this warning threshold is
    // calculated and its usefulness should be reconsidered anyway.
    nsecs_t maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
    nsecs_t lastWarning = 0;
    bool longStandbyExit = false;
    uint32_t activeSleepTime = activeSleepTimeUs();
@@ -1967,7 +1969,9 @@ bool AudioFlinger::MixerThread::threadLoop()
                mixBufferSize = mFrameCount * mFrameSize;
                // FIXME: Relaxed timing because of a certain device that can't meet latency
                // Should be reduced to 2x after the vendor fixes the driver issue
                maxPeriod = seconds(mFrameCount) / mSampleRate * 3;
                // increase threshold again due to low power audio mode. The way this warning
                // threshold is calculated and its usefulness should be reconsidered anyway.
                maxPeriod = seconds(mFrameCount) / mSampleRate * 15;
                activeSleepTime = activeSleepTimeUs();
                idleSleepTime = idleSleepTimeUs();
            }
@@ -2077,7 +2081,7 @@ bool AudioFlinger::MixerThread::threadLoop()
            mInWrite = false;
            nsecs_t now = systemTime();
            nsecs_t delta = now - mLastWriteTime;
            if (delta > maxPeriod) {
            if (!mStandby && delta > maxPeriod) {
                mNumDelayedWrites++;
                if ((now - lastWarning) > kWarningThrottle) {
                    LOGW("write blocked for %llu msecs, %d delayed writes, thread %p",