ebd2410: enable ALSA Framework

[Software build]


1: Download the alsa-lib-1.0.25 and alsa-utils-1.0.25:

http://pan.baidu.com/share/link?shareid=253494&uk=822921326


2: create the following DIR structure for build environment:

$ls -l
total 4168
drwxr-xr-x 11 eric eric    4096 2013-01-14 15:45 alsa-lib-1.0.25
-rw-r--r--  1 eric eric  838403 2012-11-14 15:48 alsa-lib-1.0.25.tar.bz2
drwxr-xr-x  3 eric eric    4096 2013-01-14 15:46 alsa-lib-out
drwxr-xr-x 17 eric eric    4096 2013-01-14 15:47 alsa-utils-1.0.25
-rw-r--r--  1 eric eric 1132780 2012-11-14 15:49 alsa-utils-1.0.25.tar.bz2
drwxr-xr-x  5 eric eric    4096 2013-01-14 15:48 alsa-utils-out


alsa-lib-out, alsa-utils-out is for build out files


3: compile the alsa-lib-1.0.25:

CC=/home/eric/work/cross-compiler/crosstool-ng-1.15.3/out/bin/arm-unknown-linux-gnueabi-gcc ./configure --target=arm-linux --host=arm-linux

make install DESTDIR=/home/eric/work/alsa/alsa-lib-out

cp -ar alsa-lib-out/* $DST_ROOT


4: compile the alsa-utils-1.0.25:

CC=/home/eric/work/cross-compiler/crosstool-ng-1.15.3/out/bin/arm-unknown-linux-gnueabi-gcc ./configure --host=arm-linux --target=arm-linux --disable-alsamixer --disable-xmlto --with-alsa-prefix=/home/eric/work/alsa/alsa-lib-out/usr/lib --with-alsa-inc-prefix=/home/eric/work/alsa/alsa-lib-out/usr/include 
 
 
make install DESTDIR=/home/eric/work/alsa/alsa-utils-out


cp -ar alsa-utils-out/* $DST_ROOT


5: make device links in rc.local (may need)

/bin/mkdir /dev/snd 
/bin/ln -s /dev/pcmC0D0c /dev/snd/pcmC0D0c 
/bin/ln -s /dev/pcmC0D0p /dev/snd/pcmC0D0p 
/bin/ln -s /dev/controlC0 /dev/snd/controlC0 
/bin/ln -s /dev/pcmC1D0c /dev/snd/pcmC1D0c 
/bin/ln -s /dev/pcmC1D0p /dev/snd/pcmC1D0p 
/bin/ln -s /dev/controlC1 /dev/snd/controlC1 
/bin/ln -s /dev/seq /dev/snd/seq 
/bin/ln -s /dev/timer /dev/snd/timer


6: make sure librt is in the /lib directory


7: create the alsa configure

cat etc/asound.conf
pcm.!default {
        type hw
        card 0
}


ctl.!default {
        type hw
        card 0
}

[Software build]

1: use speaker-test

speaker-test -c 2

2: use aplay

aplay xxx.wave

Note that the wav file should be stereo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值