summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Effects.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-09-12 17:37:00 -0700
committerEric Laurent <elaurent@google.com>2013-09-18 11:52:40 -0700
commit5baf2af52cd186633b7173196c1e4a4cd3435f22 (patch)
tree9c6752456812c4a927574a71e1d2ec2495ff6ce3 /services/audioflinger/Effects.h
parent9a98b6de791aeb130192df10744f5b35f8b6ef1a (diff)
downloadframeworks_av-5baf2af52cd186633b7173196c1e4a4cd3435f22.zip
frameworks_av-5baf2af52cd186633b7173196c1e4a4cd3435f22.tar.gz
frameworks_av-5baf2af52cd186633b7173196c1e4a4cd3435f22.tar.bz2
more support for audio effect offload
Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
Diffstat (limited to 'services/audioflinger/Effects.h')
-rw-r--r--services/audioflinger/Effects.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index bac50f2..c35cff0 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -111,6 +111,10 @@ public:
bool purgeHandles();
void lock() { mLock.lock(); }
void unlock() { mLock.unlock(); }
+ bool isOffloadable() const
+ { return (mDescriptor.flags & EFFECT_FLAG_OFFLOAD_SUPPORTED) != 0; }
+ status_t setOffloaded(bool offloaded, audio_io_handle_t io);
+ bool isOffloaded() const;
void dump(int fd, const Vector<String16>& args);
@@ -144,6 +148,7 @@ mutable Mutex mLock; // mutex for process, commands and handl
// sending disable command.
uint32_t mDisableWaitCnt; // current process() calls count during disable period.
bool mSuspended; // effect is suspended: temporarily disabled by framework
+ bool mOffloaded; // effect is currently offloaded to the audio DSP
};
// The EffectHandle class implements the IEffect interface. It provides resources
@@ -303,8 +308,8 @@ public:
void clearInputBuffer();
- // At least one effect in the chain is enabled
- bool isEnabled();
+ // At least one non offloadable effect in the chain is enabled
+ bool isNonOffloadableEnabled();
void dump(int fd, const Vector<String16>& args);