summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-05-17 15:47:18 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-17 15:47:18 -0700
commit552477608b137fb66af126655c6865207a82d888 (patch)
treea0c3c8704d8a5dffc900a01255acd63e648e15c4 /services
parentc059bd4246c1b3944965be921e5b334d51cd236c (diff)
parent88cbea8a918bbaf5e06e48aadd5af5e81d58d232 (diff)
Merge "Display pipe underrun counters in dumpsys" into jb-dev
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp6
-rw-r--r--services/audioflinger/AudioFlinger.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 93838643..7e15823e 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1579,6 +1579,12 @@ status_t AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>
}
}
write(fd, result.string(), result.size());
+
+ // These values are "raw"; they will wrap around. See prepareTracks_l() for a better way.
+ FastTrackUnderruns underruns = getFastTrackUnderruns(0);
+ fdprintf(fd, "Normal mixer raw underrun counters: partial=%u empty=%u\n",
+ underruns.mBitFields.mPartial, underruns.mBitFields.mEmpty);
+
return NO_ERROR;
}
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 8820a92e..de3561d2 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -1170,8 +1170,7 @@ public:
public:
virtual bool hasFastMixer() const { return mFastMixer != NULL; }
virtual FastTrackUnderruns getFastTrackUnderruns(size_t fastIndex) const {
- ALOG_ASSERT(0 < fastIndex &&
- fastIndex < FastMixerState::kMaxFastTracks);
+ ALOG_ASSERT(fastIndex < FastMixerState::kMaxFastTracks);
return mFastMixerDumpState.mTracks[fastIndex].mUnderruns;
}
};