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

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
Post Reply
itongx
New User
Posts: 2
Joined: Tue Dec 15, 2015 9:03 am

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

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


View Solution
jacqui
Junior Member
Posts: 5
Joined: Mon Jul 01, 2013 2:13 pm

Post 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
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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..
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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..
Post Reply