Astra MCU SDK Peripheral Driver Library
Loading...
Searching...
No Matches
Enumerated Types

Enumerated types for DMIC driver. More...

Typedefs

typedef uint32_t dmic_cutoff_freq_t
 DMIC HPF cutoff selector type.

Enumerations

enum  dmic_event_en {
  DMIC_EVENT_NONE = 0x00 ,
  DMIC_EVENT_OVERFLOW ,
  DMIC_EVENT_FULL ,
  DMIC_EVENT_UNDERFLOW ,
  DMIC_EVENT_ALMOST_FULL ,
  DMIC_EVENT_MUTE_ENABLED ,
  DMIC_EVENT_INVALID_CONFIG ,
  DMIC_EVENT_READ_COMPLETE ,
  DMIC_EVENT_READ_NOT_READY ,
  DMIC_EVENT_READ_PARTIAL_COMPLETE ,
  DMIC_EVENT_ERROR
}
 DMIC event notifications. More...
enum  dmic_status_en {
  DMIC_OK = 0 ,
  DMIC_ERROR = 1 ,
  DMIC_ERROR_TIMEOUT = 2 ,
  DMIC_ERROR_DATA_STUCK = 3 ,
  DMIC_ERROR_OVERFLOW = 4 ,
  DMIC_ERROR_INVALID_GAIN = 5 ,
  DMIC_ERROR_INVALID_BOOST = 6 ,
  DMIC_ERROR_INVALID_CLK_DIV = 7 ,
  DMIC_ERROR_INVALID_PHASE = 8 ,
  DMIC_ERROR_MUTE_STATE = 9 ,
  DMIC_ERROR_NOT_CLEARED = 10 ,
  DMIC_ERROR_INVALID_CONTEXT = 11 ,
  DMIC_ERROR_INVALID_PARAM = 12 ,
  DMIC_ERROR_DMA_FAILED = 13 ,
  DMIC_ERROR_UNKNOWN = 14 ,
  DMIC_ERROR_NOT_SUPPORTED = 15 ,
  DMIC_ERROR_INVALID_CONFIG = 16
}
 Error codes for DMIC module. More...
enum  dmic_decimation_ratio_en {
  DMIC_DECIMATE_BY_64 = 64 ,
  DMIC_DECIMATE_BY_32 = 32 ,
  DMIC_DECIMATE_BY_16 = 16
}
 Decimation ratios for DMIC output. More...
enum  dmic_in_phase_en {
  DMIC_PHASE_POS_EDGE_ALIGN_NEG = 0x0 ,
  DMIC_PHASE_NEG_EDGE_ALIGN_POS = 0x1
}
 DMIC Input Phase. More...
enum  dmic_gain_ctrl_en {
  DMIC_GAIN_NEG_3DB = 0x0 ,
  DMIC_GAIN_NEG_2_5DB = 0x1 ,
  DMIC_GAIN_NEG_2DB = 0x2 ,
  DMIC_GAIN_NEG_1_5DB = 0x3 ,
  DMIC_GAIN_NEG_1DB = 0x4 ,
  DMIC_GAIN_NEG_0_5DB = 0x5 ,
  DMIC_GAIN_0DB = 0x6 ,
  DMIC_GAIN_POS_0_5DB = 0x7 ,
  DMIC_GAIN_POS_1DB = 0x8 ,
  DMIC_GAIN_POS_1_5DB = 0x9 ,
  DMIC_GAIN_POS_2DB = 0xA ,
  DMIC_GAIN_POS_2_5DB = 0xB ,
  DMIC_GAIN_POS_3DB = 0xC
}
 Microphone Gain Control. More...
enum  dmic_boost_en {
  DMIC_BOOST_0DB = 0x0 ,
  DMIC_BOOST_6DB = 0x1 ,
  DMIC_BOOST_12DB = 0x2 ,
  DMIC_BOOST_18DB = 0x3 ,
  DMIC_BOOST_24DB = 0x4
}
 Input boost levels. More...
enum  dmic_int_en {
  DMIC_INT_AFULL = 0x1 ,
  DMIC_INT_FULL = 0x2 ,
  DMIC_INT_OVER = 0x4
}
 FIFO interrupt mask configuration. More...
enum  dmic_transfer_mode_en {
  DMIC_TRANSFER_MODE_NONE = 0x0 ,
  DMIC_TRANSFER_MODE_FIFO = 0x1 ,
  DMIC_TRANSFER_MODE_DMA = 0x2
}
 DMIC transfer mode capability bitmask. More...
enum  dmic_buffer_mode_en {
  DMIC_BUFFER_MODE_NONE = 0x0 ,
  DMIC_BUFFER_MODE_PER_CHANNEL = 0x1 ,
  DMIC_BUFFER_MODE_INTERLEAVED = 0x2
}
 DMIC buffer mode capability bitmask. More...
enum  dmic_sample_size_en {
  DMIC_SAMPLE_16BIT = 2 ,
  DMIC_SAMPLE_24BIT = 3 ,
  DMIC_SAMPLE_32BIT = 4
}
 DMIC sample size selector. More...

Detailed Description

Enumerated types for DMIC driver.

Typedef Documentation

◆ dmic_cutoff_freq_t

typedef uint32_t dmic_cutoff_freq_t

DMIC HPF cutoff selector type.

The exact value-to-register mapping is SoC specific and resolved through the platform cutoff map table.

Enumeration Type Documentation

◆ dmic_event_en

DMIC event notifications.

These values report asynchronous DMIC runtime events. API call failures are returned using dmic_status_en and are distinct from these notifications. Event source notes:

Enumerator
DMIC_EVENT_NONE 

No event

DMIC_EVENT_OVERFLOW 

Hardware/driver overflow indication

DMIC_EVENT_FULL 

Optional FIFO full indication; reported only when enabled by FIFO interrupt configuration

DMIC_EVENT_UNDERFLOW 

Reserved for future playback/sink-style paths; not generated by current DMIC capture backend

DMIC_EVENT_ALMOST_FULL 

Optional FIFO almost-full indication; reported only when enabled by FIFO interrupt configuration

DMIC_EVENT_MUTE_ENABLED 

Mute enabled state changed

DMIC_EVENT_INVALID_CONFIG 

Configuration issue notification

DMIC_EVENT_READ_COMPLETE 

Primary 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 less data than requested (primarily FIFO mode/backpressure)

DMIC_EVENT_ERROR 

Generic runtime error event

◆ dmic_status_en

Error codes for DMIC module.

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 or configuration not supported

DMIC_ERROR_INVALID_CONFIG 

Invalid runtime/configuration state

◆ dmic_decimation_ratio_en

Decimation ratios for DMIC output.

Enumerator
DMIC_DECIMATE_BY_64 

64x decimation

DMIC_DECIMATE_BY_32 

32x decimation

DMIC_DECIMATE_BY_16 

16x decimation

◆ dmic_in_phase_en

DMIC Input Phase.

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 Control.

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 levels.

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

FIFO interrupt mask configuration.

Enumerator
DMIC_INT_AFULL 

Almost full interrupt

DMIC_INT_FULL 

Full interrupt

DMIC_INT_OVER 

Overflow interrupt

◆ dmic_transfer_mode_en

DMIC transfer mode 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

DMIC buffer mode capability bitmask.

Multi-channel capture uses interleaved layout. Single-channel capture uses per-channel layout.

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

DMIC sample size selector.

Current implementation transfers/stores samples in 32-bit memory words. 16-bit and 24-bit formats are 32-bit containerized in memory. API values identify logical sample formats; storage sizing follows the 32-bit container rule above. Samples may be stored in 32-bit memory containers depending on hardware packing requirements.

Enumerator
DMIC_SAMPLE_16BIT 

16-bit sample

DMIC_SAMPLE_24BIT 

24-bit sample

DMIC_SAMPLE_32BIT 

32-bit sample