diff options
author | Eric Laurent <elaurent@google.com> | 2010-07-13 05:01:51 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-07-20 09:31:47 -0700 |
commit | d2b227e76033d8c44b71d2982028a63436d3fe84 (patch) | |
tree | 42f4a00f4c7a2d55e2593ccc352808dcf5068bbb /include/hardware_legacy/AudioPolicyInterface.h | |
parent | 0df071ad05d1c1dae6b6aaa6122146fa679c7a12 (diff) | |
download | hardware_libhardware_legacy-d2b227e76033d8c44b71d2982028a63436d3fe84.zip hardware_libhardware_legacy-d2b227e76033d8c44b71d2982028a63436d3fe84.tar.gz hardware_libhardware_legacy-d2b227e76033d8c44b71d2982028a63436d3fe84.tar.bz2 |
Audio policy manager changes for audio effects
Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.
Change-Id: I3467e64035387cc5272266b1318a5ed788958374
Diffstat (limited to 'include/hardware_legacy/AudioPolicyInterface.h')
-rw-r--r-- | include/hardware_legacy/AudioPolicyInterface.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h index bd3c4b1..fe0bdec 100644 --- a/include/hardware_legacy/AudioPolicyInterface.h +++ b/include/hardware_legacy/AudioPolicyInterface.h @@ -91,9 +91,13 @@ public: uint32_t channels = 0, AudioSystem::output_flags flags = AudioSystem::OUTPUT_FLAG_INDIRECT) = 0; // indicates to the audio policy manager that the output starts being used by corresponding stream. - virtual status_t startOutput(audio_io_handle_t output, AudioSystem::stream_type stream) = 0; + virtual status_t startOutput(audio_io_handle_t output, + AudioSystem::stream_type stream, + int session = 0) = 0; // indicates to the audio policy manager that the output stops being used by corresponding stream. - virtual status_t stopOutput(audio_io_handle_t output, AudioSystem::stream_type stream) = 0; + virtual status_t stopOutput(audio_io_handle_t output, + AudioSystem::stream_type stream, + int session = 0) = 0; // releases the output. virtual void releaseOutput(audio_io_handle_t output) = 0; @@ -124,6 +128,18 @@ public: // retreive current volume index for the specified stream virtual status_t getStreamVolumeIndex(AudioSystem::stream_type stream, int *index) = 0; + // return the strategy corresponding to a given stream type + virtual uint32_t getStrategyForStream(AudioSystem::stream_type stream) = 0; + + // Audio effect management + virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0; + virtual status_t registerEffect(effect_descriptor_t *desc, + audio_io_handle_t output, + uint32_t strategy, + int session, + int id) = 0; + virtual status_t unregisterEffect(int id) = 0; + //dump state virtual status_t dump(int fd) = 0; }; @@ -195,6 +211,12 @@ public: // set down link audio volume. virtual status_t setVoiceVolume(float volume, int delayMs = 0) = 0; + + // move effect to the specified output + virtual status_t moveEffects(int session, + audio_io_handle_t srcOutput, + audio_io_handle_t dstOutput) = 0; + }; extern "C" AudioPolicyInterface* createAudioPolicyManager(AudioPolicyClientInterface *clientInterface); |