oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
audio_device.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-3.0-or-later */
2
18#ifndef OVE_AUDIO_DEVICE_H
19#define OVE_AUDIO_DEVICE_H
20
21#include "ove/audio.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* ── Transport types ────────────────────────────────────────────── */
28
38
39/* ── Device configuration ───────────────────────────────────────── */
40
51 unsigned int num_buffers;
52 unsigned int thread_priority;
53 unsigned int
56 union {
58 struct {
59 unsigned int
61 unsigned int slot_mask;
62 } i2s;
64 struct {
65 unsigned int decimation;
66 unsigned int clock_freq;
67 } pdm;
68 };
69};
70
71/* ── Device node factories ──────────────────────────────────────── */
72
73#ifdef CONFIG_OVE_AUDIO
74
91 const char *name);
92
110 const char *name);
111
112#endif /* CONFIG_OVE_AUDIO */
113
114#ifdef __cplusplus
115}
116#endif
117
/* end of ove_audio_device group */
119
120#endif /* OVE_AUDIO_DEVICE_H */
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.
ove_audio_transport
Audio hardware transport type.
Definition audio_device.h:34
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.
@ OVE_AUDIO_TRANSPORT_PDM
PDM microphone interface.
Definition audio_device.h:36
@ OVE_AUDIO_TRANSPORT_I2S
I2S / TDM serial bus (e.g. codec, DAC, ADC).
Definition audio_device.h:35
Configuration descriptor for a hardware audio device node.
Definition audio_device.h:48
unsigned int slot_mask
TDM slot bitmask; 0 = all slots.
Definition audio_device.h:61
enum ove_audio_transport transport
Hardware transport selection.
Definition audio_device.h:49
struct ove_audio_fmt fmt
Desired audio stream format.
Definition audio_device.h:50
unsigned int clock_freq
PDM clock frequency in Hz.
Definition audio_device.h:66
unsigned int input_device
Input device selector (e.g. line-in, DMIC index).
Definition audio_device.h:60
unsigned int num_buffers
DMA buffer count; 0 = backend default.
Definition audio_device.h:51
unsigned int decimation
PDM decimation factor.
Definition audio_device.h:65
unsigned int thread_stack_size
Driver thread stack size in bytes; 0 = backend default.
Definition audio_device.h:54
unsigned int thread_priority
Driver thread priority; 0 = backend default.
Definition audio_device.h:52
Complete audio stream format descriptor.
Definition audio_node.h:75
Audio processing graph instance.
Definition audio.h:96