7#ifndef __SOF_SOURCE_API_H__
8#define __SOF_SOURCE_API_H__
10#include <module/audio/source_api.h>
22void source_init(
struct sof_source *source,
const struct source_ops *ops,
23 struct sof_audio_stream_params *audio_stream_params);
42 enum sof_ipc_frame valid_sample_fmt);
76 const uint32_t byte_align,
77 const uint32_t frame_align_req);
size_t source_get_num_of_processed_bytes(struct sof_source *source)
Get total number of bytes processed by the source (meaning - freed by source_release_data()).
int source_set_valid_fmt(struct sof_source *source, enum sof_ipc_frame valid_sample_fmt)
int source_set_underrun(struct sof_source *source, bool underrun_permitted)
void source_init(struct sof_source *source, const struct source_ops *ops, struct sof_audio_stream_params *audio_stream_params)
Init of the API, must be called before any operation.
uint32_t source_get_id(struct sof_source *source)
int source_set_frm_fmt(struct sof_source *source, enum sof_ipc_frame frm_fmt)
set of functions for setting audio parameters
int source_set_channels(struct sof_source *source, unsigned int channels)
void source_reset_num_of_processed_bytes(struct sof_source *source)
sets counter of total number of bytes processed to zero
int source_set_buffer_fmt(struct sof_source *source, uint32_t buffer_fmt)
int source_set_alignment_constants(struct sof_source *source, const uint32_t byte_align, const uint32_t frame_align_req)
Set frame_align_shift and frame_align of stream according to byte_align and frame_align_req alignment...
void source_set_min_available(struct sof_source *source, size_t min_available)
int source_set_rate(struct sof_source *source, unsigned int rate)
bool source_get_underrun(struct sof_source *source)
set of functions for retrieve audio parameters
int source_set_params(struct sof_source *source, struct sof_ipc_stream_params *params, bool force_update)
initial set of audio parameters, provided in sof_ipc_stream_params