Sound Open Firmware
Loading...
Searching...
No Matches
sink_source_utils.h File Reference
Include dependency graph for sink_source_utils.h:

Go to the source code of this file.

Functions

int source_to_sink_copy (struct sof_source *source, struct sof_sink *sink, bool free, size_t size)
 copy bytes from source to sink
int sink_fill_with_silence (struct sof_sink *sink, size_t size)
 fill sink with silence (zeros)
int source_drop_data (struct sof_source *source, size_t size)
 drop data from source
static size_t source_sink_avail_frames_aligned (struct sof_source *source, struct sof_sink *sink)
 Computes maximum number of frames aligned with the source align criteria that can be copied from source to sink, verifying the number of available source frames vs.

Function Documentation

◆ sink_fill_with_silence()

int sink_fill_with_silence ( struct sof_sink * sink,
size_t size )

fill sink with silence (zeros)

Parameters
sinkthe target to be filled with silence
sizenumber of bytes to be filled

◆ source_drop_data()

int source_drop_data ( struct sof_source * source,
size_t size )

drop data from source

Parameters
sourcethe source of data to be dropped
sizenumber of bytes to be dropped

◆ source_sink_avail_frames_aligned()

size_t source_sink_avail_frames_aligned ( struct sof_source * source,
struct sof_sink * sink )
inlinestatic

Computes maximum number of frames aligned with the source align criteria that can be copied from source to sink, verifying the number of available source frames vs.

free space available in sink.

Parameters
sourcethe data source
sinkthe data sink
Returns
Number of aligned frames available for processing.

◆ source_to_sink_copy()

int source_to_sink_copy ( struct sof_source * source,
struct sof_sink * sink,
bool free,
size_t size )

copy bytes from source to sink

Parameters
sourcethe data source
sinkthe data target
freeif true, data from source will be freed if false, data will remain in the source
sizenumber of bytes to be copied