Hi Simon,

Lucas just confirmed that it was working fine on Lyra T with ES8388 Audio Codec.

I think she is using SDCard over SPI (even slower).

There is not SDCard interface support for ESP32 on NuttX yet (the
SDCard uses/shares I2S interface).

The ESP32 MCU has 2 I2S interfaces, so in theory one can be used for
Audio and other for SDCard.

The ESP32-S2 has only 1 I2S interface, so I don't know if it will work well.

Hopefully ESP32-S3 has 2 I2S as ESP32.

BR,

Alan

On 10/20/23, Simon Filgis <si...@ingenieurbuero-filgis.de> wrote:
> Hi Simona,
>
> SD Cards have busy time times of 500ms max (per spec) for saving data
> internally. I saw SD Cards taking over a second of busy time.
>
> You can check with the Oszilloskop. I think data0 is the pin that signalize
> busy...
>
> Per design, you need a stream buffer that can handle your audio stream up
> to 500ms...
>
> Regards,
>
> Simon
>
> --
> Ingenieurbüro-Filgis
> USt-IdNr.: DE305343278
> --
> sent by mobile phone
>
> Alan C. Assis <acas...@gmail.com> schrieb am Do., 19. Okt. 2023, 23:36:
>
>> Hi Simona,
>>
>> On 10/19/23, Simona Toaca <simona.alexandra2...@gmail.com> wrote:
>> > 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?
>> >
>>
>> Could it be something related to SDCard storage? Maybe it needs some
>> optimization!
>>
>> Please try using a RAMDISK of 1MB+ and save the file to it.
>>
>> If it works we will know the SDCard could be the limitation of this
>> configuration.
>>
>> BR,
>>
>> Alan
>>
>

Reply via email to