esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

Add support of ESP32-A1S-Audio-kit (AUD-3619)

Open zhangtemplar opened this issue 3 years ago • 10 comments

It is based on information from

  • https://docs.ai-thinker.com/en/esp32-audio-kit
  • https://github.com/Ai-Thinker-Open/ESP32-A1S-AudioKit

Tested with examples/player/pipeline_sdcard_mp3_control

Note only two keys (key 1 and key 2) are working.

zhangtemplar avatar Feb 14 '22 07:02 zhangtemplar

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Feb 14 '22 07:02 CLAassistant

Thanks for sharing! Is there anything that can be done to make the other buttons work?

pierluigizagaria avatar May 29 '22 09:05 pierluigizagaria

@zhangtemplar

Thanks for your works!

Since the ESP32-A1S-Audio-kit is not an espressif official development board, this PR may need to be discussed.

HengYongChao avatar May 31 '22 03:05 HengYongChao

I've tried to checkout at 2.4 version and do a merge with zhangtemplar/master but it's giving me some compilation error after the merge resolve.

../main/voip_app.c: In function 'app_main':
../main/voip_app.c:460:49: error: implicit declaration of function 'INPUT_KEY_DEFAULT_INFO'; did you mean 'ETH_PHY_DEFAULT_CONFIG'? [-Werror=implicit-function-declaration]
     input_key_service_info_t input_key_info[] = INPUT_KEY_DEFAULT_INFO();
                                                 ^~~~~~~~~~~~~~~~~~~~~~
                                                 ETH_PHY_DEFAULT_CONFIG
../main/voip_app.c:460:49: error: invalid initializer
../main/voip_app.c:476:58: error: 'INPUT_KEY_NUM' undeclared (first use in this function)
     input_key_service_add_key(input_ser, input_key_info, INPUT_KEY_NUM);
                                                          ^~~~~~~~~~~~~
../main/voip_app.c:476:58: note: each undeclared identifier is reported only once for each function it appears in
../main/voip_app.c:476:58: warning: passing argument 3 of 'input_key_service_add_key' makes integer from pointer without a cast [-Wint-conversion]
In file included from ../main/voip_app.c:24:
D:/Espressif/.espressif/esp-adf/components/input_key_service/include/input_key_service.h:109:125: note: expected 'int' but argument is of type 'input_key_service_info_t *' {aka 'struct <anonymous> *'} esp_err_t input_key_service_add_key(periph_service_handle_t input_key_handle, input_key_service_info_t *input_key_info, int add_key_num);
                                                                                                                         ~~~~^~~~~~~~~~~
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.

pierluigizagaria avatar Jun 08 '22 11:06 pierluigizagaria

Got the voip example working thanks to this PR. The sound quality is horrible. is it normal? is the sound quality acceptable for supported boards?

pierluigizagaria avatar Jun 10 '22 13:06 pierluigizagaria

@zhangtemplar

Thanks for your works!

Since the ESP32-A1S-Audio-kit is not an espressif official development board, this PR may need to be discussed.

Happy to discuss.

zhangtemplar avatar Jul 04 '22 22:07 zhangtemplar

Got the voip example working thanks to this PR. The sound quality is horrible. is it normal? is the sound quality acceptable for supported boards?

I didn't test the VoIP example. If you have the code, I may test it (it could be very slow as I am doing this for a hobby).

zhangtemplar avatar Jul 04 '22 22:07 zhangtemplar

Thanks for sharing! Is there anything that can be done to make the other buttons work?

I realized it is a malfunction of my board. When I compared my board to other's board of the model, my board lacked some resistor/capacitor for those buttons.

zhangtemplar avatar Jul 04 '22 22:07 zhangtemplar

Hi this will be really nice to have I have the same board

nicola-lunghi avatar May 04 '24 09:05 nicola-lunghi

@zhangtemplar I think you should sign the contributor agrement license. Happy to take this on if it makes this board works I have 3 of them :-)

nicola-lunghi avatar May 04 '24 09:05 nicola-lunghi