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

Commit ddb33213 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Improve audio logs and dumpsys media.audio_flinger" into oc-dev

parents a4fe7d9c 6d8018f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -645,10 +645,10 @@ status_t AudioRecord::openRecord_l(const Modulo<uint32_t> &epoch, const String16
    mAwaitBoost = false;
    if (mFlags & AUDIO_INPUT_FLAG_FAST) {
        if (flags & AUDIO_INPUT_FLAG_FAST) {
            ALOGI("AUDIO_INPUT_FLAG_FAST successful; frameCount %zu", frameCount);
            ALOGI("AUDIO_INPUT_FLAG_FAST successful; frameCount %zu -> %zu", frameCount, temp);
            mAwaitBoost = true;
        } else {
            ALOGW("AUDIO_INPUT_FLAG_FAST denied by server; frameCount %zu", frameCount);
            ALOGW("AUDIO_INPUT_FLAG_FAST denied by server; frameCount %zu -> %zu", frameCount, temp);
            mFlags = (audio_input_flags_t) (mFlags & ~(AUDIO_INPUT_FLAG_FAST |
                    AUDIO_INPUT_FLAG_RAW));
            continue;   // retry
+3 −2
Original line number Diff line number Diff line
@@ -1479,12 +1479,13 @@ status_t AudioTrack::createTrack_l()
    mAwaitBoost = false;
    if (mFlags & AUDIO_OUTPUT_FLAG_FAST) {
        if (flags & AUDIO_OUTPUT_FLAG_FAST) {
            ALOGV("AUDIO_OUTPUT_FLAG_FAST successful; frameCount %zu", frameCount);
            ALOGI("AUDIO_OUTPUT_FLAG_FAST successful; frameCount %zu -> %zu", frameCount, temp);
            if (!mThreadCanCallJava) {
                mAwaitBoost = true;
            }
        } else {
            ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount %zu", frameCount);
            ALOGW("AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount %zu -> %zu", frameCount,
                    temp);
        }
    }
    mFlags = flags;
+4 −2
Original line number Diff line number Diff line
@@ -696,7 +696,8 @@ status_t ServerProxy::obtainBuffer(Buffer* buffer, bool ackFlush)
    ssize_t filled = rear - front;
    // pipe should not already be overfull
    if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
        ALOGE("Shared memory control block is corrupt (filled=%zd); shutting down", filled);
        ALOGE("Shared memory control block is corrupt (filled=%zd, mFrameCount=%zu); shutting down",
                filled, mFrameCount);
        mIsShutdown = true;
    }
    if (mIsShutdown) {
@@ -820,7 +821,8 @@ size_t AudioTrackServerProxy::framesReady()
    ssize_t filled = rear - cblk->u.mStreaming.mFront;
    // pipe should not already be overfull
    if (!(0 <= filled && (size_t) filled <= mFrameCount)) {
        ALOGE("Shared memory control block is corrupt (filled=%zd); shutting down", filled);
        ALOGE("Shared memory control block is corrupt (filled=%zd, mFrameCount=%zu); shutting down",
                filled, mFrameCount);
        mIsShutdown = true;
        return 0;
    }
+1 −1
Original line number Diff line number Diff line
@@ -2049,7 +2049,7 @@ status_t AudioFlinger::openOutput(audio_module_handle_t module,

            // the first primary output opened designates the primary hw device
            if ((mPrimaryHardwareDev == NULL) && (flags & AUDIO_OUTPUT_FLAG_PRIMARY)) {
                ALOGI("Using module %d has the primary audio interface", module);
                ALOGI("Using module %d as the primary audio interface", module);
                mPrimaryHardwareDev = playbackThread->getOutput()->audioHwDev;

                AutoMutex lock(mHardwareLock);
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ bool FastThread::threadLoop()
                }
                int policy = sched_getscheduler(0) & ~SCHED_RESET_ON_FORK;
                if (!(policy == SCHED_FIFO || policy == SCHED_RR)) {
                    ALOGE("did not receive expected priority boost");
                    ALOGE("did not receive expected priority boost on time");
                }
                // This may be overly conservative; there could be times that the normal mixer
                // requests such a brief cold idle that it doesn't require resetting this flag.
Loading