AI-Thinker A1S Audioboard

Recurrent H/W and software problems
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

AI-Thinker A1S Audioboard

Post by RonS »

Hello;
have such a board here... with a lot of reading I got an Arduino code to work
this Board has an integreted ES8388 I2S Audiochip on board

has some body expierieces to got it to run with annex basic? or could it be integrated as a "module"?
I have already tried all possible settings in the "config"

the ESP works in itself but I get no audio (stream) to hear wifi at all is ook

Thank you for your efforts

Ron

https://de.aliexpress.com/item/40001309 ... =glo2deu"?
ESP32_ES8388.zip
You do not have the required permissions to view the files attached to this post.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

in the attachment still the data sheet of the Es8388
- this would have to be initialized before use annex play.xxxx
It worked once when I switched from Arduino to Annex

the initialization probably remained in memory
could somebody help me writ a suroutine for I2s initialisation ??? found this still
[urlhttps://pcbartists.com/firmware/stm32-firmware/stm32-audio-tutorial-part-2-codec-i2c-setup/][/url]
You do not have the required permissions to view the files attached to this post.
Last edited by RonS on Wed Mar 22, 2023 3:50 pm, edited 1 time in total.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1272 times
Contact:

Re: AI-Thinker A1S Audioboard

Post by cicciocb »

You must select the right pinout in the config page for the I2S DAC
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

hi, thanks
but i have used the pinouts from the working ...ino code doesnt work
the es8388 must be initialized unconditionally is also done at Arduino have changed a post see please3 above
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1272 times
Contact:

Re: AI-Thinker A1S Audioboard

Post by cicciocb »

Code: [Local Link Removed for Guests]

bool setPinout(uint8_t BCLK, uint8_t LRC, uint8_t DOUT, int8_t DIN=I2S_PIN_NO_CHANGE);
esp_err_t i2s_mclk_pin_select(const uint8_t pin);

// I2S GPIOs
#define I2S_SDOUT     26
#define I2S_BCLK      27
#define I2S_LRCK      25
#define I2S_MCLK       0
#define I2S_DOUT      35 

audio.setPinout(I2S_BCLK, I2S_LRCK, I2S_SDOUT);
audio.i2s_mclk_pin_select(I2S_MCLK);
you should set BCLK=27, WSEL=25, DOUT=26 but, looking at the code, it seems that the DAC requires the MCLK signal that is not actually supported.
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed Mar 22, 2023 4:04 pm

Code: [Local Link Removed for Guests]

bool setPinout(uint8_t BCLK, uint8_t LRC, uint8_t DOUT, int8_t DIN=I2S_PIN_NO_CHANGE);
esp_err_t i2s_mclk_pin_select(const uint8_t pin);

// I2S GPIOs
#define I2S_SDOUT     26
#define I2S_BCLK      27
#define I2S_LRCK      25
#define I2S_MCLK       0
#define I2S_DOUT      35 

audio.setPinout(I2S_BCLK, I2S_LRCK, I2S_SDOUT);
audio.i2s_mclk_pin_select(I2S_MCLK);
you should set BCLK=27, WSEL=25, DOUT=26 but, looking at the code, it seems that the DAC requires the MCLK signal that is not actually supported.
As I said I have already tried it and it ran once when changing from Arduino to Annex must have been the initialization still in memory
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

I even took pictures because I was so happy but after a power off nothing worked anymore :x
DSCN0475.JPG
DSCN0477.JPG
You do not have the required permissions to view the files attached to this post.
Last edited by RonS on Wed Mar 22, 2023 4:25 pm, edited 1 time in total.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1272 times
Contact:

Re: AI-Thinker A1S Audioboard

Post by cicciocb »

You can still play with Arduino, it's so easy to use :D :mrgreen:

Unfortunately the MCLK signal is not considered as most of the I2S DAC do not use it
RonS
Posts: 115
Joined: Thu Mar 02, 2023 10:15 pm
Location: germany
Has thanked: 64 times
Been thanked: 23 times

Re: AI-Thinker A1S Audioboard

Post by RonS »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed Mar 22, 2023 4:25 pm You can still play with Arduino, it's so easy to use :D :mrgreen:
If I wanted to, I wouldn't have asked here - can you help me write such an init code?
please :) :) :)
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1272 times
Contact:

Re: AI-Thinker A1S Audioboard

Post by cicciocb »

With peek and poke should be possible ... maybe the guy that asked for these functions can do the job :D

this is what must be done

Code: [Local Link Removed for Guests]

PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0_CLK_OUT1);
WRITE_PERI_REG(PIN_CTRL, 0xFFF0);
The datasheet is here
https://www.espressif.com/sites/default ... ual_en.pdf
starting from page 48

edit:
probably is simpler to integrate in the code? :roll:
Post Reply