oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
Audio device node factories

Hardware-backed source and sink node factories for the audio graph. More...

Collaboration diagram for Audio device node factories:

Data Structures

struct  ove_audio_device_cfg
 Configuration descriptor for a hardware audio device node. More...
 

Enumerations

enum  ove_audio_transport { OVE_AUDIO_TRANSPORT_I2S , OVE_AUDIO_TRANSPORT_PDM , OVE_AUDIO_TRANSPORT_SDL2 }
 Audio hardware transport type. More...
 

Functions

int ove_audio_device_source (struct ove_audio_graph *g, const struct ove_audio_device_cfg *cfg, const char *name)
 Add a hardware audio source node to the graph.
 
int ove_audio_device_sink (struct ove_audio_graph *g, const struct ove_audio_device_cfg *cfg, const char *name)
 Add a hardware audio sink node to the graph.
 

Detailed Description

Hardware-backed source and sink node factories for the audio graph.

Provides factory functions that register hardware audio devices (I2S, PDM, SDL2) directly as source or sink nodes inside an ove_audio_graph. Each factory allocates and configures the necessary backend driver state and adds the node in one call.

Note
Requires CONFIG_OVE_AUDIO.

Enumeration Type Documentation

◆ ove_audio_transport

Audio hardware transport type.

Selects the low-level audio bus or host API used by a device node.

Enumerator
OVE_AUDIO_TRANSPORT_I2S 

I2S / TDM serial bus (e.g. codec, DAC, ADC).

OVE_AUDIO_TRANSPORT_PDM 

PDM microphone interface.

OVE_AUDIO_TRANSPORT_SDL2 

SDL2 audio (host PC simulation or testing).

Function Documentation

◆ ove_audio_device_source()

int ove_audio_device_source ( struct ove_audio_graph g,
const struct ove_audio_device_cfg cfg,
const char *  name 
)

Add a hardware audio source node to the graph.

Creates a source node backed by the hardware device described in cfg and registers it with the graph. The node captures audio from the selected transport and exposes it as graph output each cycle.

Parameters
[in]gGraph instance in the OVE_AUDIO_GRAPH_IDLE state.
[in]cfgDevice configuration describing the transport and format.
[in]nameHuman-readable node name for diagnostics.
Returns
Non-negative node index on success, negative error code on failure.
Note
Requires CONFIG_OVE_AUDIO.
See also
ove_audio_device_sink, ove_audio_graph_connect

◆ ove_audio_device_sink()

int ove_audio_device_sink ( struct ove_audio_graph g,
const struct ove_audio_device_cfg cfg,
const char *  name 
)

Add a hardware audio sink node to the graph.

Creates a sink node backed by the hardware device described in cfg and registers it with the graph. The node consumes audio from its upstream connection and delivers it to the selected transport each processing cycle.

Parameters
[in]gGraph instance in the OVE_AUDIO_GRAPH_IDLE state.
[in]cfgDevice configuration describing the transport and format.
[in]nameHuman-readable node name for diagnostics.
Returns
Non-negative node index on success, negative error code on failure.
Note
Requires CONFIG_OVE_AUDIO.
See also
ove_audio_device_source, ove_audio_graph_connect