I didn't change anything in the Makefile. However this might introduce some problems since it is using the same headers on the ARM as on the host computer. Mine appeared to work without buffer underruns.

+

+

=== Setup ===

+

+

There are a couple of things you need to after booting up before running the ALSA stuff.

+

+

* Run <code>$ killall -9 pulseaudio</code> to stop pulseaudio.

+

* Run <code>alsamixer</code> and turn up '''DAC2 Analog''' and turn down '''Left Dig''' and '''Right Dig'''. Do this by using the right arrow key to move to the slider you want to adjust and use the up and down keys to adjust. It's a lot of right arrows before you see '''DAC2 Analog'''; I count 14. Don't stop at ''DAC Voice'' or ''DAC1 Analog''. It's then another 20 to '''Left Dig'''.

+

+

The Left and Right Dig's control the audio pass through. By default, whatever comes in the Line In, goes out to the speakers. Turning down Left and Right Dig prevents this.

+

+

Keeping DAC2 Analog up allows the output of the ALSA program to be heard.

Lab 11/6 - Using ALSA

Problems and Solutions

Installing alsa libraries for cross compiling

I tried using Dr. Yoder's 12-May-2011 version of his ALSA code to
cross-compile it and then send it to my Beagle (just to run on the
ARM, not the DSP). I ran into a number of problems with the cross-compiling not finding header files and libraries, and this is how I
had to fix it...

This creates in the current directory a usr/include and usr/lib
directory with the ALSA header files and libraries in them.
I then copied these files into my armv7a cross-compiler toolchain.
Specifically:

I copied the 'alsa' folder in usr/include to /home/carlsojs/toolchains/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include

and I copied usr/lib to /home/carlsojs/toolchains/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/lib

Then in the Makefile, I changed the ARM_TOOLCHAIN_PREFIX and defined the ARM_TOOLCHAIN_PATH:

I didn't change anything in the Makefile. However this might introduce some problems since it is using the same headers on the ARM as on the host computer. Mine appeared to work without buffer underruns.

Setup

There are a couple of things you need to after booting up before running the ALSA stuff.

Run $ killall -9 pulseaudio to stop pulseaudio.

Run alsamixer and turn up DAC2 Analog and turn down Left Dig and Right Dig. Do this by using the right arrow key to move to the slider you want to adjust and use the up and down keys to adjust. It's a lot of right arrows before you see DAC2 Analog; I count 14. Don't stop at DAC Voice or DAC1 Analog. It's then another 20 to Left Dig.

The Left and Right Dig's control the audio pass through. By default, whatever comes in the Line In, goes out to the speakers. Turning down Left and Right Dig prevents this.

Keeping DAC2 Analog up allows the output of the ALSA program to be heard.