SPI interface on USB audio

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Posts: 17
Joined: Fri Dec 20, 2013 2:27 pm

SPI interface on USB audio

Postby Dodotronic » Tue Apr 10, 2018 9:06 am

Hi all

I'm developing my own board with a standard ADC instead of a codec.
USB library is using a I2S interface and I need to use a SPI instead.
The communication is quite similar os CS5368 with 4 SDOUT channels.
The main difference is that the LRCK is replaced by CS so the ouput is only when the CS is low. This leads that only the odd channels are seen.
Now I'm using the 8 channels configuration so I can have my 4 channels from the ADC on odd channels while the 4 even channels are blank.
How can I have the data of 4 channels excluding the even?
I try to change the code mainly in this region of audio.xc file:
samplesIn_1[((frameCount-1)&(I2S_CHANS_PER_FRAME-1))+i] = bitrev(sample);
but with no good success.

Who is online

Users browsing this forum: No registered users and 51 guests