← index #8641Issue #4869
Related · high · value 1.474
QUERY · ISSUE

ESP32-C3 I2S

openby dave1167opened 2022-05-06updated 2025-01-03
port-esp32

Hi,
Is there any technical reason why I2S is missing from the ESP32-C3 build? Is there a likelihood it will be included in the future?
Many thanks

CANDIDATE · ISSUE

Add I2S Driver to ESP32 Makefile

closedby nevercastopened 2019-06-24updated 2019-06-25
port-esp32

Related to #4170 and #4821 regarding I2S support.

I am implementing a CModule as a demonstration on how to write CModules for MicroPython and what useful things can be done with them, CModules:https://docs.micropython.org/en/latest/develop/cmodules.html

I wanted to demonstrate a Python library that would play predefined audio files baked in to the firmware, for this I would use I2S and the internal DAC of the ESP32. Implement it in a CModule and show it off with some Python wrapper code.

While I have had good success running a custom python script from the micropython.mk file to generate the audio content, and have written a module that will play back these files. I've hit a snag with the i2s driver missing from MicroPython.

The errors during compile look like this

audio_ctrl.c:(.text.audioctrl_init_driver+0x33): undefined reference to `i2s_driver_install'
audio_ctrl.c:(.text.audioctrl_init_driver+0x5c): undefined reference to `i2s_set_pin'
audio_ctrl.c:(.text.audioctrl_init_driver+0x64): undefined reference to `i2s_set_dac_mode'
audio_ctrl.c:(.text.audioctrl_init_driver+0x6c): undefined reference to `i2s_zero_dma_buffer'

and they are caused by i2s.o being missing from ESPIDF_DRIVER_O in ports/esp32/Makefile

https://github.com/micropython/micropython/blob/3ee3995be1c6c461110d7908498777241e08a76a/ports/esp32/Makefile#L259-L273

I would like to petition that this driver is added to Micropython today, preemptive of the other issues currently open regarding I2S support, and to be permissive of mine CModules example.

Perhaps we can also discuss if there is a cleaner way to implement the functionality of including other drivers with the CModules micropython.mk Makefile, instead of editing the port.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied