diff options
author | Glenn Kasten <gkasten@google.com> | 2014-07-03 10:20:00 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-07-17 12:13:05 -0700 |
commit | 6e6704c06d61bc356e30c164081e5bcffb37920c (patch) | |
tree | 825e014f01a7eb5a2f3282965d2a5ba9a21b4071 | |
parent | 7b24ee381e806dcb53308c1cafc8a45f4e2d8300 (diff) | |
download | frameworks_av-6e6704c06d61bc356e30c164081e5bcffb37920c.zip frameworks_av-6e6704c06d61bc356e30c164081e5bcffb37920c.tar.gz frameworks_av-6e6704c06d61bc356e30c164081e5bcffb37920c.tar.bz2 |
Improve dumpsys for capture threads
Show per-track sample rate, and whether there is a fast capture thread
Change-Id: If6a08a40d1eeba0690aa8da3c541f845ec101b7f
-rwxr-xr-x | services/audioflinger/Threads.cpp | 4 | ||||
-rw-r--r-- | services/audioflinger/Tracks.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 0f01b02..e17aa98 100755 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -4783,7 +4783,7 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger, , mPipeFramesP2(0) // mPipeMemory // mFastCaptureNBLogWriter - , mFastTrackAvail(true) + , mFastTrackAvail(false) { snprintf(mName, kNameLength, "AudioIn_%X", id); mNBLogWriter = audioFlinger->newWriter_l(kLogSize, mName); @@ -4895,6 +4895,7 @@ AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger, // FIXME #endif + mFastTrackAvail = true; } failed: ; @@ -5745,6 +5746,7 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a } else { dprintf(fd, " No active record clients\n"); } + dprintf(fd, " Fast capture thread: %s\n", hasFastCapture() ? "yes" : "no"); dprintf(fd, " Fast track available: %s\n", mFastTrackAvail ? "yes" : "no"); dumpBase(fd, args); diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index cacb066..eb3e6b4 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -1987,12 +1987,12 @@ void AudioFlinger::RecordThread::RecordTrack::invalidate() /*static*/ void AudioFlinger::RecordThread::RecordTrack::appendDumpHeader(String8& result) { - result.append(" Active Client Fmt Chn mask Session S Server fCount Resampling\n"); + result.append(" Active Client Fmt Chn mask Session S Server fCount SRate\n"); } void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size, bool active) { - snprintf(buffer, size, " %6s %6u %3u %08X %7u %1d %08X %6zu %10d\n", + snprintf(buffer, size, " %6s %6u %3u %08X %7u %1d %08X %6zu %5u\n", active ? "yes" : "no", (mClient == 0) ? getpid_cached : mClient->pid(), mFormat, @@ -2001,7 +2001,7 @@ void AudioFlinger::RecordThread::RecordTrack::dump(char* buffer, size_t size, bo mState, mCblk->mServer, mFrameCount, - mResampler != NULL); + mSampleRate); } |