I2S audio and DMA it's a mysterious world. What are these parameters: dma_buf_count and dma_buf_len? What are they for? And what values should they be set to? Thanks to PCBWay for sponsoring this video, PCBWay offer PCB Production, CNC and 3D Printing, PCB Assembly and much much more. You can find their details here: In this video, we try and answer the question around dma_buf_count and dma_buf_len. I'm going to be focussing on I2S, streaming sample data to and from the CPU to microphones and speakers. There are two critical parameters: dma_buf_count and dma_buf_len - and it's not always obvious what values to use. What is DMA? DMA stands for Direct Memory Access. It allows peripherals to directly access the system memory without involving the CPU. When using DMA, the CPU initiates a transfer between memory and the peripheral. The transfer is all taken care of by the DMA controller and the CPU is free to go off and do other work. You can find detailed information about the DMA system that is used on the ESP32 here: I've also got a whole series around audio on the ESP32 which you can find here along with links to sample code: You can pick up an I2S Amplifier (MAX98357) here: An INMP441 I2S Microphone here: Or my own ICS-43434 I2S Microphone here: And ESP32 Dev board: ---- Patreon: ko-fi:
Hide player controls
Hide resume playing