Step 1: get alsa driver/lib/utils arch files from www.alsa-project.org
and ncurses-5.5
note: let extarct them on same directory
Step 2: see the script file "customer_alsa_build.sh"
file full context:
#!/bin/sh
# This script must be run from this directory
BUILD_ROOT=$PWD/../..
TOP=$PWD
LINUX=$BUILD_ROOT/linux-2.6.16.16
mkdir tmp;
# Create the directory tree to export
mkdir -p $BUILD_ROOT/arm-linux-elf/lib/modules/sound
mkdir -p $BUILD_ROOT/arm-linux-elf/src
mkdir -p $BUILD_ROOT/arm-linux-elf/bin
mkdir -p $BUILD_ROOT/arm-linux-elf/etc
mkdir -p $BUILD_ROOT/arm-linux-elf/usr/share/alsa
# Compile the ALSA driver
tar xjf alsa-driver-1.0.11-Olo.tar.bz2
cd alsa-driver-1.0.11
rm Makefile.conf
./configure --with-cross=arm-linux- --prefix=$TOP/tmp --with-kernel=$LINUX --with-redhat=no --with-suse=no --with-oss=no --with-cards=dummy,usb-audio
make
cd ..
# Copy the modules for the target
mkdir -p $BUILD_ROOT/arm-linux-elf/lib/modules/sound
cp alsa-driver-1.0.11/acore/snd-hwdep.ko \
alsa-driver-1.0.11/acore/snd.ko \
alsa-driver-1.0.11/acore/snd-page-alloc.ko \
alsa-driver-1.0.11/acore/snd-pcm.ko \
alsa-driver-1.0.11/acore/snd-timer.ko \
alsa-driver-1.0.11/acore/snd-rawmidi.ko \
alsa-driver-1.0.11/acore/seq/snd-seq-device.ko \
alsa-driver-1.0.11/acore/seq/snd-seq-dummy.ko \
alsa-driver-1.0.11/usb/snd-usb-audio.ko \
alsa-driver-1.0.11/usb/snd-usb-lib.ko \
$BUILD_ROOT/arm-linux-elf/lib/modules/sound
# Cross-Compile curses
tar xzf ncurses-5.5.tar.gz
cd ncurses-5.5/
CC=arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --build=i386-linux --with-softfloat --prefix=$TOP/tmp
make
make install
cd ..
# Cross-Compile ALSA library
tar xjf alsa-lib-1.0.11-Olo.tar.bz2
cd alsa-lib-1.0.11
CC=arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --build=i386-linux --with-softfloat --exec-prefix=$TOP/tmp --includedir=$TOP/tmp/include
make
# copy libraries and headers target
datadir=$TOP/tmp/share make -e install
arm-linux-strip $TOP/tmp/lib/libasound.so.2.0.0
cp $TOP/tmp/lib/libasound.so.2.0.0 $BUILD_ROOT/arm-linux-elf/lib/
mkdir -p $BUILD_ROOT/arm-linux-elf/include/
cp -a $TOP/tmp/include/alsa $BUILD_ROOT/arm-linux-elf/include/
pushd $BUILD_ROOT/arm-linux-elf/lib
rm -f libasound.so.2
rm -f libasound.so
ln -s libasound.so.2.0.0 libasound.so.2
ln -s libasound.so.2.0.0 libasound.so
popd
cd ..
# Cross-Compile ALSA utils
tar xjf alsa-utils-1.0.11.tar.bz2
cp alsa-utils-1.0.11.tar.bz2 $BUILD_ROOT/arm-linux-elf/src
cd alsa-utils-1.0.11
CC=arm-linux-gcc ./configure --host=arm-linux --target=arm-linux --build=i386-linux --with-softfloat --prefix=$TOP/tmp --with-alsa-prefix=$TOP/tmp/lib/ --with-alsa-inc-prefix=$TOP/tmp/include CPPFLAGS="-I$TOP/tmp/include/alsa -I$TOP/tmp/include/ncurses"
make
make install
arm-linux-strip $TOP/tmp/bin/aplay
cp $TOP/tmp/bin/aplay $BUILD_ROOT/arm-linux-elf/bin
(cd $BUILD_ROOT/arm-linux-elf/bin; rm -f arecord; ln -s aplay arecord)
run it in your Shell Term
(complete)
enjoy!