Skip to content

Implement DAC-based audio (audioio) on Espressif #3898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dhalbert opened this issue Dec 30, 2020 · 8 comments · Fixed by #9995
Closed

Implement DAC-based audio (audioio) on Espressif #3898

dhalbert opened this issue Dec 30, 2020 · 8 comments · Fixed by #9995
Labels
audio enhancement espressif applies to multiple Espressif chips
Milestone

Comments

@dhalbert
Copy link
Collaborator

The DAC(s) support DMA, but it's not in the ESP-IDF API yet: espressif/esp-idf#6333. So we would wait for that.

@dhalbert dhalbert added audio espressif applies to multiple Espressif chips labels Dec 30, 2020
@dhalbert dhalbert added this to the Long term milestone Dec 30, 2020
@275RR
Copy link

275RR commented Jun 12, 2022

any update on this? I have a a MagTag

@ladyada
Copy link
Member

ladyada commented Jun 17, 2022

i think we were seeing weird results, when @jepler is back we can follow up with espressif on whether they fixed DMA DAC support on the S2

@gpeyton
Copy link

gpeyton commented Oct 11, 2022

@jepler @ladyada any update on this?

@ladyada
Copy link
Member

ladyada commented Oct 11, 2022

@gpeyton since you are bumping - please check with espressif if they have DMA support for the ESP32-S2 DAC, that was our hold up as you can read above

@jepler jepler removed their assignment Nov 29, 2022
@dhalbert dhalbert changed the title Implement DAC-based audio on ESP32-S2 Implement DAC-based audio (audioio) on ESP32-S2 (and ESP32) Jul 25, 2023
@dhalbert dhalbert changed the title Implement DAC-based audio (audioio) on ESP32-S2 (and ESP32) Implement DAC-based audio (audioio) on Espressif Oct 25, 2023
@tmkasun
Copy link

tmkasun commented Oct 9, 2024

@ladyada and team, it looks like DAC DMA is now supported in Espressif: https://github.com/espressif/esp-idf/blob/master/components/esp_driver_dac/esp32s2/dac_dma.c.

If you could provide some guidance, I’d be happy to work on adding this support to CircuitPython.

@tannewt
Copy link
Member

tannewt commented Oct 9, 2024

@jepler Do you have a WIP branch somewhere that @tmkasun could start with?

Otherwise @tmkasun I'd suggest looking at how I2SOut is implemented and convert it into audioio.

@jepler
Copy link

jepler commented Oct 9, 2024

@tannewt no I don't think I have any WIP branch related to this

@jepler
Copy link

jepler commented Oct 9, 2024

The esp-idf docs make it sound like we would want to use continuous dma mode with asynchronous writing: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/dac.html#continuous-wave-output-continuous-dma-mode

the on_convert_done callback would be comparable to the function i2s_event_interrupt providing the next buffer to be filled in a background callback.

Thanks for looking at adding this to CircuitPython @tmkasun !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio enhancement espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants