baldram / ESP_VS1053_Library

A library for VS1053 MP3 Codec Breakout adapted for Espressif ESP8266 and ESP32 boards.
https://platformio.org/lib/show/1744/ESP_VS1053_Library
GNU General Public License v3.0
114 stars 36 forks source link

Add I2S output feature #91

Closed episource closed 2 years ago

episource commented 2 years ago

VS1053B has builtin support for I2S output, which is disabled by default and uses GPIO4-7.

This PR adds methods to enable I2S output.

baldram commented 2 years ago

Hi @episource thanks for your contribution and valuable feature! I like the enum, descriptive well-named constants, and overall self-descriptive clean code! Thanks!

Do you see a possibility of extending README.md documentation? Some new section or so, and hints on why, when and how to use those features? Some example code snippet? Or maybe adding more detailed DOC in code comment for those two new methods, like an example here: https://github.com/baldram/ESP_VS1053_Library/blob/master/src/VS1053.cpp#L417 (actually you did it right, the *.h file is the right place for doc comments).

What do you think?

episource commented 2 years ago

I've extended the README.

I2S output has been tested successfully using a VS1053 breakout board by Adafruit together with Adafruit's I2S Stereo decoder UDA1334 breakout.

My goal is to replace the UDA1334 breakout with an Wolfson 8711B DAC soldered on the mainboard of an old reciva based internet radio. However, until now I've only tested the I2S output using the UDA1334 breakout.

baldram commented 2 years ago

Thank you! That's something interesting again! You showed that it works with the other piece of hardware than initially tested (basic VS1053 setup). I also see an interesting discussion here (related project) Edzelf/ESP32-Radio#474 that the driver's code might go quickly beyond the original scope. Awesome!