schreibfaul1 / ESP32-audioI2S

Play mp3 files from SD via I2S
GNU General Public License v3.0
1.07k stars 282 forks source link

Missing Data in the I2S Line for a ESP32-S2 Solo Module #453

Closed ClaudioFoscan closed 1 year ago

ClaudioFoscan commented 1 year ago

Hi

i'm Using your Library with a ESP32 Wroom 32 Board and an MAX98357. Works as expected.

I like to use the same Setup with a ESP32-S2 Solo Board (cause of the internal USB-HW). the exactly same Code is used and produces some Dropouts in the I2S Data ... not the CLK-Line or the LRC-Line, they stay constant switching but on the Data-Line i see some missing Data between and the sound is broken. if i use an mp3 instead of the Webradio the speed is wrong with higher Bitrates and the Data is also dropping ...

is it possible that the ESP32-S2 has lower performance or are there some bugs for this SoC?

Anyone else the same expereance?

The used example Code : `

include "Arduino.h"

include "WiFi.h"

include "Audio.h"

//Digital I/O used  //Makerfabs Audio V2.0

define I2S_DOUT 22

define I2S_BCLK 26

define I2S_LRC 25

Audio audio;

String ssid = ""; String password = "";

void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("Wroom Test with I2c");

Serial.print("I2C init ... "); audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT); audio.setVolume(5); // 0...21 Serial.println("done");

WiFi.disconnect(); WiFi.mode(WIFI_STA); WiFi.begin(ssid.c_str(), password.c_str()); while (WiFi.status() != WL_CONNECTED) delay(1500); Serial.println("wifi connectet...");

Serial.print("Connect to SRF3 ... "); audio.connecttohost("https://stream.srg-ssr.ch/drs3/mp3_128.m3u"); Serial.println("done"); }

void loop() { // put your main code here, to run repeatedly: audio.loop(); }

// optional void audio_info(const char info){ Serial.print("info "); Serial.println(info); } void audio_id3data(const char info){ //id3 metadata Serial.print("id3data ");Serial.println(info); } void audio_eof_mp3(const char info){ //end of file Serial.print("eof_mp3 ");Serial.println(info); } void audio_showstation(const char info){ Serial.print("station ");Serial.println(info); } void audio_showstreamtitle(const char info){ Serial.print("streamtitle ");Serial.println(info); } void audio_bitrate(const char info){ Serial.print("bitrate ");Serial.println(info); } void audio_commercial(const char info){ //duration in sec Serial.print("commercial ");Serial.println(info); } void audio_icyurl(const char info){ //homepage Serial.print("icyurl ");Serial.println(info); } void audio_lasthost(const char info){ //stream URL played Serial.print("lasthost ");Serial.println(info); } void audio_eof_speech(const char info){ Serial.print("eof_speech ");Serial.println(info); } `

schreibfaul1 commented 1 year ago

Dual core MC is required, please use an ESP32 or ESP32-S3

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.