XMOS Parallel Audio DSP example
|Stable release:||0.6.0 versioning)|
|Description:||Configurable Application example for parallel DSP processing of several audio channels|
- Up to 6 channels in, 8 channels out IN 1/2 : processed by eq_wrapper (see below), OUT 1/2 IN 2/3 : processed by crossover thread (see below), OUT 2/3 (below 500Hz), OUT 4/5 (above 500Hz) Note: OUT 6/7 are the same as OUT 4/5 on the HW. Note: delays is a thread that can be plugged instead of crossover or eq_wrapper
- Audio DSP using concurrent threads. 2 Threads processing 4 channels each in this example.
- Two configurations of Biquad filter (derived from https://github.com/xcore/sc_dsp_filters) biquad_cascade_eq.xc : Cascade of 5 Biquads used for the 5-band equaliser biquad_crossover.xc. Single Biquad configured as either highshelf or lowshelf filter
- Audio samples are communicated to a configurable set of DSP threads using streaming channels
- Delay buffer example (see delay_bufs and shared_mem_dsp.c)
- Configurability. See User Guide Section
- Wealth of Debug Features (See Debug section)
- <Bullet pointed list of missing features>
HW Platform: XR-USB-AUDIO-2.0-MC
- eq_wrapper : 5-Band Equaliser processing 2 channels using peak EQ filters. Receives control commands to change EQ settings. Can send level metering data
- crossover : Using highshelf filter to suppress frequs above 500Hz, lowshelf filter to suppress freqs below 500Hz Note: crossover_proc produces 2 output channels (low and high freqs) from 1 input channel
- delays : Using a delay buffer, delays audio of left channel by 5000 samples (0.1 seconds at 48kHz)
- eq_client : Periodically Changes Equaliser setup on the fly by switching between different Equaliser Presets.
I2S interface to codec. up to 6 channels in, 8 channels out See Audio Data Flow
- mswait : wait a number of milliseconds
- clkgen : generates PLL input clock
Audio Data Flow (per channel)
- iis thread
ouputs samples of NUM_IN stereo channels over NUM_IN streaming channels inputs samples of NUM_OUT stereo channels over NUM_IN streaming channels
- DSP threads
input samples over streaming channel(s) process the stream on a per-sample basis output samples over streaming channel(s).
Input-Output latency: <= one sample period
- All coefficients were created with https://github.com/xcore/sc_dsp_filters
- The Makefile configurations can be found in in the source code next to the coefficients
- XScope Probes for Equaliser input and output (Oscilloscope view of sample streams from HW in realtime)
- Ability to override ADC audio input with custom reference signals.
- Option to run on simulator (for development/debug without HW)
- Audio Loopback (to test iis interface)
- XTA timing checks
The checks are run at compile time (see timing_checks.xta script) To analyse the routes it in the GUI, Click "Timing->Time" and then run the .xta script The script is automatically run at compile time, does the xta check and prints a summary:
DSP threads can be plugged in to process selected channels on core0 as shown in main()
- Number of input and output channels (NUM_IN, NUM_OUT)
- Set of DSP threads (see main())
- EQ Bands (EQ_BANKS)
- Optimised assembly Biquad (ASM_BIQUAD_EQ)
- Debug Switches (see Debug Switches in defines.h).
Note: To use XScope XDE 11.2 tools are required. Add xscope library to compile. Note: Make sure NUM_IN and NUM_OUT matches the set of DSP threads connected to the streaming channels
Tool aspects - Device options (Simulator or Hardware) can be selected in "Run Configurations" and "Debug Configurations" - For more information see Tools User Guide.
- Level metering output from Equaliser not activated
- Limited testing of configuration space. E.g. only at 48kHz
- biquadAsmXover not operational. Must be changed to take coefficient object as argument
- Unexpected data type errors from XScope
- xcommon firstname.lastname@example.org:xcore/xcommon.git
Issues may be submitted via the Issues tab in this github repo. Response to any issues submitted as at the discretion of the maintainer for this line.