SPI interface on USB audio

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
Dodotronic
Member++
Posts: 17
Joined: Fri Dec 20, 2013 2:27 pm

SPI interface on USB audio

Post by Dodotronic »

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.
Ivano


Post Reply