eren-terzioglu opened a new pull request, #15852: URL: https://github.com/apache/nuttx/pull/15852
## Summary Add I2S support for RISC-V based esp devices * esp32[c3|c6|h2]: Update common layer * esp32[c3|c6|h2]: Add I2S support * esp32[c3|c6|h2]: Add DMA function to have more capabilites ## Impact ESP32-C3, ESP32-C6, ESP32-H2 ## Testing Used configs: ``` esp32c3-generic:i2schar esp32c6-devkitc:i2schar esp32h2-devkit:i2schar ``` After build step Dout (C6/C3: 18, H2: 10 default) and Din (C6/C3: 19, H2: 11 default) pins connected together via wire (or pointed to the same pin in menuconfig). After that `i2schar` command used to test it and expected output should be like this: ``` nsh> i2schar i2schar_main: Start receiver thread i2schar_read: buffer=0x40815678 buflen=57 i2s_receive: Prepared 5 bytes to receive DMA buffers Recieved Audio pipeline buffer: (0x408156ac): i2schar_read: buffer=0x408156b8 buflen=57 i2s_receive: Prepared 5 bytes to receive DMA buffers Recieved Audio pipeline buffer: (0x408156ec): i2schar_write: buffer=0x408134b8 buflen=57 i2s_tx_worker: tx.act.head=0 tx.done.head=0x4080bce0 i2schar_txcallback: apb=0x408134b8 nbytes=5 result=0 i2schar_txcallback: Freeing apb=0x408134b8 crefs=2 i2s_send: Queued 5 bytes into DMA buffers Audio pipeline buffer: (0x408134ec): 0000 00 01 02 03 04 ..... i2schar_write: buffer=0x408134f8 buflen=57 i2s_tx_worker: tx.act.head=0 tx.done.head=0x4080bce0 i2schar_txcallback: apb=0x408134f8 nbytes=5 result=0 i2schar_txcallback: Freeing apb=0x408134f8 crefs=2 i2s_send: Queued 5 bytes into DMA buffers Audio pipeline buffer: (0x4081352c): 0000 05 06 07 08 09 ..... i2schar_main: Start transmitter thread i2schar_receiver: Received buffer 1 i2schar_receiver: Received buffer 2 i2schar_main: Waiting for the transmitter thread i2schar_transmitter: Send buffer 1 i2schar_transmitter: Send buffer 2 i2schar_main: Waiting for the receiver thread ``` Note: Default pins for devices: | Device/Pin | MCLK | BCLK | WS | DIN | DOUT | |------------|------|------|----|-----|------| | ESP32-C3 | 0 | 4 | 5 | 19 | 18 | | ESP32-C6 | 0 | 4 | 5 | 19 | 18 | | ESP32-H2 | 0 | 4 | 5 | 11 | 10 | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org