Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a381a37 authored by Eric Laurent's avatar Eric Laurent Committed by Rom Lemarchand
Browse files

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
parent dd3363cd
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -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;