zephyr/drivers/i2s
Mike J. Chen f882d31ea7 drivers: i2s: mcux_flexcomm: fix multiple bugs
Fix for bugs described in:
https://github.com/zephyrproject-rtos/zephyr/issues/59803

1. the size argument passed to i2s_write() was being ignored.
   change the code so that the size is queued with the
   tx mem_block and the dma transfer is configured with this
   size.

2. change how CONFIG_I2S_MCUX_FLEXCOMM_RX_BLOCK_COUNT and
   CONFIG_I2S_MCUX_FLEXCOMM_TX_BLOCK_COUNT are used so that
   the queue buffers are allocated correctly when the two
   config values are not the same

3. set source_data_size and dest_data_size to be the same
   since the DMA controller can only set one size per
   DMA transfer. the driver was already computing a dest_data_size
   but always passing 1 for the source_data_size.
   For I2S RX case, I think source_data_size should be
   set to the expected FIFO read size instead of dest_data_size.

Also some smaller improvements like:
* don't allocate two dma_blocks for tx in the static dev_mem
  when it only needs one
* memset both rx_dma_blocks together instead of separtely
* set dma_cfg block_count for tx and rx statically instead
  of at runtime

Signed-off-by: Mike J. Chen <mjchen@google.com>
2023-07-19 10:36:23 -05:00
..
CMakeLists.txt drivers: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
Kconfig
Kconfig.litex
Kconfig.mcux
Kconfig.mcux_flexcomm
Kconfig.nrfx
Kconfig.sam_ssc
Kconfig.stm32
i2s_common.c
i2s_handlers.c
i2s_litex.c
i2s_litex.h
i2s_ll_stm32.c dma: callback with 2 status codes for successful transfers 2023-05-08 09:57:32 +02:00
i2s_ll_stm32.h
i2s_mcux_flexcomm.c drivers: i2s: mcux_flexcomm: fix multiple bugs 2023-07-19 10:36:23 -05:00
i2s_mcux_sai.c barriers: Move __DSB() to the new API 2023-05-24 13:13:57 -04:00
i2s_mcux_sai.h
i2s_nrfx.c
i2s_sam_ssc.c