diff options
author | Eric Laurent <elaurent@google.com> | 2014-07-27 16:18:21 -0700 |
---|---|---|
committer | Rom Lemarchand <romlem@google.com> | 2014-07-28 19:18:39 +0000 |
commit | 0a381a379d00f708a0dfe4da758697128177749a (patch) | |
tree | 133eeac1b2fab41445510ecf61eff3ed6dda5885 /include/system | |
parent | dd3363cd21d5dadad0c7fdc5e270636c888e9cf6 (diff) | |
download | system_core-0a381a379d00f708a0dfe4da758697128177749a.zip system_core-0a381a379d00f708a0dfe4da758697128177749a.tar.gz system_core-0a381a379d00f708a0dfe4da758697128177749a.tar.bz2 |
audio: move struct audio_config definition to audio.h
struct audio_config definition moved from hardware/audio.h to
system/audio.h for use inside the framework and not only at the HAL.
Added frame_count field to struct audio_config.
Bug: 14815883.
Change-Id: Ib0e99a60234b8e5302eb882b89e5a021a94ec2cb
Diffstat (limited to 'include/system')
-rw-r--r-- | include/system/audio.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/system/audio.h b/include/system/audio.h index 5db2127..13c8ae5 100644 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -740,6 +740,38 @@ static const audio_offload_info_t AUDIO_INFO_INITIALIZER = { is_streaming: false }; +/* common audio stream configuration parameters + * You should memset() the entire structure to zero before use to + * ensure forward compatibility + */ +struct audio_config { + uint32_t sample_rate; + audio_channel_mask_t channel_mask; + audio_format_t format; + audio_offload_info_t offload_info; + size_t frame_count; +}; +typedef struct audio_config audio_config_t; + +static const audio_config_t AUDIO_CONFIG_INITIALIZER = { + sample_rate: 0, + channel_mask: AUDIO_CHANNEL_NONE, + format: AUDIO_FORMAT_DEFAULT, + offload_info: { + version: AUDIO_OFFLOAD_INFO_VERSION_CURRENT, + size: sizeof(audio_offload_info_t), + sample_rate: 0, + channel_mask: 0, + format: AUDIO_FORMAT_DEFAULT, + stream_type: AUDIO_STREAM_VOICE_CALL, + bit_rate: 0, + duration_us: 0, + has_video: false, + is_streaming: false + }, + frame_count: 0, +}; + /* audio hw module handle functions or structures referencing a module */ typedef int audio_module_handle_t; |