1.4. lv_demo_music
1.4.1. Overview
The music player demo shows what kind of modern, smartphone-like user interfaces can be created on LVGL, and can play music.
Please refer to official lv_demos github
1.4.2. Project Configuration
In the file
CMakeLists.txt, set a matched audio codec type according to the development board schematic,e.g. “set(CONFIG_CODEC “sgtl5000”)”
1.4.3. Board Settings
Attach LCD panel to the board LCD interface.
Attach MicroSD card that stores songs in WAV format into the card slot;
According to project configuration, connect speaker to DAO interface if using DAO as player, connect headphone to headphone interface if using audio codec as player.
1.4.4. Known issues
When using DAO to play some audio, it may generate noise.
1.4.5. Running the Demo
lvgl music will be shown on the LCD panel and can operate play/pause, next, previous.
1.4.6. Remark
As framebuffer and mp3 decoder occupies a large amount of memory, please specify HPM_BUILD_TYPE as flash_sdram_xip. The following commands can be executed:
cmake -GNinja -DBOARD=hpm6750evkmini -DHPM_BUILD_TYPE=flash_sdram_xip -DCMAKE_BUILD_TYPE=debug ..
The sample rate of MP3 files must be less than or equal to 48000 Hz