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

Commit 20bd30ba authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Add latency information for RecordThread

Test: audioflinger dumpsys
Bug: 80493498
Change-Id: I52e481432b73f019c4eea06f1e11e41ad8a79b5c
parent ace6feea
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7333,6 +7333,13 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a
        (void)input->stream->dump(fd);
    }

    const double latencyMs = - mTimestamp.getOutputServerLatencyMs(mSampleRate);
    if (latencyMs != 0.) {
        dprintf(fd, "  NormalRecord latency ms: %.2lf\n", latencyMs);
    } else {
        dprintf(fd, "  NormalRecord latency ms: unavail\n");
    }

    dprintf(fd, "  Fast capture thread: %s\n", hasFastCapture() ? "yes" : "no");
    dprintf(fd, "  Fast track available: %s\n", mFastTrackAvail ? "yes" : "no");