Page 1 of 1

AN00231_ASRC_SPDIF_TO_DAC bug - fixed

Posted: Fri Apr 13, 2018 11:14 am
by ffomich
Hi,

I have found the bug in the AN00231_ASRC_SPDIF_TO_DAC example project.

This bug produces N*samples shift between left & right output channels after ASRC.
For example, after ASRC 48kHz->48kHz the left channel is ahead of the right one by 1 sample.

Bug fix:
in the function
void serial2block(server serial_transfer_push_if i_serial_in, client block_transfer_if i_block_transfer[ASRC_N_INSTANCES], server sample_rate_enquiry_if i_input_rate)

Code: Select all

if (chan_idx == ASRC_CHANNELS_PER_INSTANCE - 1) buff_idx++; //Move index when all channels received
MUST be

Code: Select all

if (chan_idx == ASRC_CHANNELS_PER_INSTANCE) buff_idx++; //Move index when all channels received
Also I have created new issue here: https://github.com/xmos/lib_src/issues/29

Re: AN00231_ASRC_SPDIF_TO_DAC bug - fixed

Posted: Mon Apr 16, 2018 10:34 am
by infiniteimprobability
Appreciate you taking the time to report this AND making a pull request. Will process shortly.