How to make the diyinhk multichannel i2s interface receive slave lrck? Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post by T-5 »

Nope, need to use I2S unfortunately.


View Solution
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post 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 :)
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post 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()?
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post 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?
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Yes. Well done figuring it all out.
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post 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?
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post 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
stamatiski
Junior Member
Posts: 5
Joined: Mon Feb 03, 2020 12:58 pm

Post 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 :)
T-5
Member++
Posts: 16
Joined: Wed Jun 26, 2019 3:59 pm

Post by T-5 »

As I'm not allowed to share code here please PM.
stamatiski
Junior Member
Posts: 5
Joined: Mon Feb 03, 2020 12:58 pm

Post by stamatiski »

As a new user I am not able to send messages. Pls check your email. Many thanks!
Post Reply