People who have done the system should know that there is a layer of lib between the framework and the driver, and the corresponding LIB libraries in the audio framework and some tool alsa-lib&alsa-utils are shown below.
Alsa-lib for Arm:
>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>> #!/bin/bash echo "Building ALSA library for ARM platform ..." # Building shared Li Brary cc=arm-linux-gnueabihf-gcc./configure--host=arm-linux-gnueabi--target=arm-linux--prefix=/home/larkin/ audio/alsa-lib/out/arm/alsa-lib/--with-alsa-devdir=/dev/snd--enable-static=no--enable-shared=yes-- Disable-python--with-configdir=/home/larkin/audio/alsa-lib/out/arm/alsa-config--with-plugindir=/home/larkin/
Audio/alsa-lib/out/arm/alsa-plugin cflags= "-fpic"; If [$?-ne 0]; Then echo "Configure Alsa-lib shared library failed ..." Exit 1 fi.
Make If [$?-ne 0];
Then echo "Build shared Alsa-lib failed ..." Exit 2 fi make install; # Building Static Library CC=ARM-LINUX-GNUEABIHF-GCC./configure--host=arm-linux-gnueabi--target=arm-linux--prefix=/home/linux/workplace/share/tmp/alsa-lib--with-alsa-devdir=/dev/snd--enable-static=yes-- Enable-shared=no--disable-python--with-configdir=/home/linux/workplace/share/tmp/alsa-config--with-plugindir=/
Home/linux/workplace/share/tmp/alsa-plugin; If [$?-ne 0]; Then echo "Configure alsa-lib Static library failed ..." Exit 3 fi.
Make If [$?-ne 0];
Then echo "Build static Alsa-lib Failed ..." Exit 4 fi make install; echo "The arm alsa-lib build process is finished successfully." >>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>> Alsa-lib for PC: >>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #!/bin/bash echo "Building ALSA library for x86 platform ..." Building shared library CC=GCC./configure--prefix=/home/larkin/audio/alsa-lib/out/pc/alsa-lib/--with-alsa-devdir= /dev/snd--enable-static=no--enable-shared=yes--disable-python--with-configdir=/home/larkin/audio/alsa-lib/out/
Pc/alsa-config--with-plugindir=/home/larkin/audio/alsa-lib/out/pc/alsa-plugin CFLAGS= "-fPIC"; If [$?-ne 0]; Then echo "Configure Alsa-lib shared library failed ..." Exit 1 fi.
Make If [$?-ne 0];
Then echo "Build shared Alsa-lib failed ..." Exit 2 fi make install; # Building Static Library CC=GCC./configure--prefix=/home/larkin/audio/alsa-lib/out/pc/alsa-lib/--with-alsa-devdir =/dev/snd--enable-static=yes--enable-shared=no--disable-python--with-configdir=/home/larkin/audio/alsa-lib/out
/pc/alsa-config--with-plugindir=/home/larkin/audio/alsa-lib/out/pc/alsa-plugin; If [$?-ne 0]; Then echo "Configure alsa-lib static LiBrary failed ... "Exit 3 fi make clean;
Make If [$?-ne 0];
Then echo "Build static Alsa-lib Failed ..." Exit 4 fi make install;
CD./test; # Build alsa-lib PCM test code GCC pcm_min.c-i/home/larkin/audio/alsa-lib/out/pc/alsa-lib/include/-l/home/huangc/
audio/alsa-lib/out/pc/alsa-lib/lib/-lasound-lpthread-lrt-lm-ldl-o pcm_min; If [$?-ne 0]; Then echo "Build Pcm_min.c failed ..." Exit 5 fi gcc pcm.c-i/home/larkin/audio/alsa-lib/out/pc/alsa-lib/include/-l/home
/huangc/audio/alsa-lib/out/pc/alsa-lib/lib/-lasound-lpthread-lrt-lm-ldl-o PCM; If [$?-ne 0]; Then echo "Build Pcm.c failed ..." Exit 5 fi # list the output files Ls-l PCM pcm_min.
/out/pc/alsa-lib/lib/*;
CD ... echo "The x86 alsa-lib build process is finished successfully." >>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>&gT;>>>>> alsa-utils: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>/* alsa-utils build for Arm platform*/cc= ARM-LINUX-GNUEABIHF-GCC./configure--HOST=ARM-LINUX-GNUEABIHF--target=arm-linux--prefix=/home/linux/workplace/ share/foxp/cflags= "-i/home/linux/workplace/share/tmp/alsa-lib/out/arm/alsa-lib/include-lpthread-fpic" LDFLAGS= " -l/home/linux/workplace/share/tmp/alsa-lib/out/arm/alsa-lib/lib "libs="-lasound "--disable-alsamixer-- Disable-xmlto; Make clean; Make
sudo make install; /* Alsa-utils aplay * * root@:/home/larkin/alsa/alsa-utils/amixer# ARM-LINUX-GNUEABIHF-GCC Aplay.c-i/home/larkin/alsa /alsa-lib/build/include-i/home/larkin/alsa/alsa-utils/include-l/home/larkin/alsa/alsa-lib/build/lib-lasound- Lrt-ldl-lm-lpthread-static-o aplays/* alsa-utilsAmixer * * root@:/home/larkin/alsa/alsa-lib/build/share/alsa# ARM-LINUX-GNUEABIHF-GCC amixer.c volume_mapping.c-i/ home/larkin/alsa/alsa-lib/build/include-i/home/larkin/alsa/alsa-utils/include-l/home/larkin/alsa/alsa-lib/ Build/lib-lasound-lrt-ldl-lm-lpthread-static-o amixers >>>>>>>>>>>>>>& Gt;>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>