Closed MrBuddyCasino closed 7 years ago
No experience but i2s_set_pin https://github.com/MrBuddyCasino/ESP32_MP3_Decoder/blob/master/main/app_main.c#L304 Looks like should be called with null value https://github.com/espressif/esp-idf/blob/master/components/driver/i2s.c#L390
Good catch! Will try that out.
Makes a sound now, but nothing you'd want to listen to.
Hmm have you tried to use only I2S_MODE_DAC_BUILT_IN flag
Yes, look at he init_i2s_dac() function in app_main.c. Its doing exactly what the sample code in i2s.h says we should do:
` * ----------------EXAMPLE USING I2S WITH DAC ---------------------
Fyi, it seems the I2S driver has a bug in DAC mode: the sample rate it sets is actually 8 times the sample rate you tell it to use. I have a bug fix in the internal merge queue, it will probably be merged after the holidays.
When will this bug fix be available?
The SDK fix hasn't landed yet, but in theory you can workaround the issue by modifying set_dac_sample_rate(int rate) and init_i2s_dac() to divide the sample rate by 8. Haven't tested that, though.
Supersat's changes indeed fix this issue. I2S codec no longer strictly required. :-)
Running without the I2S codec can be activated by uncommenting "#define USE_DAC", but this does not currently work.
If anyone has experience using I2S_MODE_DAC_BUILT_IN, please have a look!