ESP32 library for Sparkfun VS1053 module

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
Bromium
User
Posts: 2
Joined: Mon 2022-03-21 11:16

ESP32 library for Sparkfun VS1053 module

Post by Bromium »

Hi - I am having difficulty finding a library for the Arduino IDE to control the Sparkfun VS1053B shield via an ESP32. I am currently using an Arduino Mega and the library SFEMP3Shield for an SD player, and which works very well. But this will not port to the ESP32.

Please advise where I can find such software? On GitHub all I can find are Web Radios for the ESP32. But I need a pure DREQ interrupt driven SD player.

Searching the VSDSP Forum, I find a related post indicating that the package SFEMP3Shield has been used - but no instructions on how to port that to an ESP32. viewtopic.php?t=2362

Many thanks.
Bromium
User
Posts: 2
Joined: Mon 2022-03-21 11:16

Re: ESP32 library for Sparkfun VS1053 module

Post by Bromium »

This has been solved. A good driver for the vs1053 on a ESP32 is the Adafruit VS1053 library as modified by JohnJJG and Dan Clarke at Github.

https://github.com/JohnJJG/ESP32_Pico_VS1053
Jay
User
Posts: 5
Joined: Tue 2024-01-23 17:20

Re: ESP32 library for Sparkfun VS1053 module

Post by Jay »

Hi there

Does this Library support FLAC format audio playback?
I had same problem all i found on GitHub is Internet Radio with ESP32, but I also found library for vs1053 modified for esp32,
https://github.com/baldram/ESP_VS1053_Library
There is some good Library but all for Arduino.

- Jay
User avatar
pasi
VLSI Staff
Posts: 2136
Joined: Thu 2010-07-15 16:04

Re: ESP32 library for Sparkfun VS1053 module

Post by pasi »

Jay wrote: Thu 2024-01-25 10:13Does this Library support FLAC format audio playback?
https://github.com/baldram/ESP_VS1053_Library
It seems to load some version of the vs1053b patches package (if it detects vs1053b), so it probably plays FLAC. FLAC is also mentioned in the description's decoder list.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Jay
User
Posts: 5
Joined: Tue 2024-01-23 17:20

Re: ESP32 library for Sparkfun VS1053 module

Post by Jay »

yeh, I do find patch (.plg) file but I didn't find any Function to play Audio from SD Card, so now I am using Adafruit's library, and what is the address of HDAT1 register of vs1053?
found on this form that HDAT1 register gets changed to FF but I don't know at which hex address the register is, so from google and found tried 0x1A but it doesn't seem to change even when FLAC or MP3 is playing it always shows '0' at output, and also shows '0' in .Ogg audio,
I mean I tried to load FLAC plugin (.plg) to vs1053 and maybe it loaded because there is no error in serial monitor

Code: Select all

if (! musicPlayer.loadPlugin("/vs1053b-patches-flac-latm.plg")) {  
Serial.println(F("Patch not Load"));
    while (1);
  }
but there is no audio output at vs1053, what should i do?
even i changed .plg file to .bin file, there is no sound from vs1053.

- Jay
User avatar
pasi
VLSI Staff
Posts: 2136
Joined: Thu 2010-07-15 16:04

Re: ESP32 library for Sparkfun VS1053 module

Post by pasi »

SCI_HDAT1 is the SCI register number 9. See the datasheet for the SCI register descriptions. (There are only 16 SCI registers, so 0x1a may be interpreted as SCI_AIADDR.)

HDAT1 is 0 when nothing is decoded and shows the detected format otherwise.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Post Reply