ALSA移植 ARM 交叉編譯 alsa-lib-1.0.9 alsa-utils-1.0.9 環(huán)境變量 播放錯誤 2012-10-25 14:17:56
分類:
原文地址:
ALSA移植 ARM 交叉編譯 alsa-lib-1.0.9 alsa-utils-1.0.9 環(huán)境變量 播放錯誤 作者:
UP-NETARM2410下載
http://www.alsa-project.org/main/index.php/Download交叉編譯 alsa-lib
./configure --host=arm-none-linux-gnueabi --prefix=/usr/share/arm-alsa
make & make install
交叉編譯 alsa-utils
./configure --host=arm-none-linux-gnueabi --with-alsa-inc-prefix=/usr/share/arm-alsa/include -- with-alsa-prefix=/usr/share/arm-alsa/lib --without-alsamixer // avoid the ncurses lib
make
Copy lib to target board
cp -avr /usr/share/arm-alsa {$rootfs}/usr/share/arm-alsa
環(huán)境變量
export ALSA_CONFIG_PATH=/usr/share/arm-alsa/share/alsa/alsa.conf
未添加環(huán)境變量前出現(xiàn)的錯誤:
~ # ./aplay
ALSA lib conf.c:2827:(snd_config_hook_load) cannot access file /usr/share/arm-alsa/share/alsa/cards/aliases.conf
ALSA lib pcm.c:1959:(snd_pcm_open_conf) Invalid type for PCM default definition (id: default, value: cards.pcm.default)
aplay: main:533: audio open error: Invalid argument
~ # ./aplay
ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:533: audio open error: No such file or directory
交叉編譯其他程序:
Add included file in program: #include <alsa/asoundlib.h>
~# arm-none-linux-gnueabi-gcc -lasound -L/usr/share/arm-alsa/lib/ -I/usr/share/arm-alsa/include/ -o test my_test.c
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。