diff options
author | Eric Laurent <elaurent@google.com> | 2011-08-10 20:16:23 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-08-11 09:17:07 -0700 |
commit | 582a15744be109fb630db7dbd1d1bdf22ff44f12 (patch) | |
tree | b8e19d17fc4c27e5ced828a7aceea9c010fdd81c /include/hardware_legacy/AudioPolicyManagerBase.h | |
parent | 33556654af63c3c8f9e8f6c8bd34b2ac15bef6b3 (diff) | |
download | hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.zip hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.tar.gz hardware_libhardware_legacy-582a15744be109fb630db7dbd1d1bdf22ff44f12.tar.bz2 |
AudioPolicyManager: register effect CPU on enable
Audio effect CPU usage is now registered on enable and
unregistered on disable instead of when the effect is
created or destroyed.
Change-Id: Icffcede9558d8d41887278f0efef2df430927381
Diffstat (limited to 'include/hardware_legacy/AudioPolicyManagerBase.h')
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index ddcce71..21cf872 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -117,6 +117,7 @@ public: int session, int id); virtual status_t unregisterEffect(int id); + virtual status_t setEffectEnabled(int id, bool enabled); virtual bool isStreamActive(int stream, uint32_t inPastMs = 0) const; @@ -216,6 +217,7 @@ protected: routing_strategy mStrategy; // routing strategy the effect is associated to int mSession; // audio session the effect is on effect_descriptor_t mDesc; // effect descriptor + bool mEnabled; // enabled state: CPU load being used or not }; void addOutput(audio_io_handle_t id, AudioOutputDescriptor *outputDesc); @@ -307,6 +309,8 @@ protected: int testOutputIndex(audio_io_handle_t output); #endif //AUDIO_POLICY_TEST + status_t setEffectEnabled(EffectDescriptor *pDesc, bool enabled); + AudioPolicyClientInterface *mpClientInterface; // audio policy client interface audio_io_handle_t mHardwareOutput; // hardware output handler audio_io_handle_t mA2dpOutput; // A2DP output handler |