Disable audio watchdog
It's not critical, and is wasting power
Bug: 7241714
Change-Id: I6ad4375f0000c92529688723dbe0ff0caa809c5d
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 1388671..aa30864 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -2419,11 +2419,13 @@
delete fastTrack->mBufferProvider;
sq->end(false /*didModify*/);
delete mFastMixer;
+#ifdef AUDIO_WATCHDOG
if (mAudioWatchdog != 0) {
mAudioWatchdog->requestExit();
mAudioWatchdog->requestExitAndWait();
mAudioWatchdog.clear();
}
+#endif
}
delete mAudioMixer;
}
@@ -2736,9 +2738,11 @@
if (old == -1) {
__futex_syscall3(&mFastMixerFutex, FUTEX_WAKE_PRIVATE, 1);
}
+#ifdef AUDIO_WATCHDOG
if (mAudioWatchdog != 0) {
mAudioWatchdog->resume();
}
+#endif
}
state->mCommand = FastMixerState::MIX_WRITE;
sq->end();
@@ -2815,9 +2819,11 @@
if (kUseFastMixer == FastMixer_Dynamic) {
mNormalSink = mOutputSink;
}
+#ifdef AUDIO_WATCHDOG
if (mAudioWatchdog != 0) {
mAudioWatchdog->pause();
}
+#endif
} else {
sq->end(false /*didModify*/);
}
@@ -3330,9 +3336,11 @@
sq->end(didModify);
sq->push(block);
}
+#ifdef AUDIO_WATCHDOG
if (pauseAudioWatchdog && mAudioWatchdog != 0) {
mAudioWatchdog->pause();
}
+#endif
// Now perform the deferred reset on fast tracks that have stopped
while (resetMask != 0) {
@@ -3654,11 +3662,13 @@
}
}
+#ifdef AUDIO_WATCHDOG
if (mAudioWatchdog != 0) {
// Make a non-atomic copy of audio watchdog dump so it won't change underneath us
AudioWatchdogDump wdCopy = mAudioWatchdogDump;
wdCopy.dump(fd);
}
+#endif
}
uint32_t AudioFlinger::MixerThread::idleSleepTimeUs() const