1. Prerequisites
The premise for implementing the contents of this section is that the official ESP-IDF framework and ESP-ADF framework of Espressif have been successfully compiled.
Here we use the esp-related plug-ins in the vscode environment. After successfully stepping on the previous pitfalls, vscode can complete the clone and build of the official example.
Here we select the basic example in exampe to play MP3 audio files. The MP3 files are directly downloaded to the board with the project, without the need for an SD card.
2. Preparation
In vscode, press ctrl+shift+p, enter the example keyword, select "Show example project", select "use current ESP-ADF" in the pop-up options, and then select "play_mp3_control" in get-started in the pop-up window. At this time, some relevant information of this project will be displayed on the right, such as the officially supported development boards, how to use it, etc.
Click the "create..." button on the right to create a backup of this sample project.
3. Pin Adaptation
Here we mainly refer to the official ESP32-LyraT V4.3 development board of Anxinke. The ESP32-Audio-Kit audio development board uses the ESP32-A1S module, which has the same decoding chip 8388 as the ESP32-LyraT, so the driver can be used directly. The main difference is the difference in the pins used.
The above is the official main pin assignment of Espressif
ESP-A1S corresponding pin assignment
Open the esp-adf/components/audio_board/lyrat_v4_3/board_pins_config.c file and make the following changes:
I2C interface:
is modified to:
I2S interface:
is modified to:
Then, save the changes.
4. Menuconfig in vscode
Press the key combination ctrl+shift+p, enter the keyword "esp", and find the following options
In the graphical configuration interface that opens, select ESP32-LyraT V4.3 in the "audio HAL" option. Click Save.
5. Compilation
to be continued...
Replenish:
ESP32-A1S environment construction and use https://docs.ai-thinker.com/esp32-a1s/env
ESP32-A1S audio module overview: https://docs.ai-thinker.com/esp32-a1s
ESP32 Audio Product Design Guide https://docs.ai-thinker.com/_media/esp32/docs/esp32_audio_design_guide.pdf