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

Audio buffer virtual operations table. More...

#include <src/include/sof/audio/audio_buffer.h>

Data Fields

void(* free )(struct sof_audio_buffer *buffer)
 Free all structures allocated by buffer implementation and the buffer itself.
 
void(* reset )(struct sof_audio_buffer *buffer)
 Clean all buffer data and reset positions to initial state, keeping configuration.
 
int(* on_audio_format_set )(struct sof_audio_buffer *buffer)
 Notification callback invoked on audio format modification.
 
int(* audio_set_ipc_params )(struct sof_audio_buffer *buffer, struct sof_ipc_stream_params *params, bool force_update)
 Configure IPC stream parameters on buffer.
 
int(* set_alignment_constants )(struct sof_audio_buffer *buffer, const uint32_t byte_align, const uint32_t frame_align_req)
 Configure alignment constraints on buffer.
 

Detailed Description

Audio buffer virtual operations table.

Field Documentation

◆ audio_set_ipc_params

int(* audio_buffer_ops::audio_set_ipc_params) (struct sof_audio_buffer *buffer, struct sof_ipc_stream_params *params, bool force_update)

Configure IPC stream parameters on buffer.

Parameters
[in,out]bufferBuffer to configure.
[in]paramsStream parameters to apply.
[in]force_updateIf true, overwrite parameters unconditionally.
Returns
0 on success, negative error code on failure.

◆ free

void(* audio_buffer_ops::free) (struct sof_audio_buffer *buffer)

Free all structures allocated by buffer implementation and the buffer itself.

MANDATORY: audio_buffer_free() invokes this callback unconditionally.

Parameters
[in,out]bufferBuffer to free.

◆ on_audio_format_set

int(* audio_buffer_ops::on_audio_format_set) (struct sof_audio_buffer *buffer)

Notification callback invoked on audio format modification.

Parameters
[in,out]bufferBuffer whose format changed.
Return values
0On success.
negativeIf new parameters are not supported.

◆ reset

void(* audio_buffer_ops::reset) (struct sof_audio_buffer *buffer)

Clean all buffer data and reset positions to initial state, keeping configuration.

OPTIONAL: procedure is to be called only when buffer is not in use.

Parameters
[in,out]bufferBuffer to reset.

◆ set_alignment_constants

int(* audio_buffer_ops::set_alignment_constants) (struct sof_audio_buffer *buffer, const uint32_t byte_align, const uint32_t frame_align_req)

Configure alignment constraints on buffer.

Parameters
[in,out]bufferBuffer to configure.
[in]byte_alignByte alignment requirement in bytes.
[in]frame_align_reqFrame alignment requirement in frames.
Returns
0 on success, negative error code on failure.

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