-
Notifications
You must be signed in to change notification settings - Fork 64
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
Codec initialization fails #26
Comments
Hi @mihovilkolaric , AC101 init failing -
Serial Output : |
Recent AI Thinker boards V2.2 2957 are using A1S designs where the AC101 was replaced by the ES8388 eventually these are the wrong boards for this A1S version. It could be possible that all recent boards are defective if the outputs of the A1S-ES8388 are not compatible to the 2.2 Audio Kit board... I did not receive an official statement regarding this mess yet... please ask the AI Thinker support. However I have created an Arduino file which autodetecs your HW wether you're having an AC101 or the ES8388 based design... AI Thinker confirmed they created these A1S ES8388 based chips... they gave no answer why tho. You see the chip when removing the EM shield - or upload the arduino file... |
Hi @PratyushGehlot am facing the same issue. Did you find any solution? Hi @xpeace Did you mean that the board is faulty? Or we will have to use driver for ES8388? |
@maqsudbd : when using the driver for ES8388 (tried this by changing the "Audio Board" to LyraT 4.3 in make menuconfig), the codec can be initialized, but on the headphones-jack of the audio-board you hear only one channel, the volume is very low (hardly hearable), and can not be controlled by software. |
@mihovilkolaric Thanks for update. I was planning to use Arduino, made a code for AC101 and I was able to made it work for a friend. Now I am stuck and hope someone will find a solution. I think datasheet of the used A1S (with ES8388) will help to find the root cause. I hope the board is not faulty by design. |
Eventually GPIO 21 needs to be activated to enable the amp... The A1S was so much better than the LyraT -
It would be sufficient for me to get just one channel mic in / headphone out... Anyone willing to unsolder the ES32-A1S 2974 from the Ver 2.2 2957 board |
Additionally I`ve found this pdf reflecting changes in the A1S board... https://www.docdroid.net/L6LX9SK/esp32-a1s-esv23zh-cnen-pdf /* I2C gpios */ It does also mention a V2.3 Audio Kit - while AI Thinker put them on a V2.2 pcb... I now have stereo playback - headphone jack insertion event on the A1S is mapped to Key 3 when using LyraT 4.3 profile. Volume control seems to be accepted - but there is no change in volume output on the headphone. |
Most recent V2.3 pdf... https://docs.ai-thinker.com/_media/esp32-a1s_v2.3_specification.pdf |
@xpeace Thanks for sharing the pdf. It seems the board is not faulty rather a new one with new design. I2C are now on different pins (23,18 now, before 32,33). Also the I2S pins are different. |
Apart from headphone recognition I got all the functions I need working. |
New modified ESP-ADF git: https://github.com/SeaHi-Mo/esp-adf |
Hi |
I think the question is not about the amp, to increase the mic input sensitivity AGC (Automatic Gain Control) needs to be enabled. Unfortunately it is not possible to increase the pga (programmable gain amplifier) unit without enabling AGC and adjusting the corresponding values. Here is the settings section I am using to test the mic input. Enable the deemphasis to reduce the quantization noise - and try to reduce any heavy calculation during capture :)... Imho the biggest feature with this chip is - you got the cpu's impacting the AD signal path. Boot buttons and Key6 is also interfering the signal capture - anyone knows what`s up there ?
|
Same Issue for me with a new ESP32 Audio Kit V2.2 3378.....I have an ES8388 but it is on the I2C 33/32....and now i not very sure about the I2S pinout....i have read so many configurations :-(. |
If they change the codec and change also the pinout between the different productions.... |
I can find any schematic with the I2C 33/32 and the ES8388 !!! |
and i confirm my A1S board is not the same as the Xpeace picture....the components are not in the same place. |
@GillesLACAUD @xpeace @rxd1999 @mihovilkolaric hi , we change the i2s port in the newest A1S module: |
Hi Xuhongv. |
I am sorry but i am a little bit lost... When i search i find this in the 2 repo: For the ADF github |
You can use the sdk on ESPRESSIF ADF github , and then you alter the i2s pins . |
And the I2C pins too... |
Could you also tell us how we can find an identification of the version of the A1S module ? How we can know if we have an AC101, an ES8388 with 18/23 on I2C and an ES8388 with 33/32 on I2C ? |
You can see the bottom font of the module. |
I think you have an ES8388 codec and not an AC101. AC101 is only for the old version. |
En la libreria https://github.com/schreibfaul1/es8388 Modifique la dirección del dispositivo de 0x1a a 0x10 en el archivo ES8388.cpp #include <Arduino.h> #define ES8388_ADDR 0x10 Proceda a escribir este programa // the pin assignment matches the Olimex ADF board #include "Arduino.h" #define SD_CS 13 // GPIOs for SPI // I2S GPIOs // I2C GPIOs // Amplifier enable char ssid[] = "XXXX"; int volume = 100; // 0...100 ES8388 es; //---------------------------------------------------------------------------------------------------------------------- void setup() SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI); SD.begin(SD_CS); WiFi.mode(WIFI_STA); while (WiFi.status() != WL_CONNECTED) { Serial.printf_P(PSTR("Connected\r\nRSSI: ")); Serial.printf("Connect to ES8388 codec... "); es.volume(ES8388::ES_MAIN, volume); // Enable amplifier audio.setPinout(I2S_BCLK, I2S_LRCK, I2S_SDOUT); audio.connecttohost("http://mp3channels.webradio.antenne.de:80/oldies-but-goldies"); //audio.connecttoFS(SD, "01/001.mp3"); // optional Modificar la linea de la dirección |
Yo descargue está librería con un ESP32-A1S que internamente tiene un AC101
https://github.com/Yveaux/AC101
y funcionó correctamente
El mié, 24 nov 2021 a las 17:40, Gilles Lacaud ***@***.***>)
escribió:
… I think you have an ES8388 codec and not an AC101. AC101 is only for the
old version.
Please read carefully all the post and i pretty sure you will find the
solution
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMAV5RSS6FRK7EVWIX26R3UNVSWJANCNFSM477C4GUA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
hi, i am get same issues using version 2.3, e3833 IC codec. |
Well, it looks exactly the same as mine but mine is 3378. I use it for squeezelite player and found some pin configuration: dac_config": "model=ES8388,bck=27,ws=25,do=26,sda=33,scl=32,i2c=16" |
@xuhongv Did you have any idea about the 3478 boards ? |
@superjasiek Thank you very much, I will try! |
The version on the ESP32 Audio Kit is not important. The difference is in the ESP32-A1S module. |
Did someone has some trouble with the TP4065 ?....When the component is in charging mode (only red led on) I can hear some noise and whistle on the audio output. |
My project includes: Internet streaming playback and I2C LCD 1602 display. The problem is that the board sometimes restarts by itself. The es8388 audio codec uses the pins: (IIC_CLK 32, IIC_DATA 33), while the LCD display uses the pins: (IIC_DATA 21, IIC_CLK 23). I am looking for a complete description of all pins for this version 3478. #define SPI_MOSI 15 #define I2S_DOUT 26 #define ES8388_IIC_CLK 32 #define GPIO_PA_EN 21 #define LED_BUILTIN 22 |
I'm able to play MP3 songs from sd using examples but unable to record anything. i also have the same issue does anyone got the solution?? |
It seems to me that it is possible to distinguish the 2 different variants of the ESP A1S ES8388 module by visual inspection. As previous posters noted, the label 2974 is used on both variants, so this is not the way to do it. However, looking at the right side of the module where the shield leaves an opening (orientation: antenna top), you can see different component layouts. The newer variant with I2C on 33/32 has from left to right 3 very small components and then 2 large capacitors. Of course, the easiest way is to have the software scan then I2C bus with both pin configurations and see if there is a response. |
Hey Bro!!!! I found the problem and solution too. After I got an audio output, I read one comment on Github that someone is getting recorded buzzing sound whenever he rubs the finger on mic3 and mic4 pads on PCB. So basically the problem is in LyraT boards config. It is by default uses AUDIO_HAL_ADC_INPUT_LINE1. But in AudioKit inbuilt microphones are connected on AUDIO_HAL_ADC_INPUT_LINE2. To change this in your esp-adf edit this file: At line number 42 change AUDIO_HAL_ADC_INPUT_LINE1 to AUDIO_HAL_ADC_INPUT_LINE2. This will record input from microphones and line-in aux pin. Here is a codec config after change.:::: #define AUDIO_CODEC_DEFAULT_CONFIG(){ |
..............Waooooo.... Worked like a magic ... Thank you |
Hi everyone, I have no luck on getting the jack microphone audio into the board. I fixed the headphone out volume as suggested before. Thanks @tttin46
Still have problem with audio input from jack. |
Beware for your ears: The code below with a volume of "100" will make the output !LOUD!. The output will be 33db louder compared to previously posted code. So 11times louder (right?). The code from @pierluigizagaria and @lderani enabled me to control the output volume. Going through the documentation (https://dl.radxa.com/rock2/docs/hw/ds/ES8388%20user%20Guide.pdf) i think there is a small issue to be resolved. The volume of LOUT1, ROUT1, LOUT2 and ROUT2 is set in "+db", while the LDACVOL and RDACVOL are set in "-db". Thus the given code partially negated the output volume. Please see my code as a suggestion (2957 ES8388 board). I here set "0db" to get maximum output/volume:
|
Thank you folks, I've solve a lots of problem with this post. and with faust, I can generate the sound but MIC and Line In never work... |
BTW, I can read es8388 reg with I2C and... today I found the solution config.adc_input = AUDIO_HAL_ADC_INPUT_LINE2; //set the codec input configuration ==================================================
|
I could't get the board work with the esp-adf v.2.4.1, anyone managed to get it working? |
Most of solutions are mentioned above. |
I am using esp32 audiokit v2.2 a149 |
Have a nice day, everyone. Всём хорошего дня. |
Due to many irrelevant responses to original post, I am still unsure which pins are correct, what version should use what path to make a succesful compile and play a sample mp3. This post became anything but "Codec initialization fails" and 2957 model. I also have V2.2 2957 and get the same exact error as in first post. Does anyone have any idea if this board is trash, should I waste anymore time or not? So what is the solution? |
Hi everyone, I posted a set of .zip files that contains the modifications I've made so far to make the ESP32-A1S work with ESP-ADF (4.2.2). See my reply in issue #42 to get the details. I hope it helps! Luis. |
I just compared the PDF shown in #26 (comment) with the datasheet shown here: https://docs.ai-thinker.com/_media/esp32-audio-kit_v2.2_sch.pdf It is either too late in the evening or MIC1 is connected to PIN 17 and 18 which is then internally connected to MIC1N and MIC2P??? Same goes for MIC2 which is connected to pin 14 and 15 which is internally connected to MIC2N and MIC1P?? |
I bought a "ESP32 Audio Kit v2.2 2957" and installed the toolchain as described in this readly, and the ADF (+IDF) from this repo.
I can compile and flash all examples I tried so far (here, e.g. ESP32-A1S-AudioKit/examples/get-started/play_mp3), but when running them, I find following errors on the serial console:
and do not hear anything in the earphones.
I verified that in
make menuconfig
the boardESP32-AiThinker-audio V2.2
is selected.What can I do to fix this issue?
The text was updated successfully, but these errors were encountered: