Page 1 of 1

Misaligned TDM channels xCORE-200

Posted: Fri Dec 14, 2018 7:53 pm
by daniel3550

I have xCore-200 MC Audio board. I am doing a simple test where I loop back XMOS SDOUT to SDIN and view the data using Audio Precision APx software. For some reason the 8 channels coming back to PC are not phase aligned.

Firmware config:
- 2i8o8xxxxx_tdm8 build configuration from sw_usb_audio-[sw]_6.15.2rc1 - Unmodified

Hardware config:
- xCore-200 MC Audio board
- J7 pin 2 (xDAC SD1) fly-wired to J8 pin 2 (iADC SD1). This is how I loop back XMOS SDOUT to SDIN
- No other jumpers installed

Test setup:
- Use APx to output 8 channels via ASIO, 48kHz, 24 bit
- Use APx to read 8 channels via ASIO

The PC sends 8 channels, time aligned. But it comes back to the PC with the channels offset by 1 sample. There are 3 groups of channels

Channels 1,2: "Center"
Channels 3,4,5,6: advanced 1 sample
Channels 7,8: delayed 1 sample

I have attached USB analyzer to view bus traffic. I see the channel misalignment in the USB data coming into the PC. So this is not a PC driver related issue. It comes from the XMOS misaligned.

Is this expected? How can I send 8 channels upstream to host that are phase-aligned?

Re: Misaligned TDM channels xCORE-200  Topic is solved

Posted: Fri Jan 04, 2019 6:10 pm
by daniel3550
For anyone interested, this is due to buffering in audio.xc deliver(). I was able to fix it in DoSampleTransfer() with delay and repackaging so the channels are phase aligned.