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

Commit 7f39f56e authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Do not show latency for non-PCM record in dumpsys

Test: Check AudioFlinger dumpsys during MSD direct record
Bug: 112388863
Change-Id: Id404c70af0c0e23a1e349522568b20f50573b1e9
(cherry picked from commit 2ceaf3dee96d1696b315afdee9ffc0df662f88d8)
parent a2948899
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7466,7 +7466,8 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a
        (void)input->stream->dump(fd);
    }

    const double latencyMs = - mTimestamp.getOutputServerLatencyMs(mSampleRate);
    const double latencyMs = audio_is_linear_pcm(mFormat)
            ? - mTimestamp.getOutputServerLatencyMs(mSampleRate) : 0.;
    if (latencyMs != 0.) {
        dprintf(fd, "  NormalRecord latency ms: %.2lf\n", latencyMs);
    } else {
+1 −1
Original line number Diff line number Diff line
@@ -1720,7 +1720,7 @@ AudioFlinger::RecordThread::RecordTrack::RecordTrack(
        thread->mFastTrackAvail = false;
    } else {
        // TODO: only Normal Record has timestamps (Fast Record does not).
        mServerLatencySupported = true;
        mServerLatencySupported = audio_is_linear_pcm(mFormat);
    }
#ifdef TEE_SINK
    mTee.setId(std::string("_") + std::to_string(mThreadIoHandle)