Page 2 of 3

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Thu Jul 18, 2019 9:44 pm
by T-5
Nope, need to use I2S unfortunately.

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Fri Jul 19, 2019 7:55 pm
by T-5
Meanwhile I digged around in the sources, also in the usb audio module, way more than I had liked too :)

I now have my own build configuration with 2 input channels, 10 output channels, adat & spdif disabled.
Added my own defines:
NUM_USB_CHAN_IN 2
NUM_USB_CHAN_OUT 10
I2S_CHANS_DAC=10
I2S_CHANS_ADC=2

and in the xk-audio-216-mc.xn file i reused the adat output pin (XS1_PORT_1E) and defined it to be PORT_I2S_DAC4

It compiles. Can't test it atm as I'm not home...

What is still unclear to me is how to determine if the chip can do that (resource-wise). Still the whole concept of tiles/cores/channel ends is pretty unclear to me, even after trying to read the whole manual twice :)

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Sun Jul 21, 2019 6:21 pm
by T-5
I can confirm that the board now runs 5 I2S lines at 192kHz sampling frequency. We tested all I2S output lines with an oscilloscope and it seems fine (tested sine waves and watched for differences in I2S signals, according to playback volume). For a final test we'd need to attach real DACs to the outputs but what I see so far makes me quite happy.

So the last thing we'd need to rectify is the switching of the oscillators according to the sampling rate. I'll repeat my question here: ca I do that in the function AudioHwInit()?

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Wed Jul 31, 2019 12:52 am
by T-5
It has been very silent here ;)

We managed to adjust the code to drive the two crystal oscillators in AudioHwInit(). The project is now finally done. :)))

Should I accept my own post/answer?

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Wed Jul 31, 2019 12:56 am
by akp
Yes. Well done figuring it all out.

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Wed Jul 31, 2019 3:15 am
by T-5
Maybe one last question: what's the licenceing situation for this stuff? Would I be allowed to distribute source code with my changes? How about flashable binary files?

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Fri Aug 02, 2019 3:23 pm
by akp
If you are using sw_usb_audio-[sw]_6.15.2rc1 for the source then refer to https://www.xmos.com/license-agreements#usb-audio

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Mon Feb 03, 2020 1:05 pm
by stamatiski
I need to do exactly the same think, I need to use 8 channel i2S inputs of an "XMOS Multichannel high-quality USB to/from I2S/DSD SPDIF PCB", and I want the board to act as slave (meaning to accept external clocking).
Isn't this your case too?
I desperately need your help :)

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Mon Feb 03, 2020 1:31 pm
by T-5
As I'm not allowed to share code here please PM.

Re: How to make the diyinhk multichannel i2s interface receive slave lrck?

Posted: Mon Feb 03, 2020 1:54 pm
by stamatiski
As a new user I am not able to send messages. Pls check your email. Many thanks!