Enable FastTrack timestamps
Bug: 26413951
Change-Id: I99a69241a0bcd69f6bfebf785cac6d9ee1e2cd5f
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index b4c1fdd..b5db9fb 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -589,6 +589,11 @@
return mAudioTrackServerProxy->framesReleased();
}
+void AudioFlinger::PlaybackThread::Track::onTimestamp(const AudioTimestamp ×tamp)
+{
+ mAudioTrackServerProxy->setTimestamp(timestamp);
+}
+
// Don't call for fast tracks; the framesReady() could result in priority inversion
bool AudioFlinger::PlaybackThread::Track::isReady() const {
if (mFillingUpStatus != FS_FILLING || isStopped() || isPausing()) {
@@ -846,7 +851,7 @@
status_t AudioFlinger::PlaybackThread::Track::getTimestamp(AudioTimestamp& timestamp)
{
- // Client should implement this using SSQ; the unpresented frame count in latch is irrelevant
+ // FastTrack timestamps are read through SSQ
if (isFastTrack()) {
return INVALID_OPERATION;
}