Home
last modified time | relevance | path

Searched refs:i2s_cfg (Results 1 – 10 of 10) sorted by relevance

/Zephyr-Core-3.5.0/tests/drivers/i2s/i2s_api/src/
Dcommon.c159 struct i2s_config i2s_cfg; in configure_stream() local
161 i2s_cfg.word_size = 16U; in configure_stream()
162 i2s_cfg.channels = 2U; in configure_stream()
163 i2s_cfg.format = I2S_FMT_DATA_FORMAT_I2S; in configure_stream()
164 i2s_cfg.frame_clk_freq = FRAME_CLK_FREQ; in configure_stream()
165 i2s_cfg.block_size = BLOCK_SIZE; in configure_stream()
166 i2s_cfg.timeout = TIMEOUT; in configure_stream()
170 i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER in configure_stream()
174 i2s_cfg.options = I2S_OPT_FRAME_CLK_SLAVE in configure_stream()
177 i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER in configure_stream()
[all …]
Dtest_i2s_states.c21 struct i2s_config i2s_cfg; in ZTEST_USER() local
26 i2s_cfg.frame_clk_freq = 0U; in ZTEST_USER()
27 i2s_cfg.mem_slab = &rx_mem_slab; in ZTEST_USER()
29 ret = i2s_configure(dev_i2s_rx, I2S_DIR_RX, &i2s_cfg); in ZTEST_USER()
50 i2s_cfg.frame_clk_freq = 0U; in ZTEST_USER()
51 i2s_cfg.mem_slab = &tx_mem_slab; in ZTEST_USER()
53 ret = i2s_configure(dev_i2s_tx, I2S_DIR_TX, &i2s_cfg); in ZTEST_USER()
/Zephyr-Core-3.5.0/drivers/audio/
Dmpxxdtyy-i2s.c125 struct i2s_config i2s_cfg; in mpxxdtyy_i2s_configure() local
127 i2s_cfg.word_size = chan_size; in mpxxdtyy_i2s_configure()
128 i2s_cfg.channels = cfg->channel.req_num_chan; in mpxxdtyy_i2s_configure()
129 i2s_cfg.format = I2S_FMT_DATA_FORMAT_LEFT_JUSTIFIED | in mpxxdtyy_i2s_configure()
131 i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER | I2S_OPT_BIT_CLK_MASTER; in mpxxdtyy_i2s_configure()
132 i2s_cfg.frame_clk_freq = audio_freq * factor / chan_size; in mpxxdtyy_i2s_configure()
133 i2s_cfg.block_size = data->pcm_mem_size * (factor / chan_size); in mpxxdtyy_i2s_configure()
134 i2s_cfg.mem_slab = &rx_pdm_i2s_mslab; in mpxxdtyy_i2s_configure()
135 i2s_cfg.timeout = 2000; in mpxxdtyy_i2s_configure()
137 ret = i2s_configure(config->comm_master, I2S_DIR_RX, &i2s_cfg); in mpxxdtyy_i2s_configure()
/Zephyr-Core-3.5.0/drivers/i2s/
Di2s_nrfx.c59 const struct i2s_config *i2s_cfg) in find_suitable_clock() argument
86 uint32_t bits_per_frame = 2 * i2s_cfg->word_size; in find_suitable_clock()
100 i2s_cfg->frame_clk_freq * ratios[r].ratio_val; in find_suitable_clock()
114 uint32_t diff = lrck_freq >= i2s_cfg->frame_clk_freq in find_suitable_clock()
115 ? (lrck_freq - i2s_cfg->frame_clk_freq) in find_suitable_clock()
116 : (i2s_cfg->frame_clk_freq - lrck_freq); in find_suitable_clock()
155 lrck_freq >= i2s_cfg->frame_clk_freq in find_suitable_clock()
156 ? (lrck_freq - i2s_cfg->frame_clk_freq) in find_suitable_clock()
157 : (i2s_cfg->frame_clk_freq - lrck_freq); in find_suitable_clock()
176 if (lrck_freq < i2s_cfg->frame_clk_freq) { in find_suitable_clock()
[all …]
Di2s_sam_ssc.c326 const struct i2s_config *i2s_cfg) in set_rx_data_format() argument
331 uint8_t word_size_bits = i2s_cfg->word_size; in set_rx_data_format()
332 uint8_t num_words = i2s_cfg->channels; in set_rx_data_format()
336 bool frame_clk_master = !(i2s_cfg->options & I2S_OPT_FRAME_CLK_SLAVE); in set_rx_data_format()
338 switch (i2s_cfg->format & I2S_FMT_DATA_FORMAT_MASK) { in set_rx_data_format()
387 ssc_rcmr |= ((i2s_cfg->options & I2S_OPT_BIT_CLK_SLAVE) in set_rx_data_format()
389 | ((i2s_cfg->options & I2S_OPT_BIT_CLK_GATED) in set_rx_data_format()
406 | ((i2s_cfg->format & I2S_FMT_DATA_ORDER_LSB) in set_rx_data_format()
419 const struct i2s_config *i2s_cfg) in set_tx_data_format() argument
422 uint8_t word_size_bits = i2s_cfg->word_size; in set_tx_data_format()
[all …]
Di2s_litex.c323 const struct i2s_config *i2s_cfg) in i2s_litex_configure() argument
351 if (i2s_cfg->options & I2S_OPT_BIT_CLK_GATED) { in i2s_litex_configure()
356 if (i2s_cfg->frame_clk_freq != dev_audio_freq) { in i2s_litex_configure()
360 if (i2s_cfg->channels == 1) { in i2s_litex_configure()
362 } else if (i2s_cfg->channels == 2) { in i2s_litex_configure()
369 (cfg->fifo_depth * (i2s_cfg->word_size / 8)) / channel_div; in i2s_litex_configure()
371 if (i2s_cfg->block_size < req_buf_s) { in i2s_litex_configure()
375 } else if (i2s_cfg->block_size != req_buf_s) { in i2s_litex_configure()
387 if (i2s_cfg->word_size != 8U && i2s_cfg->word_size != 16U && in i2s_litex_configure()
388 i2s_cfg->word_size != 24U && i2s_cfg->word_size != 32U && in i2s_litex_configure()
[all …]
Di2s_mcux_sai.c464 const struct i2s_config *i2s_cfg) in i2s_mcux_config() argument
472 uint8_t num_words = i2s_cfg->channels; in i2s_mcux_config()
473 uint8_t word_size_bits = i2s_cfg->word_size; in i2s_mcux_config()
490 if (i2s_cfg->frame_clk_freq == 0U) { in i2s_mcux_config()
492 i2s_cfg->frame_clk_freq); in i2s_mcux_config()
523 if ((i2s_cfg->options & I2S_OPT_PINGPONG) == I2S_OPT_PINGPONG) { in i2s_mcux_config()
535 const bool is_mclk_slave = i2s_cfg->options & I2S_OPT_BIT_CLK_SLAVE; in i2s_mcux_config()
565 switch (i2s_cfg->format & I2S_FMT_DATA_FORMAT_MASK) { in i2s_mcux_config()
620 if (i2s_cfg->options & I2S_OPT_FRAME_CLK_SLAVE) { in i2s_mcux_config()
621 if (i2s_cfg->options & I2S_OPT_BIT_CLK_SLAVE) { in i2s_mcux_config()
[all …]
Di2s_mcux_flexcomm.c69 const struct i2s_config *i2s_cfg, in i2s_mcux_flexcomm_cfg_convert() argument
79 if (i2s_cfg->channels == 0 || i2s_cfg->channels > 2) { in i2s_mcux_flexcomm_cfg_convert()
84 fsl_cfg->oneChannel = (i2s_cfg->channels == 1); in i2s_mcux_flexcomm_cfg_convert()
86 fsl_cfg->dataLength = i2s_cfg->word_size; in i2s_mcux_flexcomm_cfg_convert()
87 fsl_cfg->frameLength = i2s_cfg->channels * i2s_cfg->word_size; in i2s_mcux_flexcomm_cfg_convert()
90 switch (i2s_cfg->options & (I2S_OPT_BIT_CLK_SLAVE | in i2s_mcux_flexcomm_cfg_convert()
113 switch (i2s_cfg->format & I2S_FMT_DATA_FORMAT_MASK) { in i2s_mcux_flexcomm_cfg_convert()
141 i2s_cfg->frame_clk_freq / in i2s_mcux_flexcomm_cfg_convert()
149 switch (i2s_cfg->format & I2S_FMT_CLK_FORMAT_MASK) { in i2s_mcux_flexcomm_cfg_convert()
190 const struct i2s_config *i2s_cfg) in i2s_mcux_configure() argument
[all …]
Di2s_ll_stm32.c171 const struct i2s_config *i2s_cfg) in i2s_stm32_configure() argument
176 const uint32_t channel_length = i2s_cfg->word_size > 16U ? 32U : 16U; in i2s_stm32_configure()
182 const uint32_t num_channels = i2s_cfg->format & I2S_FMT_DATA_FORMAT_MASK in i2s_stm32_configure()
183 ? 2U : i2s_cfg->channels; in i2s_stm32_configure()
207 if (i2s_cfg->options & I2S_OPT_FRAME_CLK_SLAVE || in i2s_stm32_configure()
208 i2s_cfg->options & I2S_OPT_BIT_CLK_SLAVE) { in i2s_stm32_configure()
212 if (i2s_cfg->frame_clk_freq == 0U) { in i2s_stm32_configure()
219 memcpy(&stream->cfg, i2s_cfg, sizeof(struct i2s_config)); in i2s_stm32_configure()
225 bit_clk_freq = i2s_cfg->frame_clk_freq * in i2s_stm32_configure()
254 if (i2s_cfg->word_size == 16U) { in i2s_stm32_configure()
[all …]
/Zephyr-Core-3.5.0/tests/drivers/i2s/i2s_speed/src/
Dtest_i2s_speed.c133 struct i2s_config i2s_cfg; in configure_stream() local
135 i2s_cfg.word_size = 16U; in configure_stream()
136 i2s_cfg.channels = 2U; in configure_stream()
137 i2s_cfg.format = I2S_FMT_DATA_FORMAT_I2S; in configure_stream()
138 i2s_cfg.frame_clk_freq = FRAME_CLK_FREQ; in configure_stream()
139 i2s_cfg.block_size = BLOCK_SIZE; in configure_stream()
140 i2s_cfg.timeout = TIMEOUT; in configure_stream()
144 i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER in configure_stream()
148 i2s_cfg.options = I2S_OPT_FRAME_CLK_SLAVE in configure_stream()
151 i2s_cfg.options = I2S_OPT_FRAME_CLK_MASTER in configure_stream()
[all …]