summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2012-09-28 14:49:39 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2012-09-30 11:11:26 -0700
commit2bfc6b42b3733c12485dd51ed95191956abc3e4e (patch)
tree0b8c0eef5d695bd7428f9bd984a2038e3b3ec4b4 /services/audioflinger/AudioFlinger.h
parent003d9f71937070791418bf7efc1f7fe1e4c6b821 (diff)
downloadframeworks_av-2bfc6b42b3733c12485dd51ed95191956abc3e4e.zip
frameworks_av-2bfc6b42b3733c12485dd51ed95191956abc3e4e.tar.gz
frameworks_av-2bfc6b42b3733c12485dd51ed95191956abc3e4e.tar.bz2
bug 7253033 clean up before closing an output
An output can only be closed if there is no lock contention that prevents ThreadBase::exit() from being blocked. If an output device is waiting for an operation to complete (here a write in the remote_submix module, because the pipe is full), signal the module that it's entering the "exiting" state. Change-Id: I8248add60da543e90c25a4c809866cdb26255651
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 45cee0b..49e2b2c 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -682,6 +682,8 @@ private:
// check if some effects must be suspended when an effect chain is added
void checkSuspendOnAddEffectChain_l(const sp<EffectChain>& chain);
+ virtual void preExit() { }
+
friend class AudioFlinger; // for mEffectChains
const type_t mType;
@@ -1050,6 +1052,9 @@ protected:
// is safe to do so. That will drop the final ref count and destroy the tracks.
virtual mixer_state prepareTracks_l(Vector< sp<Track> > *tracksToRemove) = 0;
+ // ThreadBase virtuals
+ virtual void preExit();
+
public:
virtual status_t initCheck() const { return (mOutput == NULL) ? NO_INIT : NO_ERROR; }