Page 1 of 1

VS1053 SS_REFERENCE_SEL creates audible pop

Posted: Tue 2020-05-12 15:52
by lucap87
Hi, I implemented a streaming application with a PID controller to sync the VS1053 playback with a remote server.
The Sample Rate Finetuning solution available in the latest software patch (2020-04-29) works like a charm for sample rates below 48 kHz.

Nonetheless, I experienced a small but annoying clipping (audio pop) when SS_REFERENCE_SEL bit of SCI_STATUS is set (SCI_STATUS bit 8 set too as indicated in the patch workaround). The pop is audible at every call of my routine VS10x3_SampleRateFinetuning() that fine-tunes the sample rate. Since the PID controller calls this routine every second the pop is quite annoying especially when the volume is low. In addition, the pop is audible even when the VOL register is written.

I suspect that the problem is the same as experienced by cinpezzo in his thread: ... ERENCE_SEL or something similar to ... 1e07#p1829.

After a while, I assessed that by clearing SS_REFERENCE_SEL (and SCI_STATUS bit 8 as well) the pop is not produced and the continuous sample rate adjustment works smoothly.

Do you suggest a workaround to use SS_REFERENCE_SEL and Sample Rate Fine-Tuning together? Or should I renounce to the extra swing to prevent pops?

Code: Select all

void VS10x3_SampleRateFinetuning(int32_t ppm2) {
    VS10x3_WriteRegister(VS10x3_ADD_WRAMADDR, 0x1e07);
    VS10x3_WriteRegister(VS10x3_ADD_WRAM, ppm2);
    VS10x3_WriteRegister(VS10x3_ADD_WRAM, ppm2 >> 16);

    /* oldClock4KHz = 0 forces adjustment calculation when rate checked. */
    VS10x3_WriteRegister(VS10x3_ADD_WRAMADDR, 0x5b1c);
    VS10x3_WriteRegister(VS10x3_ADD_WRAM, 0);

    /* Write to AUDATA or CLOCKF checks rate and recalculates adjustment. */
    uint16_t audata = VS10x3_ReadRegister(VS10x3_ADD_AUDATA);
    VS10x3_WriteRegister(VS10x3_ADD_AUDATA, audata);

Re: VS1053 SS_REFERENCE_SEL creates audible pop

Posted: Wed 2020-05-13 21:14
by Panu

There was a side effect of some internal function that it sets the reference to the default (low) value. Hmm, hang on for a day or two, we'll see what to do about it in this case.


Re: VS1053 SS_REFERENCE_SEL creates audible pop

Posted: Thu 2020-05-14 15:24
by lucap87
Thank for your reply.

If you wanna experiment with something, I can help with some tests on my hardware too.

Re: VS1053 SS_REFERENCE_SEL creates audible pop

Posted: Wed 2020-05-20 11:50
by pasi
Unfortunately catching the code which clears the reference select is not possible, so the patch does the next-best thing and restores the value whenever it can.

A hardware workaround would be to drive RCAP with an external 1.65V regulator.

Re: VS1053 SS_REFERENCE_SEL creates audible pop

Posted: Fri 2020-05-22 17:58
by lucap87
Thank you for your reply and effort.

I'll probably leave SS_REFERENCE_SEL disabled.