1) Section 5.7.2 of the guide says for adding DSP I will probably want to free up Core functionality. I am not using SPDIF, ADAT, or MIDI. How could I do this? Would I just set the defined 'SPDIF_TX' in 'customdefines.h' of the 'app_usb_aud_xk_216_mc' application to 0? Is seems the other audio interfaces are default to off in 'devicedefines.h'.
If you are using a XU216 then you will have bags of free resources already. Yes, most stuff is switched off, although be aware that the Makefile build configs over-rule the customdefines stuff (hence lots of ifdefs). So check there too.
I'm using Manufacturing Part # XK-AUDIO-216-MC-AB (XE216 Audio Platform w/ Debugger). I'll check the Makefile build configs - thanks.
2) Section 5.7.2 also says to add a DSP Core. How do I do this formally? Would I simply write something like this with in the par{} of main() in the 'modlue_usb_audio' (or alternatively within the user_main.h under the USER_MAIN_CORES define):
on tile[0].core[?]: dsp_task();
I would use the example provided here rather than 5.7.2. It is more up-to date. It reserves a whole core (up to 100MIPS) for DSP and you can use 99.9% of it because of the low channel overhead.
Ok, I'll try to work with the example provided here rather than 5.7.2. After all your channel attenuation DSP example did work for me - "If it ain't broke, then don't fix it", as they say. :)
What unused cores can I used for DSP? Because they recommend synchronized data transfer I need another core, using a 'normal channel' communication which can only be used between Tasks on different cores.
ANy of them. There are constraints - xud must get 80MIPS (500/n cores must be over 80 on that tile). Compile with -report to see what's used.
Ok, will do. Although I was a bit confused on how to declare a core to use and see which ones/how many are available. I didn't find anything in the Programmers Guide on where all available cores are defined and how to define new ones. Also, the guide uses the notation tile[x]core[y] to specify which core and tile I am applying tasks to, but I don't see this notation in the Example code - as you say maybe the guides are not up-to-date and some other notation is used now.
3) Section 5.7.2 (and and XMOS Youtube video) further advises using 3 xC channels on this new Core. Is there a reference I can follow to create these channels properly?
Sorry - don't understand this question as you only need one channel to hook some DSP into the audio system, as per this example.
In Section 5.7.2 point 2. "Add another core to do DSP. This core will probably have three XC channels (type 'chan' communication, I'm guessing): one channel to receive samples from decoupler core and another to output to the audio driver - this way the core 'intercepts' audio data on its way to the audio driver; the third channel can receive control commands from Endpoint 0."
It looks like you just use the one 'c_dsp' chanend. I'm fine to use this one channel if its sufficient. From this Youtube video the XMOS instructor shows two different connections connecting a DSP (or MIXER) core to the 'Decouple' and 'Audio' cores: https://www.youtube.com/watch?v=xfRUxbUN2SE (time stamp 4.35). I guess a third channel would be used for USB audio control like mute, volume up, volume down.