Ai-Thinker-Open / ESP32-A1S-AudioKit

Ai-Thinker AudioKit Board SDK - 安信可 esp32-a1s 音频模组开发板
Other
132 stars 63 forks source link

Correct pins for V2.2 2957 board #42

Closed SerdarAbali closed 1 year ago

SerdarAbali commented 1 year ago

I decided to skip this since it has too many irrelevant responses and super difficult to find a proper solution. Has anyone fixed this problem with the V2.2 2957 board?

E (1026) AUDIO_HAL: codec init failed! E (1026) AUDIO_BOARD: /home/test/esp/ESP32-A1S-AudioKit/components/audio_board/ai_thinker_audio_kit_v2_2/board.c:55 (audio_board_codec_init): Got NULL Pointer E (1036) AUDIO_HAL: audio_hal handle is null

and @xuhongv what is your latest fix regarding the issue?

Thanks in advance.

lderani commented 1 year ago

Hello all,

I have the 2957 board, and made a set of modifications to the board config files, and 8388 codec files as well.

So far I've got working:

1) All the buttons correctly identified (REC, MODE, SET, PLAY, VOL-, VOL+ from left to right)

Run the %ADF_PATH%\examples\checks\check_board_buttons example to verify it;

2) Line Out enabled (volume buttons work, they will change volume simultaneously on speakers/line out)

Run the %ADF_PATH%\examples\get-started\play_mp3_control example to verify it;

3) Recording In working (getting the input from MIC2 only, and a little low on the volume but it should be adjustable):

Run the %ADF_PATH%\examples\recorder\pipeline_recording_to_sdcard example  to verify it.

(Note : for this to work, it was essential to modify the board config files to DISABLE support for capacitive touch buttons. Since the A1S driver derived from the Lyra 4.3T, and the Lyra uses capacitive buttons but the A1S don't, they were causing a lot of crackling on the recording (interrupt issues I guess?) and make it unusable. As it is now, the volume is low but it works at least.)

As I don't know how to use Git (and I'm not ashamed to say that lol), I will include a set of .zip files which should be modified for the board to work. The file names says where they should be put, so if you gonna get them, make a backup of those files on the directory where they'll replace the originals.

My environment:

If it works for you and you think it's worth, feel free to make this set of modifications on a 'Git-Proper'(TM) way, since I don't know how :-) . Put-This-on-ESP_PATH_component_audio_board-directory.zip Put-This-on-ESP_PATH_components_audiohal-directory.zip Put-This-on-ESP_PATH_components_audio_hal_driver_es8388-directory.zip Put-This-on-ESP_PATH_components_esp_codec_dev_device_es8388-directory.zip

Hope it helps! Luis

trombik commented 1 year ago

here is my forked esp-adf that supports ESP32-A1S with ES8388. see the details at README.md.

by the way, the zip files @lderani mentioned in the above comment lack some files, and do not work.

lderani commented 1 year ago

Well, dunno why, but it works for me. Right now I'm compiling a project with IDF+ADF that uses wifi, sdcard, a serial control interface, web server, mic recording and media playing with volume controls using my mods. and it works fine :-) . But hey, the more the merrier! Thanks for putting your mods on a proper new fork, and good luck with your projects! 👍

SerdarAbali commented 1 year ago

I magically made it work by downgrading the IDF to version 4.2 or whatsoever, I cannot even recall. I also have the trash codec in my version on board which also means that some of ADF example don't work. I personally find this board absolutely useless and go for bare esp32 + standalone modules (SD + MAX98357A + display etc) and eventually design own pcb which seem to be way easier.

Sorry AI-thinker but next time make sure to follow what versions have which version of codecs when you design and sell a product.

You could have actively tested IDF versions and warn people with compability issues in readme in order to prevent wasting time and try/fail each version of IDF/ADF.

@lderani @trombik thank you very much for taking time to write your solutions. I hope the next person will find this thread and fix their boards.

trombik commented 1 year ago

instead of forking, i made a esp-idf component: https://github.com/trombik/esp-adf-component-ai-thinker-esp32-a1s