am 0a381a37: audio: move struct audio_config definition to audio.h
* commit '0a381a379d00f708a0dfe4da758697128177749a':
audio: move struct audio_config definition to audio.h
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 @@
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;