Sound Open Firmware
Loading...
Searching...
No Matches
source_ops Struct Reference

this is a definition of internals of source API More...

#include <src/include/module/audio/source_api.h>

Data Fields

size_t(* get_data_available )(struct sof_source *source)
 see comment of source_get_data_available()
 
int(* get_data )(struct sof_source *source, size_t req_size, void const **data_ptr, void const **buffer_start, size_t *buffer_size)
 see comment of source_get_data_available()
 
int(* release_data )(struct sof_source *source, size_t free_size)
 see comment of source_release_data()
 
int(* get_state )(struct sof_source *source)
 OPTIONAL: get the state of the component producing data to this source.
 
int(* on_audio_format_set )(struct sof_source *source)
 OPTIONAL: Notification to the source implementation about changes in audio format.
 
int(* audio_set_ipc_params )(struct sof_source *source, struct sof_ipc_stream_params *params, bool force_update)
 OPTIONAL see source_set_params comments.
 
int(* set_alignment_constants )(struct sof_source *source, const uint32_t byte_align, const uint32_t frame_align_req)
 OPTIONAL see comment for source_set_alignment_constants.
 
int(* set_size )(struct sof_source *source, size_t size)
 OPTIONAL see comment for source_set_size.
 
int(* on_bind )(struct sof_source *source, struct processing_module *module)
 OPTIONAL events called when a module is starting / finishing using of the API on the core that the module and API will executed on.
 
int(* on_unbind )(struct sof_source *source)
 

Detailed Description

this is a definition of internals of source API

The clients of stream API should use access functions provided below!

Field Documentation

◆ audio_set_ipc_params

int(* source_ops::audio_set_ipc_params) (struct sof_source *source, struct sof_ipc_stream_params *params, bool force_update)

OPTIONAL see source_set_params comments.

◆ get_data

int(* source_ops::get_data) (struct sof_source *source, size_t req_size, void const **data_ptr, void const **buffer_start, size_t *buffer_size)

◆ get_data_available

size_t(* source_ops::get_data_available) (struct sof_source *source)

◆ get_state

int(* source_ops::get_state) (struct sof_source *source)

OPTIONAL: get the state of the component producing data to this source.

see comment of source_get_comp_state()

◆ on_audio_format_set

int(* source_ops::on_audio_format_set) (struct sof_source *source)

OPTIONAL: Notification to the source implementation about changes in audio format.

Once any of *audio_stream_params elements changes, the implementation of source may need to perform some extra operations. This callback will be called immediately after any change

Return values
0if success, negative if new parameteres are not supported

◆ on_bind

int(* source_ops::on_bind) (struct sof_source *source, struct processing_module *module)

OPTIONAL events called when a module is starting / finishing using of the API on the core that the module and API will executed on.

◆ on_unbind

int(* source_ops::on_unbind) (struct sof_source *source)

◆ release_data

int(* source_ops::release_data) (struct sof_source *source, size_t free_size)

see comment of source_release_data()

◆ set_alignment_constants

int(* source_ops::set_alignment_constants) (struct sof_source *source, const uint32_t byte_align, const uint32_t frame_align_req)

OPTIONAL see comment for source_set_alignment_constants.

◆ set_size

int(* source_ops::set_size) (struct sof_source *source, size_t size)

OPTIONAL see comment for source_set_size.


The documentation for this struct was generated from the following file: