Page 1 of 1

How can select input once at a time without mixer/vol ctrl

Posted: Wed Mar 02, 2016 9:42 am
by itongx
Hi,

1. I have x200-MC eval board and seem xmos mix all input to output stream (i2s) but if I need only select only one input like spdif -> dac , usb -> dac. Even xmos received spdif but user need only USB out how can I do that ?

2. Can I loop back digital input to dac instead send to usb host or when usb host not present ?

Any document I can find for more examples that not describe in audio design guide doc please help to suggest :)

Thanks
Thod K.

Re: How can select input once at a time without mixer/vol ct

Posted: Tue Mar 08, 2016 10:47 am
by jacqui
The Application note "Using the I2S library" might be useful as it shows how to create a loopback using the Multichannel Audio board as the demo platform. You can find it here https://www.xmos.com/support/appnotes/AN00162

Re: How can select input once at a time without mixer/vol ct

Posted: Tue Mar 08, 2016 4:28 pm
by infiniteimprobability
1. I have x200-MC eval board and seem xmos mix all input to output stream (i2s) but if I need only select only one input like spdif -> dac , usb -> dac. Even xmos received spdif but user need only USB out how can I do that ?
If I understand you correctly, yes - you can do this. There is an integrated mixer which is can be enabled - it is switched on in build

Code: Select all

2i10o10xsxxxx_mix8
. It's very powerful (full cross bar with weights) and consequently takes a bit of getting to know. It's normally controlled via a USB host app, but you can easily intercept the control protocol and add a task to change it from the firmware - eg. via an I/O
2. Can I loop back digital input to dac instead send to usb host or when usb host not present ?
Yes - but the sample rate will remain at the last setting and of course you can't control it from the host.


Take a look at: "Digital Mixer" in this doc... https://www.xmos.com/support/boards?ver ... 442&page=2

Have a play with this and get the connections you desire setup - then take a look at the command handler:

Code: Select all

case inuint_byref(c_mix_ctl, cmd):
in

Code: Select all

mixer.xc
to see how you can hook into it..

Re: How can select input once at a time without mixer/vol ct

Posted: Fri Mar 11, 2016 1:19 pm
by infiniteimprobability
I *may* have misinterpreted the question..

DO you mean you want to loop back samples from various inputs directly?

If so, you can add assignments in the audio inner loop (deliver() in audio.xc) which manipulate the following variable arrays:

Code: Select all

static unsigned samplesOut[NUM_USB_CHAN_OUT];

/* Two buffers for ADC data to allow for DAC and ADC ports being offset */
static unsigned samplesIn_0[NUM_USB_CHAN_IN];
static unsigned samplesIn_1[I2S_CHANS_ADC];
Take a quick read of this thread http://www.xcore.com/forum/viewtopic.php?f=26&t=3504 to get the gist..