1) download ALSA Lib. Http://www.alsa-project.org/main/index.php/Main_Page
2) tar jxvf alsa-lib-1.0.19.tar.bz2
3) CD alsa-lib-1.0.19
4) CC = $ (cross_compile)./configure -- target = arm-Linux -- Host = i686-linux -- prefix = ~ /Alsalib_arm
5) make
6) make install
When compiling an app, # include <ALSA/asoundlib. h> is required. The makefile syntax is as follows:
First:
Cflags =-I/home/BEN
Ldflags =-L/hom/BEN
ALL: HFP. c
$ (GCC)-o hfp. C $ cflags) $ (lsflags)-lasound
Second:
ALL: HFP. c
$ (CC)-o hfp. c 'pkg-config -- Libs -- cflags ALSA'
The environment variable pkg_config_path should be specified as the path of the Cross-compiled ALSA library. Otherwise, the x86 version installed by default will be included.
Compile ALSA-util
Cc = arm-None-Linux-gnueabi-GCC. /configure -- target = arm-Linux -- Host = i686-linux -- prefix =/home/BEN/Works/codes/ALSA/alsautil_arm -- With-ALSA-inc-Prefix =/home/BEN /Works/codes/ALSA/alsalib_arm/include cflags = "-I/home/BEN/Works/codes/ALSA/alsalib_arm/include" ldflags = "-l/home/BEN/ works/codes/ALSA/alsalib_arm/lib-lasound"