diff options
author | Eric Laurent <elaurent@google.com> | 2012-04-13 18:48:06 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2012-04-20 13:51:53 -0700 |
commit | b2971bf2ae4e9da3155559aa134e3aa6c2b216a4 (patch) | |
tree | 89424b57fc117fad7d2a4f927822e1b8438b8a13 /include | |
parent | 0977cf534ffb71c2abac622716510ae8ea25f3e9 (diff) | |
download | hardware_libhardware_legacy-b2971bf2ae4e9da3155559aa134e3aa6c2b216a4.zip hardware_libhardware_legacy-b2971bf2ae4e9da3155559aa134e3aa6c2b216a4.tar.gz hardware_libhardware_legacy-b2971bf2ae4e9da3155559aa134e3aa6c2b216a4.tar.bz2 |
audio policy: add support for deep audio buffers
Added definitions for parsing deep buffer flags in output profiles.
Make sure that sound start is delayed enough to allow
duck/mute effect to apply before starting a notification on an output
with lower latency.
Change-Id: I1578e245da19d1a0f9ec62a2ea6dddaf82ea282b
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index bf79a9a..d56247b 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -329,8 +329,9 @@ protected: virtual audio_devices_t getDeviceForStrategy(routing_strategy strategy, bool fromCache); - // change the route of the specified output - void setOutputDevice(audio_io_handle_t output, + // change the route of the specified output. Returns the number of ms we have slept to + // allow new routing to take effect in certain cases. + uint32_t setOutputDevice(audio_io_handle_t output, audio_devices_t device, bool force = false, int delayMs = 0); @@ -441,7 +442,11 @@ protected: bool vectorsEqual(SortedVector<audio_io_handle_t>& outputs1, SortedVector<audio_io_handle_t>& outputs2); - void checkDeviceMuteStrategies(AudioOutputDescriptor *outputDesc, + // mute/unmute strategies using an incompatible device combination + // if muting, wait for the audio in pcm buffer to be drained before proceeding + // if unmuting, unmute only after the specified delay + // Returns the number of ms waited + uint32_t checkDeviceMuteStrategies(AudioOutputDescriptor *outputDesc, uint32_t delayMs); audio_io_handle_t selectOutput(const SortedVector<audio_io_handle_t>& outputs, |