VS1053B: noise when playing MP2 audio
Posted: Tue 2024-07-23 10:53
We are using the VS1053B for audio decoding. One of our customers streams audio in MP2 format (MPEG-1 layer 2). We have enabled layer 1/2 support in the SCI_MODE register. We also use the most recent patches (version 2.9).
We have observed noise on top of the signal, when playing back MP2. We have observed this with both the stream created by our customer’s software and with MP2 files created with the Audacity program. The noise is absent when playing the stream or file back on a PC (using the VideoLAN player “VLC”). We are therefore convinced that the noise is not in the audio file/stream itself.
I created a file with 30 seconds of silence, and saved this in both MP2 and MP3 formats. The noise is present only when playing the MP2 file (on the VS1053B). The nature of the noise changes a bit depending on the bitrate with which the MP2 was encoded.
I recorded the output of our audio player when playing those “silence” files. The spectrum plots are below to illustrate the issue.
MP2 The issue that we are having, are the spikes at (in this example) 1.35 kHz, 2.7 kHz, 4.1 kHz, 5.5 kHz, and so on. These are at roughly -61 dB, rising well above the surrounding noise level of -80 dB. The frequencies where the spikes occur, depend on the bitrate with which the MP2 file is encoded.
MP3 The same data encoding in MP3 format shows a much cleaner spectrum. (Note that the graph has a different vertical scale than that for the MP2 file.) The spike at roughly 14 kHz is odd, but note that it is at -81 dB: much softer that the spikes in the MP2 graph (at -62 dB).
No audio Also a spectrum plot of when our player was not decoding audio, for a “ground level” comparison (to show the noise from other sources, such as the analog back-end of our player, and possibly the noise of our capture device). The low frequency noise in all graphs is of no concern: listening tests have not reported this noise; it may not exist.
For completeness, I have attached the "silence" audio files.
Is there a work-around for this issue?
We have observed noise on top of the signal, when playing back MP2. We have observed this with both the stream created by our customer’s software and with MP2 files created with the Audacity program. The noise is absent when playing the stream or file back on a PC (using the VideoLAN player “VLC”). We are therefore convinced that the noise is not in the audio file/stream itself.
I created a file with 30 seconds of silence, and saved this in both MP2 and MP3 formats. The noise is present only when playing the MP2 file (on the VS1053B). The nature of the noise changes a bit depending on the bitrate with which the MP2 was encoded.
I recorded the output of our audio player when playing those “silence” files. The spectrum plots are below to illustrate the issue.
MP2 The issue that we are having, are the spikes at (in this example) 1.35 kHz, 2.7 kHz, 4.1 kHz, 5.5 kHz, and so on. These are at roughly -61 dB, rising well above the surrounding noise level of -80 dB. The frequencies where the spikes occur, depend on the bitrate with which the MP2 file is encoded.
MP3 The same data encoding in MP3 format shows a much cleaner spectrum. (Note that the graph has a different vertical scale than that for the MP2 file.) The spike at roughly 14 kHz is odd, but note that it is at -81 dB: much softer that the spikes in the MP2 graph (at -62 dB).
No audio Also a spectrum plot of when our player was not decoding audio, for a “ground level” comparison (to show the noise from other sources, such as the analog back-end of our player, and possibly the noise of our capture device). The low frequency noise in all graphs is of no concern: listening tests have not reported this noise; it may not exist.
For completeness, I have attached the "silence" audio files.
Is there a work-around for this issue?