earlephilhower / ESP8266Audio

Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
GNU General Public License v3.0
2.03k stars 432 forks source link

Add support for I2S MCLK. #594

Closed DatanoiseTV closed 1 year ago

DatanoiseTV commented 1 year ago

This commit implements support for generating basic 256*fs MCLK using the APLL.

earlephilhower commented 1 year ago

Something got weird on the commit/pushes and your (void) marker seems to have been lost (see the 8266 failures). Can you take a look again, please?

DatanoiseTV commented 1 year ago

Something got weird on the commit/pushes and your (void) marker seems to have been lost (see the 8266 failures). Can you take a look again, please?

I think now it is right.

earlephilhower commented 1 year ago

OK, we're almost there. The change in the 8266 needs to applied to the RP2040 branch and we should all be OK. The joys of supporting 3 different (actually w/the ESP32-XXs maybe 6?) boards.

earlephilhower commented 1 year ago

@DatanoiseTV can you pull in the latest master? The ESP8266 internal test scripts changed over in that repo, so I needed to hack the tests here that used it. It should now work and we should be able to hopefully get a complete run.

earlephilhower commented 1 year ago

The git commits seem to be weird. Both the 8266 and the Pico now/still have the unused mclk warning again. Can you check the code and make sure you're pushing the latest branch? I could swear you cleared up the 8266 one earlier, for example...

2023-01-04T17:22:42.7339190Z /home/runner/Arduino/libraries/ESP8266Audio/src/AudioOutputI2S.cpp: In member function 'bool AudioOutputI2S::SetPinout(int, int, int, int)':
2023-01-04T17:22:42.7339811Z /home/runner/Arduino/libraries/ESP8266Audio/src/AudioOutputI2S.cpp:113:66: error: unused parameter 'mclk' [-Werror=unused-parameter]
2023-01-04T17:22:42.7340244Z   113 | bool AudioOutputI2S::SetPinout(int bclk, int wclk, int dout, int mclk)
2023-01-04T17:22:42.7340547Z       |                                                              ~~~~^~~~
2023-01-04T17:22:42.7340801Z cc1plus: all warnings being treated as errors
/home/runner/Arduino/libraries/ESP8266Audio/src/AudioOutputI2S.cpp:113:66: error: unused parameter 'mclk' [-Werror=unused-parameter]
  113 | bool AudioOutputI2S::SetPinout(int bclk, int wclk, int dout, int mclk)
      |                                                              ~~~~^~~~
FREEWING-JP commented 1 year ago

I tested CS4344 I2S DAC with ESP32-D0WD-V3 (revision v3.0) . ( CS4344 need MCLK) It works Fine ! Thank you !

https://github.com/FREEWING-JP/ESP32_BadApple_MP3

https://youtu.be/4GXgd6Nbv94