17#ifndef ZEPHYR_INCLUDE_AUDIO_DMIC_H_
18#define ZEPHYR_INCLUDE_AUDIO_DMIC_H_
170 int (*configure)(
const struct device *dev,
struct dmic_cfg *config);
191 return ((((pdm &
BIT_MASK(3)) << 1) | lr) <<
214 channel_map = (channel < 8) ? channel_map_lo : channel_map_hi;
215 channel_map >>= ((channel &
BIT_MASK(3)) * 4U);
217 *pdm = (channel >> 1) &
BIT_MASK(3);
251 const struct _dmic_ops *api =
252 (
const struct _dmic_ops *)dev->
api;
254 return api->configure(dev, cfg);
270 const struct _dmic_ops *api =
271 (
const struct _dmic_ops *)dev->
api;
273 return api->trigger(dev,
cmd);
295 const struct _dmic_ops *api =
296 (
const struct _dmic_ops *)dev->
api;
ZTEST_BMEM int timeout
Definition: main.c:31
#define BIT_MASK(n)
Definition: adc.h:14
static int dmic_configure(const struct device *dev, struct dmic_cfg *cfg)
Definition: dmic.h:248
dmic_trigger
Definition: dmic.h:56
static uint32_t dmic_build_channel_map(uint8_t channel, uint8_t pdm, enum pdm_lr lr)
Definition: dmic.h:188
static int dmic_read(const struct device *dev, uint8_t stream, void **buffer, size_t *size, int32_t timeout)
Definition: dmic.h:291
pdm_lr
Definition: dmic.h:67
static void dmic_parse_channel_map(uint32_t channel_map_lo, uint32_t channel_map_hi, uint8_t channel, uint8_t *pdm, enum pdm_lr *lr)
Definition: dmic.h:209
dmic_state
Definition: dmic.h:45
static uint32_t dmic_build_clk_skew_map(uint8_t pdm, uint8_t skew)
Definition: dmic.h:232
@ DMIC_TRIGGER_START
Definition: dmic.h:58
@ DMIC_TRIGGER_PAUSE
Definition: dmic.h:59
@ DMIC_TRIGGER_RELEASE
Definition: dmic.h:60
@ DMIC_TRIGGER_RESET
Definition: dmic.h:61
@ DMIC_TRIGGER_STOP
Definition: dmic.h:57
@ PDM_CHAN_RIGHT
Definition: dmic.h:69
@ PDM_CHAN_LEFT
Definition: dmic.h:68
@ DMIC_STATE_PAUSED
Definition: dmic.h:50
@ DMIC_STATE_UNINIT
Definition: dmic.h:46
@ DMIC_STATE_CONFIGURED
Definition: dmic.h:48
@ DMIC_STATE_INITIALIZED
Definition: dmic.h:47
@ DMIC_STATE_ACTIVE
Definition: dmic.h:49
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition: ft8xx_reference_api.h:153
static ZTEST_BMEM char buffer[8]
Test mailbox enhance capabilities.
Definition: test_mbox_api.c:566
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__INT32_TYPE__ int32_t
Definition: stdint.h:44
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
const void * api
Definition: device.h:373
struct pcm_stream_cfg * streams
Definition: dmic.h:162
struct pdm_chan_cfg channel
Definition: dmic.h:163
struct pdm_io_cfg io
Definition: dmic.h:157
uint16_t block_size
Definition: dmic.h:111
uint8_t pcm_width
Definition: dmic.h:109
struct k_mem_slab * mem_slab
Definition: dmic.h:113
uint32_t pcm_rate
Definition: dmic.h:107
uint32_t req_chan_map_lo
Definition: dmic.h:138
uint32_t req_chan_map_hi
Definition: dmic.h:139
uint8_t act_num_chan
Definition: dmic.h:146
uint32_t act_chan_map_lo
Definition: dmic.h:141
uint8_t act_num_streams
Definition: dmic.h:150
uint32_t act_chan_map_hi
Definition: dmic.h:142
uint8_t req_num_chan
Definition: dmic.h:144
uint8_t req_num_streams
Definition: dmic.h:148
uint8_t min_pdm_clk_dc
Definition: dmic.h:83
uint8_t pdm_clk_pol
Definition: dmic.h:90
uint32_t max_pdm_clk_freq
Definition: dmic.h:81
uint32_t pdm_clk_skew
Definition: dmic.h:94
uint8_t max_pdm_clk_dc
Definition: dmic.h:85
uint8_t pdm_data_pol
Definition: dmic.h:92
uint32_t min_pdm_clk_freq
Definition: dmic.h:79