|
enum | rtos_mic_array_format_t { RTOS_MIC_ARRAY_CHANNEL_SAMPLE
, RTOS_MIC_ARRAY_SAMPLE_CHANNEL
, RTOS_MIC_ARRAY_FORMAT_COUNT
} |
|
The public API for using the RTOS mic array driver.
◆ rtos_mic_array_t
Typedef to the RTOS mic array driver instance struct.
◆ rtos_mic_array_format_t
Typedef for the RTOS mic array driver audio format
◆ rtos_mic_array_init()
Initializes an RTOS mic array driver instance. This must only be called by the tile that owns the driver instance. It should be called before starting the RTOS, and must be called before calling rtos_mic_array_start() or any of the core mic array driver functions with this instance.
- Parameters
-
mic_array_ctx | A pointer to the mic array driver instance to initialize. |
io_core_mask | A bitmask representing the cores on which the low level mic array I/O thread created by the driver is allowed to run. Bit 0 is core 0, bit 1 is core 1, etc. |
format | Format of the output data |
◆ rtos_mic_array_start()
void rtos_mic_array_start |
( |
rtos_mic_array_t * |
mic_array_ctx, |
|
|
size_t |
buffer_size, |
|
|
unsigned |
interrupt_core_id |
|
) |
| |
Starts an RTOS mic array driver instance. This must only be called by the tile that owns the driver instance. It must be called after starting the RTOS from an RTOS thread, and must be called before any of the core mic array driver functions are called with this instance.
rtos_mic_array_init() must be called on this mic array driver instance prior to calling this.
- Parameters
-
mic_array_ctx | A pointer to the mic array driver instance to start. |
buffer_size | The size in frames of the input buffer. Each frame is two samples (one for each microphone) plus one sample per reference channel. This must be at least MIC_ARRAY_CONFIG_SAMPLES_PER_FRAME. Samples are pulled out of this buffer by the application by calling rtos_mic_array_rx(). |
interrupt_core_id | The ID of the core on which to enable the mic array interrupt. |