29#include "ove/audio_node.h"
35#ifdef CONFIG_OVE_AUDIO
40#define OVE_AUDIO_GRAPH_MAX_NODES 16
42#define OVE_AUDIO_GRAPH_MAX_EDGES 16
128 unsigned int frames_per_period);
161 void *ctx,
const char *name,
180 unsigned int from,
unsigned int to);
266{ (void)g; (void)f;
return -5; }
ove_audio_node_type
Role of a node within the audio graph.
Definition audio_node.h:178
int ove_audio_graph_add_node(struct ove_audio_graph *g, const struct ove_audio_node_ops *ops, void *ctx, const char *name, enum ove_audio_node_type type)
Register a new node in the graph.
int ove_audio_graph_process(struct ove_audio_graph *g)
Execute one processing cycle (app-driven mode).
int ove_audio_graph_start(struct ove_audio_graph *g)
Start the audio graph.
int ove_audio_graph_init(struct ove_audio_graph *g, unsigned int frames_per_period)
Initialise an audio graph.
int ove_audio_graph_get_stats(const struct ove_audio_graph *g, struct ove_audio_graph_stats *stats)
Retrieve a snapshot of graph runtime statistics.
ove_audio_graph_state
Lifecycle state of an audio graph.
Definition audio.h:80
int ove_audio_graph_stop(struct ove_audio_graph *g)
Stop the audio graph.
#define OVE_AUDIO_GRAPH_MAX_EDGES
Maximum number of edges in a single audio graph.
Definition audio.h:42
int ove_audio_graph_connect(struct ove_audio_graph *g, unsigned int from, unsigned int to)
Connect two nodes with a directed edge.
void ove_audio_graph_deinit(struct ove_audio_graph *g)
Release all resources held by an audio graph.
#define OVE_AUDIO_GRAPH_MAX_NODES
Maximum number of nodes in a single audio graph.
Definition audio.h:40
int ove_audio_graph_build(struct ove_audio_graph *g)
Validate and compile the graph.
@ OVE_AUDIO_GRAPH_RUNNING
Graph is actively processing audio.
Definition audio.h:83
@ OVE_AUDIO_GRAPH_IDLE
Initial state; nodes may be added and connected.
Definition audio.h:81
@ OVE_AUDIO_GRAPH_READY
Build succeeded; graph may be started.
Definition audio.h:82
Audio buffer passed between nodes during graph processing.
Definition audio_node.h:97
Directed connection between two nodes in the audio graph.
Definition audio.h:51
unsigned int from
Index of the upstream (producer) node.
Definition audio.h:52
unsigned int to
Index of the downstream (consumer) node.
Definition audio.h:53
Runtime diagnostic counters for an audio graph.
Definition audio.h:64
unsigned int max_process_us
Worst-case cycle wall-clock time in microseconds.
Definition audio.h:69
unsigned int node_errors
Cumulative node process() failures.
Definition audio.h:68
unsigned int cycles
Number of completed processing cycles.
Definition audio.h:65
unsigned int avg_process_us
Rolling average cycle wall-clock time in microseconds.
Definition audio.h:70
unsigned int overruns
Source overflow events (source dropped frames).
Definition audio.h:67
unsigned int underruns
Sink starvation events (sink received no data).
Definition audio.h:66
Audio processing graph instance.
Definition audio.h:93
struct ove_audio_graph_stats stats
Accumulated runtime diagnostics.
Definition audio.h:109
struct ove_audio_edge edges[OVE_AUDIO_GRAPH_MAX_EDGES]
Registered directed edges.
Definition audio.h:97
unsigned int frames_per_period
Frame count processed per graph cycle.
Definition audio.h:106
struct ove_audio_buf buffers[OVE_AUDIO_GRAPH_MAX_NODES]
Per-node intermediate audio buffers.
Definition audio.h:103
void * buf_storage
Heap block backing all buffer data arrays.
Definition audio.h:104
unsigned int node_count
Number of valid entries in nodes[].
Definition audio.h:95
unsigned int exec_count
Number of valid entries in exec_order[].
Definition audio.h:101
struct ove_audio_node nodes[OVE_AUDIO_GRAPH_MAX_NODES]
Registered node descriptors.
Definition audio.h:94
unsigned int exec_order[OVE_AUDIO_GRAPH_MAX_NODES]
Node indices in topological execution order.
Definition audio.h:100
enum ove_audio_graph_state state
Current lifecycle state.
Definition audio.h:107
unsigned int edge_count
Number of valid entries in edges[].
Definition audio.h:98
Virtual function table (vtable) for an audio processing node.
Definition audio_node.h:112
Descriptor for a single node in the audio graph.
Definition audio_node.h:190