Closed chgaertner closed 2 years ago
I've seen this with PSRAM, too - I think, in my case - the reason is the REV1 chip with the known PSRAM Bug. The workaround does not help in all cases, it seems.
I've seen this with PSRAM, too - I think, in my case - the reason is the REV1 chip with the known PSRAM Bug. The workaround does not help in all cases, it seems.
Hi Frank, thank you for your reply. Can you give me some additional information about the bug you mentioned and which workaround you tried? I would like to give it a try. Thank you!
I think it was adding
-mfix-esp32-psram-cache-issue
to build_flags (in Platformio)
I think it was adding
-mfix-esp32-psram-cache-issue
to build_flags (in Platformio)
Hi Frank, first of all thank you for pushing me to PlatformIO, which I have read about but never used before. Your message encouraged me to give it a try and after a few hours it looks much more comfortable than the Arduino IDE. :-)
I have tried the following build flags ...
build_flags =
-DBOARD_HAS_PSRAM
-DCONFIG_SPIRAM_CACHE_WORKAROUND
-mfix-esp32-psram-cache-issue
but this made no change regarding the bad audio quality for all files (except the first one). I also tried to use the last two flags alternatively but still no change. :-(
What seems a bit weird is the fact that I am also testing webradio streems and they play without any problem (even switching between them). They are mp3 streams ("content-type: audio/mpeg, format is mp3"), so the same decoding routines should be in effect as when playing a mp3 file.
Hi,, yes, the decoding is the same code. That workaround did no work for me, too, I had these effects with stream too. Not that often.. 2-3 times in 10 Minutes. However, it could be a different issue...
Hi,, yes, the decoding is the same code. That workaround did no work for me, too, I had these effects with stream too. Not that often.. 2-3 times in 10 Minutes. However, it could be a different issue...
In the meantime I have spent hours after hours hoping to find the solution or at least a workaround, but unfortunately I do not make any progress. :-(
I have used several SD cards, I have played mp3 files with different bitrates. I have modified my source code to use different SPI buses for the SD card and the RFID reader. I have tried several bus speeds for the SPI bus, I have used different GPIOs for the RFID board, I have enabled and disabled PSRAM. I have tried different build flags in PlatformIO. Nothing did solve the problems. Webstreams always play in a perfect quality (even at a higher bitrate than the local files!), but all mp3 files play in a bad quality except the first one after reboot.
I am seriously thinking about giving up. The last chance I see is trying a different board (Lolin D32 instead of D32 pro), which needs an external SD card reader. Let's see how long it takes to get these parts from Aliexpress. I have also ordered a new RFID board which can be connected via I2C instead of SPI. Hope dies last ...
Greetings from Mödling, Christian
Can you send me the used files?
f dot boesing (at) gmx germany
Can you send me the used files? f dot boesing (at) gmx germany
Hi Frank, of course I could send you one of the mp3 files which I am using for test purposes. But I encounter this effect with all mp3 files I tried (CBR, VBR, different bitrates, mono, stereo, ...).
I tried two new approaches:
Greetings, Christian
Dear all,
I have a solution regarding the disturbances that frustrated me over the last weeks. :-)
Short version: A combination of an apparently defective MAX98357A and problems with one or more circuit paths on the grid-style PC board ("Lochrasterplatine").
Long version: When I received my PCB board and soldered the components in place (LOLIN D32 pro, RFID-RC522, MAX98357A), I noticed that the disturbances were nearly gone. I had spare parts of the LOLIN D32 pro and the RFID-RC522 which I exchanged for the original parts before. This did not cause any improvement, so I ordered a new MAX98357A to be able to exclude this component as reason for the problems as well. When I used the new MAX98357A on the PCB board, all disturbances were gone and the sound was clear. To double check, I used the new MAX98357A on the grid-style PC board and the quality was noticeable better than before.
Lessons learned:
Frank, thank you for your help!
I will close this issue because the problem I described is solved.
Greetings, Christian
Hi Wolle,
first of all thank you for sharing this library! It works great for playing internet radio. A few days ago I started to use it for playing mp3 files from the built-in SD card of my Lolin D32 pro (PSRAM enabled) and I discoverend a strange behaviour. The first time I play a mp3 file the quality is fine, but all other mp3 files are played in a bad quality with disturbances and random noises. After I reset the board, I again can play one mp3 file in good quality and the other files in bad quality.
The sketch I use for testing is quite simple. It starts playing a mp3 file and when the audio_eof_mp3 callback is called, it plays the mp3 file again.
The output from the console is as follows:
I notice two differences between the first and the second part:
Additionally, I compiled the sketch with PSRAM disabled and I encounter the same problems as mentioned above. The filled/free buffer values are as follows:
Best regards, Christian