diff options
author | Glenn Kasten <gkasten@google.com> | 2012-09-27 13:49:02 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-09-30 13:13:11 -0700 |
commit | 087dd8e7232e4c009e9121ab7e8c37985522c9ad (patch) | |
tree | bc282d9d295339220829c2cdade7a3eca5fb898e /services/audioflinger | |
parent | 4769f0b873030bbaa6977fe18696961d1d1b26ba (diff) | |
download | frameworks_av-087dd8e7232e4c009e9121ab7e8c37985522c9ad.zip frameworks_av-087dd8e7232e4c009e9121ab7e8c37985522c9ad.tar.gz frameworks_av-087dd8e7232e4c009e9121ab7e8c37985522c9ad.tar.bz2 |
Disable audio watchdog
It's not critical, and is wasting power
Bug: 7241714
Change-Id: I6ad4375f0000c92529688723dbe0ff0caa809c5d
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/Android.mk | 4 | ||||
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk index b9e3238..7a1c020 100644 --- a/services/audioflinger/Android.mk +++ b/services/audioflinger/Android.mk @@ -73,7 +73,7 @@ LOCAL_CFLAGS += -UFAST_TRACKS_AT_NON_NATIVE_SAMPLE_RATE # LOCAL_CFLAGS += -DTEE_SINK_FRAMES=0x200000 # uncomment to enable the audio watchdog -LOCAL_SRC_FILES += AudioWatchdog.cpp -LOCAL_CFLAGS += -DAUDIO_WATCHDOG +# LOCAL_SRC_FILES += AudioWatchdog.cpp +# LOCAL_CFLAGS += -DAUDIO_WATCHDOG include $(BUILD_SHARED_LIBRARY) 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 @@ AudioFlinger::MixerThread::~MixerThread() 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 @@ void AudioFlinger::MixerThread::threadLoop_write() 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 @@ void AudioFlinger::MixerThread::threadLoop_standby() if (kUseFastMixer == FastMixer_Dynamic) { mNormalSink = mOutputSink; } +#ifdef AUDIO_WATCHDOG if (mAudioWatchdog != 0) { mAudioWatchdog->pause(); } +#endif } else { sq->end(false /*didModify*/); } @@ -3330,9 +3336,11 @@ track_is_ready: ; 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 @@ void AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& ar } } +#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 |