summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorvivek mehta <mvivek@codeaurora.org>2015-09-18 10:36:39 -0700
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:25:06 -0600
commit5b0ded9bf189d8e6a22ab1b22316302b1499bb53 (patch)
tree251eabd3ab48ff8e0d36afd8b74fa65f0abb6a1e /services/audioflinger/Threads.cpp
parent957c762710b526579a4354fbd0b83b4c26274e49 (diff)
downloadframeworks_av-5b0ded9bf189d8e6a22ab1b22316302b1499bb53.zip
frameworks_av-5b0ded9bf189d8e6a22ab1b22316302b1499bb53.tar.gz
frameworks_av-5b0ded9bf189d8e6a22ab1b22316302b1499bb53.tar.bz2
Direct_PCM: add support for effects
- add support for effects on direct pcm output Change-Id: I2fbac63c623bf51a03e5e91828369739d33329f3
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index bafc2da..8dfdca6 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -1236,7 +1236,13 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l(
if (lStatus != NO_ERROR) {
goto Exit;
}
- effect->setOffloaded(mType == OFFLOAD, mId);
+
+ bool setVal = false;
+ if (mType == OFFLOAD || (mType == DIRECT && mIsDirectPcm)) {
+ setVal = true;
+ }
+
+ effect->setOffloaded(setVal, mId);
lStatus = chain->addEffect_l(effect);
if (lStatus != NO_ERROR) {
@@ -1320,7 +1326,13 @@ status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect)
return BAD_VALUE;
}
- effect->setOffloaded(mType == OFFLOAD, mId);
+ bool setval = false;
+
+ if ((mType == OFFLOAD) || (mType == DIRECT && mIsDirectPcm)) {
+ setval = true;
+ }
+
+ effect->setOffloaded(setval, mId);
status_t status = chain->addEffect_l(effect);
if (status != NO_ERROR) {