summaryrefslogtreecommitdiffstats
path: root/include/media/IAudioPolicyService.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-08-10 10:37:50 -0700
committerEric Laurent <elaurent@google.com>2011-08-11 14:33:45 -0700
commitdb7c079f284f6e91266f6653ae0ec198b1c5006e (patch)
tree08c3569af421bc760cb7b81f611ee0959c4b7b9d /include/media/IAudioPolicyService.h
parent8adb83ba4837b3c9de1a4221a5ca4c371a62e38c (diff)
downloadframeworks_av-db7c079f284f6e91266f6653ae0ec198b1c5006e.zip
frameworks_av-db7c079f284f6e91266f6653ae0ec198b1c5006e.tar.gz
frameworks_av-db7c079f284f6e91266f6653ae0ec198b1c5006e.tar.bz2
Audio effects: track CPU and memory use separately
Before this change, CPU and memory usage for an audio effect were registered and checked against the limit by audio policy manager upon effect instantiation. Even if an effect was not enabled it would prevent another effect to be created if the CPU load budget was exceeded, which was too restrictive. This change adds a method to register/unregister CPU load only when an effect is enabled or disabled. It also adds a mechanism to place all effects on the global output mix in suspend state (disabled) when an effect is enabled on a specific session. This will allow applications using session effects to have the priority over others using global effects. Also fixes some issues with suspend/restore mechanism: - avoid taking actions when an effect is disconnected and was not enabled. - do not remove a session from the suspended sessions list when corresponding effect chain is destroyed. Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
Diffstat (limited to 'include/media/IAudioPolicyService.h')
-rw-r--r--include/media/IAudioPolicyService.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h
index ed265e1..9807cbe 100644
--- a/include/media/IAudioPolicyService.h
+++ b/include/media/IAudioPolicyService.h
@@ -84,6 +84,7 @@ public:
int session,
int id) = 0;
virtual status_t unregisterEffect(int id) = 0;
+ virtual status_t setEffectEnabled(int id, bool enabled) = 0;
virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const = 0;
virtual status_t queryDefaultPreProcessing(int audioSession,
effect_descriptor_t *descriptors,