USB Audio Design Guide
The reference designs have been verified against a variety of host OS types, across
different samples rates. However, modifications to the code may invalidate the
results of this verification and you are strongly encouraged to fully re- test the
resulting software.
The general steps are:
1. Make a copy of the eclipse project or application directory (.e.g.
app_usb_aud_l1
or
app_usb_aud_l2
) you wish to base your code on, to a separate directory with
a different name.
2. Make a copy of any modules you wish to alter (most of the time you probably
do not want to do this). Update the Makefile of your new application to use
these new custom modules.
3. Make appropriate changes to the code, rebuild and reflash the device for testing.
Once you have made a copy, you need to:
1. Provide a
.xn
file for your board (updating the
TARGET
variable in the Makefile
appropriately).
2. Update
device_defines.h
with the specific defines you wish to set.
3. Update
main.xc
.
4. Add any custom code in other files you need.
The following sections show some example changes with a high level overview of
how to change the code.
5.7.1
Example: Changing output format
You may wish to customize the digital output format e.g. for a CODEC that expects
sample data left justified with respect to the word clock.
To do this you need to alter the main audio driver loop in
audio.xc
. After the
alteration you need to re-test the functionality. The XMOS Timing Analyzer can
help guarantee that your changes do not break the timing requirement of this core.
5.7.2
Example: Adding DSP to output stream
To add some DSP requires an extra core of computation, so some existing func-
tionality needs to be removed (e.g. S/PDIF). Follow these steps to update the
code:
1. Remove some functionality using the defines in §
to free up a core.
2. Add another core to do the DSP. This core will probably have three XC channels:
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.
XM0088546.1
Содержание xCORE-200 Multi-channel Audio board
Страница 6: ...1 Overview XM0088546 1...