Hello, I am trying to record audio using a MEMS microphone, but the final recording is missing parts periodically (for example, with a sample rate of 8kHz, there are parts ~1s long missing once every ~10-11s. Using a sample rate of 48kHz, the period is ~1s long). This is my first time working with I2S and I can't figure out what causes this behaviour.
My setup is as follows: - the microphone has 24-bit depth in a 32-bit word (MSB first) when transmitting data - i am using nxrecorder to record the pcm audio onto an SD card (device pcm_in0) - to listen to the recording i import the file into Audacity (24-bit, Big Endian) Defconfig regarding audio: CONFIG_AUDIO=y CONFIG_AUDIO_BUFFER_NUMBYTES=6144 (from the i2s buffer which is 8192 bytes, 3/4 of it is "useful" info, 6144 bytes in total) CONFIG_AUDIO_DMA=y CONFIG_AUDIO_FORMAT_RAW=y CONFIG_AUDIO_I2S=y CONFIG_DMA=y CONFIG_DMA_LINK=y CONFIG_DRIVERS_AUDIO=y CONFIG_ESP32_I2S0=y CONFIG_ESP32_I2S0_BCLKPIN=25 CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_24BIT=y CONFIG_ESP32_I2S0_DINPIN=26 CONFIG_ESP32_I2S0_SAMPLE_RATE=8000 CONFIG_ESP32_I2S0_WSPIN=27 CONFIG_ESP32_I2S=y CONFIG_I2S_DMADESC_NUM=4 I tried modifying the number of audio buffers and also making them bigger, but that did not solve the problem. Any ideas on what could cause this? Regards, Simona