miketeachman / micropython-esp32-i2s-examples

Usage and examples for I2S support on the ESP32 microcontroller
MIT License
156 stars 29 forks source link

Audio output on internal DAC? #11

Open zeekoe opened 4 years ago

zeekoe commented 4 years ago

Hi,

Great work, looks nice! I've been searching around for a while to see if/how I can output audio on the internal DAC using DMA. Because I like to have sound, and low quality is fine. Apparently, the I2S thingy inside the ESP32 can route it's audio to the DAC. I've seen some C examples that do stuff like that, but diving into C is quite a lot more hassle than python... In your readme I can't see things that point into that direction. Is it just not supported, or is it not documented?

Kind regards, Ronald

miketeachman commented 4 years ago

Hi Ronald, At the moment, the I2S pull request does not support output to the DAC. Only Philips I2S protocol is supported. I may implement the DAC feature after I finish I2S support for the PyBoards. That will be at least 6 months out.

The Loboris ESP32 port offers I2S/DAC support. You may want to try that port.
https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/dac https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo https://forum.micropython.org/viewtopic.php?t=5900#p33902

zeekoe commented 4 years ago

Thanks. Sorry for not replying. So it seems I have to choice currently between adding a 4 MB flash chip (my doesn't have) or adding an external DAC. Don't have time to do it myself either, so I'll just wait. :) It's only for a toy project anyway.