AudioThru Lab

This is a lab exercise that is being offered at ICASSP 2011 in Prague. In this lab you will inspect, compile and run code that uses the Linux ALSA sound drivers to capture real-time audio, pass it to the C64x DSP for processing and then out to the speakers.

Compiling the code
Here are the steps to take:

The first line sets up the environment so you can compile for the C64x. The second lines loads the kernel modules needed to talk to the DSP.
 * Open a terminal window. Application:Accessories:Terminal
 * In the terminal:
 * 1) source /c6run_build/environment.sh
 * 2) source /c6run_build/loadmodules.sh
 * 3) cd AudioThru
 * ls

The AudioThru directory contains labs I've used to teach the ALSA sound driver.
 * 1) audio_record shows how to capture audio and store it in a file.
 * 2) audio_playback takes audio from a file and plays it.
 * 3) audio_loopthru has the students combine the first two labs to do real-time audio io.
 * 4) audio_c6run builds on the loopthru lab by passing the live data to the DSP for processing.

We only have time for one lab, so do the last one. There are 3 groups of files here. The source code (*.c and *.h), object files for running on the ARM (gpp) only (audioThru_arm, gpp, gpp_lib) and objects files for running on the DSP (audioThru_dsp, dsp, dsp_lib). What's significant is that the same source code produced both sets of objects (dsp, gpp). It's how the source is compiled determines where it is run.
 * 1) cd lab06d_audio_c6run
 * ls

Running
Run the apps. Both will run until you hit ctrl-C. To hear something you need to hookup your mp3 player to the input on the Beagle and speakers to the output.
 * 1) ./audioThru_arm
 * 2) ./audioThru_dsp

Once you are sure it is working, try building everything from scratch. By default make creates both the ARM only and DSP objects. make takes about 20 seconds on my Beagle.
 * 1) make clean
 * 2) make

Experiment with the code
Now that you have something working, play around a bit. git is installed so you can preserve the present contents of the files with: Later if you
 * 1) git add Makefile audio_input_output.c audio_process.c audio_thread.c
 * 2) git commit -m "Initial commit"