Reference http://blog.csdn.net/lanmanck/article/details/5829143
Http://dev.hqyj.com/column/column3.htm
1.TAR-XVF alsa-lib_1.0.23.orig.tar.bz2
./configure--host=arm-linux--prefix=/home/alsa/alsa_lib
Make
Make install
Generated libraries
alsa_lib$ ls
Bin include Lib Share
In this file lib under the library *.so.* is to be published to the board, you can directly copy to the Development Board under the root directory Lib
(This is just copy, do not clip, back to use, note that some soft connection can not copy, only to the board to create their own ...) )
2.TAR-XVF alsa-utils-1.0.23.tar.bz2
./configure--host=arm-linux--prefix=/home/alsa/alsa_utils
--with-alsa-inc-prefix=/home/alsa/alsa_lib/include
--with-alsa-prefix=/home/alsa/alsa_lib/lib
--disable-alsamixer--disable-xmlto
Error
Mv:cannot stat ' T-ja.gmo ': No such file or directory
The solution is to download the Gettext:apt-get install GetText
Make
Make install
After the success, you will see the generated tools under the Bin directory under your alsa-utils installation path.
Aconnect Amidi amixer aplay aplaymidi arecord arecordmidi aseqdump aseqnet iecset speaker-test
3.alsa_lib
CP alsa/alsa_lib/lib/libasound.*./nfsdir_linux/lib/
ALSA copy of configuration file
ALSA configuration files other than libraries also need to be copied to the target board root file system
It is important to note that the location of the share directory on the target board must be in line with the host's storage path,
For example, on the host store in/home/david/project/s5pc100/alsa/alsa-lib,
Then we have to put share on this path on the target board.
CP-RF share/home/nfsdir_linux/home/alsa/alsa_lib/
Alsa_utils
Copy the contents of the Alsa-utils/bin directory to the bin in the target board root file system
CP bin/*/home/nfsdir_linux/bin/
4. Test
#cat/proc/asound/devices
0: [0]: Control
[0-0]: Digital audio playback
[0-0]: Digital audio capture
: Timer
# ls-l/dev/snd/
CRW-RW----System Audio 116, 1970-01-01 00:00 Timer Timer interface
CRW-RW----System Audio 116, 0 1970-01-01 00:00 controlC0 Control Interface
CRW-RW----System Audio 116, 1970-01-01 00:00 pcmc0d0c PCM interface
CRW-RW----System Audio 116 1970-01-01 00:00 pcmc0d0p
If no snd directory is created
Play WAV files
Aplay Test.wav
Playing WAVE ' test.wav ': Unsigned 8 bit, Rate 16000 Hz, Mono
Recording
arecord-d 20-c 2-t wav-r 8000-f "signed bit Little endian" A.wav
In 20-second interval (-D-20), Stereo (-C 2), frequency 8000Hz to record the wave format audio