diff options
author | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> | 2013-03-25 16:18:26 +0000 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2013-06-27 17:16:25 -0700 |
commit | b4d07b97d23cfaffe22c7859ad7c45e168a7df0e (patch) | |
tree | 1f36a97d335c3d7b597a43f89434e8e4691267ad /include/hardware_legacy/AudioPolicyManagerBase.h | |
parent | 324157de1a8dd109bcc2fb2e8163939dfbf1e860 (diff) | |
download | hardware_libhardware_legacy-b4d07b97d23cfaffe22c7859ad7c45e168a7df0e.zip hardware_libhardware_legacy-b4d07b97d23cfaffe22c7859ad7c45e168a7df0e.tar.gz hardware_libhardware_legacy-b4d07b97d23cfaffe22c7859ad7c45e168a7df0e.tar.bz2 |
Add audio policy API changes for audio offload
Changes to the API of audio policy for audio offload support:
- Add isOffloadSupported() function
- Add OUTPUT_FLAG_OFFLOAD
- Extend AudioOutputDescriptor to include a sharing count for direct outputs
- Pass audio_offload_info_t when opening output streams
Change-Id: I5ad26418fdb286eb7ae299d586dd1fd525d48ab9
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
Diffstat (limited to 'include/hardware_legacy/AudioPolicyManagerBase.h')
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index 7ba71e7..cb2a7fa 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -87,7 +87,8 @@ public: uint32_t format = AudioSystem::FORMAT_DEFAULT, uint32_t channels = 0, AudioSystem::output_flags flags = - AudioSystem::OUTPUT_FLAG_INDIRECT); + AudioSystem::OUTPUT_FLAG_INDIRECT, + const audio_offload_info_t *offloadInfo = NULL); virtual status_t startOutput(audio_io_handle_t output, AudioSystem::stream_type stream, int session = 0); @@ -141,6 +142,8 @@ public: virtual status_t dump(int fd); + virtual bool isOffloadSupported(const audio_offload_info_t& offloadInfo); + protected: enum routing_strategy { @@ -247,6 +250,7 @@ protected: audio_devices_t device() const; void changeRefCount(AudioSystem::stream_type stream, int delta); + bool isDuplicated() const { return (mOutput1 != NULL && mOutput2 != NULL); } audio_devices_t supportedDevices(); uint32_t latency(); |