Page 1 of 2

ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 3:29 am
by puterwang
Hi, All
We are building a system using ESP32 chipset. The chip supports both I2S input and output, but till now we cannot find any detail information about ESP32 I2S interface. Is there any guys from Espressif can describe how to use the I2S interface?
If the formal document has not been ready, it's OK. The first step we want to know is how to connect the chip to an external audio codec, thanks!

Regards,
Lake

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 6:11 am
by ESP_Sprite
Unfortunately, I2S documentation is not ready yet indeed. Both I2C periherals are fully routable via the GPIO matrix, so you should be able to connect your codec to any GPIO pin (that is output-capable, for pins where you want to output a signal).

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 7:31 am
by puterwang
When the document will be avaiable? Has Espressif qualified I2S and I2C interface internally? I just want to know if I2S interface is working or not.
BTW, if I want to get MCLK (master clock) from ESP32, how can I get the signal? Thanks!

Regards,
Puter

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 8:38 am
by WiFive
ESP_Sprite wrote:Unfortunately, I2S documentation is not ready yet indeed.
No updates to TRM or drivers in almost a month. :(

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 8:43 am
by puterwang
When the document will be avaiable? The external codec I want to use need MCLK (master clock) from ESP32, do you have any suggestion?


Thanks!

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 12:12 pm
by ESP_Sprite
I2S output is working, we have tested that. I2S input is working, but we only tested the parallel input of the module. There's no reason to believe normal I2S wouldn't also work. The I2S peripheral is also supposed to have a separate PLL to generate precise clocks, I do not know what the state of that is; the tests we did up till now all used a divided APB clock as a clock source.

Re: ESP32 I2S input and output interface

Posted: Fri Oct 21, 2016 12:16 pm
by ESP_Sprite
WiFive wrote:
ESP_Sprite wrote:Unfortunately, I2S documentation is not ready yet indeed.
No updates to TRM or drivers in almost a month. :(
Aye, lots of other things interfering... If any, the MMU/MPU chapter is almost done and should be added soon. UART and SPI are also in the queue to be released. No idea on the status of I2S, sorry. We do have an internal I2S audio driver, maybe we can add that to the driver component as a stopgap measure.

Re: ESP32 I2S input and output interface

Posted: Mon Oct 24, 2016 1:05 am
by puterwang
May I have a copy of the internal I2S driver? Thanks!

Re: ESP32 I2S input and output interface

Posted: Tue Oct 25, 2016 11:23 am
by juris8
Hi, I building audio application with ESP32 too. I was able to enable I2S clock, rout I2S signals to GPIO trough GPIO_matrix, setup periferal clock and sample rate. I still need to switch serial data output/input, don't know how :(
I manage to do it based on this file "esp-idf/components/esp32/include/soc/i2s_reg.h", but there is no description of I2S registers, names only. So may I ask for more detailed description of I2S registers ?

Now I figuring out DMA and link to I2S interface. DMA interface is described here "esp-idf/components/esp32/include/rom/lldesc.h"
If anyone have same have some data on this please share, it will be huge help ! Thanks.

Re: ESP32 I2S input and output interface

Posted: Tue Oct 25, 2016 2:31 pm
by WiFive
Well you can look at https://github.com/espressif/ESP31_RTOS ... iver/i2s.c to get some ideas