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: http://www.vsdsp-forum.com/phpbb/viewto ... ERENCE_SEL or something similar to http://www.vsdsp-forum.com/phpbb/viewto ... 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);
}