summaryrefslogtreecommitdiffstats
path: root/include/hardware/audio_policy.h
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2013-03-25 16:11:44 +0000
committerEric Laurent <elaurent@google.com>2013-06-27 17:16:24 -0700
commitf37f187bbac1fd7bf884eb3ea5c47aa78cb68cdc (patch)
tree30ee74ed74cb7b1815e408923f119c6931d91cf9 /include/hardware/audio_policy.h
parent6a96df3b335f8fc1b514fdcf95e8ded350fcf2b5 (diff)
downloadhardware_libhardware-f37f187bbac1fd7bf884eb3ea5c47aa78cb68cdc.zip
hardware_libhardware-f37f187bbac1fd7bf884eb3ea5c47aa78cb68cdc.tar.gz
hardware_libhardware-f37f187bbac1fd7bf884eb3ea5c47aa78cb68cdc.tar.bz2
Add defines and support for audio offload
- Add non-blocking write support, set_callback() function - Add pause, resume, flush, drain functions to audio output stream - Add audio parameter defines for compressed audio metadata - Extend audio_config_t to include an audio_offload_info_t field - Add is_offload_supported() function to test whether there is hardware decode support for a given compressed audio format - Change audio_stream_frame_size() to handle offloaded streams. For an offloaded stream the size is always counted in bytes (frame size == 1) and the number of channels is irrelevant. Change-Id: I5b82c3fdcfa1456502d0042888f166bf02d8d54b Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
Diffstat (limited to 'include/hardware/audio_policy.h')
-rw-r--r--include/hardware/audio_policy.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h
index c635ebf..4e75e02 100644
--- a/include/hardware/audio_policy.h
+++ b/include/hardware/audio_policy.h
@@ -133,7 +133,8 @@ struct audio_policy {
uint32_t samplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- audio_output_flags_t flags);
+ audio_output_flags_t flags,
+ const audio_offload_info_t *offloadInfo);
/* indicates to the audio policy manager that the output starts being used
* by corresponding stream. */
@@ -241,6 +242,10 @@ struct audio_policy {
/* dump state */
int (*dump)(const struct audio_policy *pol, int fd);
+
+ /* check if offload is possible for given sample rate, bitrate, duration, ... */
+ bool (*is_offload_supported)(const struct audio_policy *pol,
+ const audio_offload_info_t *info);
};
/* audio hw module handle used by load_hw_module(), open_output_on_module()
@@ -390,7 +395,8 @@ struct audio_policy_service_ops {
audio_format_t *pFormat,
audio_channel_mask_t *pChannelMask,
uint32_t *pLatencyMs,
- audio_output_flags_t flags);
+ audio_output_flags_t flags,
+ const audio_offload_info_t *offloadInfo);
/* Opens an audio input on a particular HW module.
*