How to make the diyinhk multichannel i2s interface receive slave lrck? Topic is solved
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
Nope, need to use I2S unfortunately.
View Solution
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
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 :)
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 :)
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
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()?
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()?
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
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?
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?
-
- XCore Expert
- Posts: 580
- Joined: Thu Nov 26, 2015 11:47 pm
Yes. Well done figuring it all out.
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
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?
-
- XCore Expert
- Posts: 580
- Joined: Thu Nov 26, 2015 11:47 pm
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
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 03, 2020 12:58 pm
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 :)
Isn't this your case too?
I desperately need your help :)
-
- Member++
- Posts: 16
- Joined: Wed Jun 26, 2019 3:59 pm
As I'm not allowed to share code here please PM.
-
- Junior Member
- Posts: 5
- Joined: Mon Feb 03, 2020 12:58 pm
As a new user I am not able to send messages. Pls check your email. Many thanks!