Lines Matching +full:tx +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. */
250 * first changes the interface state to STOPPING. When the current TX /
261 * at first changes the interface state to STOPPING. When all TX blocks
306 /** Memory slab to store RX/TX data. */
308 /** Size of one RX/TX memory block (buffer) in bytes. */
310 /** Read/Write timeout. Number of milliseconds to wait in case TX queue
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()
401 * is non-blocking.
405 * valid data stored in RX queue. Afterwards the function will return -EIO
413 * @retval -EIO The interface is in NOT_READY or ERROR state and there are no
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()
446 * @retval -EIO The interface is in NOT_READY or ERROR state and there are no
448 * @retval -EBUSY Returned without waiting.
449 * @retval -EAGAIN Waiting period timed out.
454 * @brief Write data to the TX queue.
456 * Data to be sent by the I2S interface is stored first in the TX queue. TX
461 * If there are no free slots in the TX queue the function will block waiting
462 * for the next TX memory block to be send and removed from the queue. This
464 * set to K_NO_WAIT the function is non-blocking.
466 * Writing to the TX queue is only possible if the interface is in READY or
470 * @param mem_block Pointer to the TX memory block containing data to be sent.
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()
489 * @brief Write data to the TX queue from a provided buffer
491 * This function acquires a memory block from the I2S channel TX queue
498 * than the size of the channel's TX memory block configuration.
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_*.
516 * and TX streams.
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()