Astra MCU SDK Peripheral Driver Library
Enumerated Types

DMIC enums

enum dmic_instance_en
enum dmic_event_en
enum dmic_status_en
enum dmic_decimation_ratio_en
enum dmic_in_phase_en
enum dmic_gain_ctrl_en
enum dmic_boost_en
enum dmic_int_en
enum dmic_transfer_mode_en
enum dmic_buffer_mode_en
enum dmic_sample_size_en

dmic_instance_en

DMIC instance identifier enumeration (SoC-defined).

dmic_event_en

Asynchronous event notifications for runtime and transfer status reporting.

Enumerator
DMIC_EVENT_NONE 

No event.

DMIC_EVENT_OVERFLOW 

Hardware/driver overflow indication.

DMIC_EVENT_FULL 

Optional FIFO full indication.

DMIC_EVENT_UNDERFLOW 

Reserved underflow indication.

DMIC_EVENT_ALMOST_FULL 

Optional FIFO almost-full indication.

DMIC_EVENT_MUTE_ENABLED 

Mute enabled state changed.

DMIC_EVENT_INVALID_CONFIG 

Configuration issue notification.

DMIC_EVENT_READ_COMPLETE 

Transfer-ready event (DMA period/FIFO threshold complete).

DMIC_EVENT_READ_NOT_READY 

Non-blocking read attempted with no ready data.

DMIC_EVENT_READ_PARTIAL_COMPLETE 

Transfer-ready with partial data.

DMIC_EVENT_ERROR 

Generic runtime error event.

dmic_status_en

DMIC API status/error return codes.

Enumerator
DMIC_OK 

Operation completed successfully.

DMIC_ERROR 

General error.

DMIC_ERROR_TIMEOUT 

Operation timed out.

DMIC_ERROR_DATA_STUCK 

Data stuck error.

DMIC_ERROR_OVERFLOW 

Overflow error.

DMIC_ERROR_INVALID_GAIN 

Invalid gain value.

DMIC_ERROR_INVALID_BOOST 

Invalid boost value.

DMIC_ERROR_INVALID_CLK_DIV 

Invalid clock divider.

DMIC_ERROR_INVALID_PHASE 

Invalid phase value.

DMIC_ERROR_MUTE_STATE 

Invalid mute state.

DMIC_ERROR_NOT_CLEARED 

Not cleared.

DMIC_ERROR_INVALID_CONTEXT 

Invalid DMIC instance.

DMIC_ERROR_INVALID_PARAM 

Invalid parameter.

DMIC_ERROR_DMA_FAILED 

DMA transfer failed.

DMIC_ERROR_UNKNOWN 

Unknown error.

DMIC_ERROR_NOT_SUPPORTED 

Operation/configuration not supported.

DMIC_ERROR_INVALID_CONFIG 

Invalid runtime/configuration state.

dmic_decimation_ratio_en

Output decimation ratio selection.

Enumerator
DMIC_DECIMATE_BY_64 

64x decimation.

DMIC_DECIMATE_BY_32 

32x decimation.

DMIC_DECIMATE_BY_16 

16x decimation.

dmic_in_phase_en

Input clock phase relationship options.

Enumerator
DMIC_PHASE_POS_EDGE_ALIGN_NEG 

Positive edge aligned negative.

DMIC_PHASE_NEG_EDGE_ALIGN_POS 

Negative edge aligned positive.

dmic_gain_ctrl_en

Microphone gain settings.

Enumerator
DMIC_GAIN_NEG_3DB 

-3 dB gain.

DMIC_GAIN_NEG_2_5DB 

-2.5 dB gain.

DMIC_GAIN_NEG_2DB 

-2 dB gain.

DMIC_GAIN_NEG_1_5DB 

-1.5 dB gain.

DMIC_GAIN_NEG_1DB 

-1 dB gain.

DMIC_GAIN_NEG_0_5DB 

-0.5 dB gain.

DMIC_GAIN_0DB 

0 dB gain.

DMIC_GAIN_POS_0_5DB 

+0.5 dB gain.

DMIC_GAIN_POS_1DB 

+1 dB gain.

DMIC_GAIN_POS_1_5DB 

+1.5 dB gain.

DMIC_GAIN_POS_2DB 

+2 dB gain.

DMIC_GAIN_POS_2_5DB 

+2.5 dB gain.

DMIC_GAIN_POS_3DB 

+3 dB gain.

dmic_boost_en

Input boost settings.

Enumerator
DMIC_BOOST_0DB 

0 dB boost.

DMIC_BOOST_6DB 

6 dB boost.

DMIC_BOOST_12DB 

12 dB boost.

DMIC_BOOST_18DB 

18 dB boost.

DMIC_BOOST_24DB 

24 dB boost.

dmic_int_en

Interrupt bit masks used by interrupt-control APIs.

Enumerator
DMIC_INT_AFULL 

Almost full interrupt.

DMIC_INT_FULL 

Full interrupt.

DMIC_INT_OVER 

Overflow interrupt.

dmic_transfer_mode_en

FIFO/DMA transfer mode selection and capability bitmask.

Enumerator
DMIC_TRANSFER_MODE_NONE 

No transfer mode available.

DMIC_TRANSFER_MODE_FIFO 

Supports FIFO data path.

DMIC_TRANSFER_MODE_DMA 

Supports DMA data path.

dmic_buffer_mode_en

Per-channel/interleaved buffer layout mode selection.

Enumerator
DMIC_BUFFER_MODE_NONE 

No buffer mode available.

DMIC_BUFFER_MODE_PER_CHANNEL 

Separate per-channel buffers.

DMIC_BUFFER_MODE_INTERLEAVED 

Interleaved multi-channel buffer.

dmic_sample_size_en

Logical PCM sample size selector (stored in 32-bit containers in current implementation).

Enumerator
DMIC_SAMPLE_16BIT 

16-bit sample.

DMIC_SAMPLE_24BIT 

24-bit sample.

DMIC_SAMPLE_32BIT 

32-bit sample.