summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Effects.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-09-25 18:50:33 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2013-09-26 11:43:58 -0700
commitfed6292af65a0b97b583ecbd3c232b3811a3f37b (patch)
tree24d1dc7750659a108dd48ec46ba89a9a49bd019d /services/audioflinger/Effects.cpp
parentd2ac3144e201398340cc5b9bb36e5efe39edd9eb (diff)
downloadframeworks_av-fed6292af65a0b97b583ecbd3c232b3811a3f37b.zip
frameworks_av-fed6292af65a0b97b583ecbd3c232b3811a3f37b.tar.gz
frameworks_av-fed6292af65a0b97b583ecbd3c232b3811a3f37b.tar.bz2
Don't call audio effect process on offloaded playback threads
An audio effect process command is not meant to be called for playback threads belonging to offloaded playback. Bug 10933817 Change-Id: Idc7b6a0224791bbf8d61648474d3c288617c498f
Diffstat (limited to 'services/audioflinger/Effects.cpp')
-rw-r--r--services/audioflinger/Effects.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 0ca2107..6e0354d 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -1279,9 +1279,10 @@ void AudioFlinger::EffectChain::process_l()
}
bool isGlobalSession = (mSessionId == AUDIO_SESSION_OUTPUT_MIX) ||
(mSessionId == AUDIO_SESSION_OUTPUT_STAGE);
- // always process effects unless no more tracks are on the session and the effect tail
- // has been rendered
- bool doProcess = true;
+ // never process effects when:
+ // - on an OFFLOAD thread
+ // - no more tracks are on the session and the effect tail has been rendered
+ bool doProcess = (thread->type() != ThreadBase::OFFLOAD);
if (!isGlobalSession) {
bool tracksOnSession = (trackCnt() != 0);