VS1053 sample rate fine tuning value changes after a while
Posted: Mon 2021-02-22 17:09
We have experienced a problem using your VS1053 with the sample rate fine tuning.
We extract a MP2 stream from a live satellite DVB transport stream and send it to the VS1053, and then send de decoded audio (in I2S format) to an FPGA to process the audio.
We are using the last (2.9) VS1053 FLAC_LATM patch and we have activated the 15/16 resampler to use the sample rate tuning @ 48 KHz.
The nominal audio input sample rate is 48000 S/s.
The nominal audio output sample rate is 48000 S/s.
According to the "real" input rate we adapt the fine tuning in order to maintain the level of an input FIFO almost constant.
The algorithm behaves well for a time, requiring a fine tuning value quite stable (around 150).
But sometimes (something like days or dozens of days), the VS1053 seems to suddenly need a different value of tuning value (1400).
This new value seems correct for days, and then the VS1053 requires again a new value, sometimes similar to the previous, sometimes different again.
In these cases, despite the different fine tuning value, the output audio data seems to remain correct.
In some case the VS1053 requires a new tuning value too high or too low, so we can be able to maintain the FIFO at the programmed level, and the FIFO empties or fills, causing the decoded audio to get wrong.
We have measured the input rate, and it remains constant, well under 0.05 PPM, while the fine tuning value seems to change for more than 1 PPM.
Please see the attached plots of the fine tuning value (ppm*2) and FIFO filling. The horizontal scale is one point per second.
Can you give an reasonable explanation about this issue? If you need, we can provide the debug data also as csv file.
We extract a MP2 stream from a live satellite DVB transport stream and send it to the VS1053, and then send de decoded audio (in I2S format) to an FPGA to process the audio.
We are using the last (2.9) VS1053 FLAC_LATM patch and we have activated the 15/16 resampler to use the sample rate tuning @ 48 KHz.
The nominal audio input sample rate is 48000 S/s.
The nominal audio output sample rate is 48000 S/s.
According to the "real" input rate we adapt the fine tuning in order to maintain the level of an input FIFO almost constant.
The algorithm behaves well for a time, requiring a fine tuning value quite stable (around 150).
But sometimes (something like days or dozens of days), the VS1053 seems to suddenly need a different value of tuning value (1400).
This new value seems correct for days, and then the VS1053 requires again a new value, sometimes similar to the previous, sometimes different again.
In these cases, despite the different fine tuning value, the output audio data seems to remain correct.
In some case the VS1053 requires a new tuning value too high or too low, so we can be able to maintain the FIFO at the programmed level, and the FIFO empties or fills, causing the decoded audio to get wrong.
We have measured the input rate, and it remains constant, well under 0.05 PPM, while the fine tuning value seems to change for more than 1 PPM.
Please see the attached plots of the fine tuning value (ppm*2) and FIFO filling. The horizontal scale is one point per second.
Can you give an reasonable explanation about this issue? If you need, we can provide the debug data also as csv file.