Lines Matching +full:rx +full:- +full:sync +full:- +full:mode

4  * SPDX-License-Identifier: Apache-2.0
9 * @brief Public APIs for the I2S (Inter-IC Sound) bus drivers.
20 * @brief I2S (Inter-IC Sound) Interface
23 * as common non-standard extensions such as PCM Short/Long Frame Sync,
55 * -. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
56 * SCK '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '
57 * -. .-------------------------------.
58 * WS '-------------------------------' '----
59 * -.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.
61 * -'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'
66 /** @brief PCM Short Frame Sync Data Format.
70 * of the clock signal (SCK). The falling edge of the frame sync signal (WS)
71 * indicates the start of the PCM word. The frame sync is one clock cycle long.
74 * .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
75 * SCK -' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-
76 * .---. .---.
77 * WS -' '- -' '-
78 * -.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---
80 * -'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---
85 /** @brief PCM Long Frame Sync Data Format.
89 * of the clock signal (SCK). The rising edge of the frame sync signal (WS)
90 * indicates the start of the PCM word. The frame sync has an arbitrary length,
94 * .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
95 * SCK -' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-
96 * .--- ---. ---. ---. .---
97 * WS -' '- '- '- -'
98 * -.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---
100 * -'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---
115 * .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
116 * SCK -' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-
117 * .-------------------------------. .-
118 * WS ---' '-------------------------------'
119 * ---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.-
121 * ---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'-
136 * .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-. .-.
137 * SCK -' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-
138 * .-------------------------------. .-
139 * WS ---' '-------------------------------'
140 * ---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.-
142 * ---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'-
189 /** @brief Loop back mode.
191 * In loop back mode RX input will be connected internally to TX output.
196 /** @brief Ping pong mode
198 * In ping pong mode TX output will keep alternating between a ping buffer
201 * So, in this mode, 2 sets of buffers fixed in size are used. Static Arrays
233 /** TX buffer underrun or RX buffer overrun has occurred. */
251 * RX block is transmitted / received the state is changed to READY.
259 * If the trigger is applied to the RX queue it has the same effect as
306 /** Memory slab to store RX/TX data. */
308 /** Size of one RX/TX memory block (buffer) in bytes. */
311 * is full or RX queue is empty, or 0, or SYS_FOREVER_MS.
338 * The dir parameter specifies if Transmit (TX) or Receive (RX) direction
344 * If the function is called with the parameter cfg->frame_clk_freq set to 0
348 * @param dir Stream direction: RX, TX, or both, as defined by I2S_DIR_*.
350 * For those, the RX and TX streams need to be configured separately.
354 * @retval -EINVAL Invalid argument.
355 * @retval -ENOSYS I2S_DIR_BOTH value is not supported.
365 (const struct i2s_driver_api *)dev->api; in z_impl_i2s_configure()
367 return api->configure(dev, dir, cfg); in z_impl_i2s_configure()
374 * @param dir Stream direction: RX or TX as defined by I2S_DIR_*
376 * or NULL if un-configured
382 (const struct i2s_driver_api *)dev->api; in i2s_config_get()
384 return api->config_get(dev, dir); in i2s_config_get()
388 * @brief Read data from the RX queue.
390 * Data received by the I2S interface is stored in the RX queue consisting of
392 * i2s_configure). Ownership of the RX memory block is passed on to the user
398 * If there is no data in the RX queue the function will block waiting for
399 * the next RX memory block to fill in. This operation can timeout as defined
401 * is non-blocking.
403 * Reading from the RX queue is possible in any state other than NOT_READY.
405 * valid data stored in RX queue. Afterwards the function will return -EIO
409 * @param mem_block Pointer to the RX memory block containing received data.
413 * @retval -EIO The interface is in NOT_READY or ERROR state and there are no
414 * more data blocks in the RX queue.
415 * @retval -EBUSY Returned without waiting.
416 * @retval -EAGAIN Waiting period timed out.
422 (const struct i2s_driver_api *)dev->api; in i2s_read()
424 return api->read(dev, mem_block, size); in i2s_read()
428 * @brief Read data from the RX queue into a provided buffer
430 * Data received by the I2S interface is stored in the RX queue consisting of
442 * as large as the configured memory block size for the RX channel.
446 * @retval -EIO The interface is in NOT_READY or ERROR state and there are no
447 * more data blocks in the RX queue.
448 * @retval -EBUSY Returned without waiting.
449 * @retval -EAGAIN Waiting period timed out.
464 * set to K_NO_WAIT the function is non-blocking.
475 * @retval -EIO The interface is not in READY or RUNNING state.
476 * @retval -EBUSY Returned without waiting.
477 * @retval -EAGAIN Waiting period timed out.
483 (const struct i2s_driver_api *)dev->api; in i2s_write()
485 return api->write(dev, mem_block, size); in i2s_write()
501 * @retval -EIO The interface is not in READY or RUNNING state.
502 * @retval -EBUSY Returned without waiting.
503 * @retval -EAGAIN Waiting period timed out.
504 * @retval -ENOMEM No memory in TX slab queue.
505 * @retval -EINVAL Size parameter larger than TX queue memory block.
513 * @param dir Stream direction: RX, TX, or both, as defined by I2S_DIR_*.
515 * For those, triggering need to be done separately for the RX
520 * @retval -EINVAL Invalid argument.
521 * @retval -EIO The trigger cannot be executed in the current state or a DMA
523 * @retval -ENOMEM RX/TX memory block not available.
524 * @retval -ENOSYS I2S_DIR_BOTH value is not supported.
534 (const struct i2s_driver_api *)dev->api; in z_impl_i2s_trigger()
536 return api->trigger(dev, dir, cmd); in z_impl_i2s_trigger()