router2@ubuntu:~/third_lib/tmp/arm-libalsa-1.0.29$ ls share/aclocal/ alsa.m4
gettextize 初始化 GNU gettext 支持,用于多语言支持:
1
gettextize
autoheader 生成 config.h.in 文件
1
autoheader
报错:
1 2 3 4 5
configure.ac:356: error: `po/Makefile.in' is already registered with AC_CONFIG_FILES. ../../lib/autoconf/status.m4:288: AC_CONFIG_FILES is expanded from... configure.ac:356: the top level autom4te: /usr/bin/m4 failed with exit status: 1 autoheader: '/usr/bin/autom4te' failed with exit status: 1
最后执行 make 和 make install 也没出现什么问题了,make install 需要 sudo 加权限否则会报错。
1 2
make sudo make install
移植在开发板测试时出现以下错误:
1 2 3
ALSA lib conf.c:3512:(snd_config_hook_load) cannot stat file/directory /home/router2/third_lib/tmp/arm-libalsa-1.0.29/share/alsa/cards/aliases.conf ALSA lib pcm.c:2267:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.default aplay: main:722: audio open error: No such file or directory
#!/bin/sh #正点原子@ALIENTEK #设置捕获的音量 amixer cset name='Capture Volume' 90,90 #PCM amixer sset 'PCM Playback' on amixer sset 'Playback' 256 amixer sset 'Right Output Mixer PCM' on amixer sset 'Left Output Mixer PCM' on #ADC PCM amixer sset 'ADC PCM' 200 #耳机/喇叭(扬声器)设置播放音量,直流/交流 #Turn on Headphone amixer sset 'Headphone Playback ZC' on #Set the volume of your headphones(98% volume,127 is the MaxVolume) amixer sset Headphone 125,125 #Turn on the speaker amixer sset 'Speaker Playback ZC' on #Set the volume of your Speaker(98% volume,127 is the MaxVolume) amixer sset Speaker 125,125 #Set the volume of your Speaker AC(80% volume,100 is the MaxVolume) amixer sset 'Speaker AC' 4 #Set the volume of your Speaker AC(80% volume,5 is the MaxVolume) amixer sset 'Speaker DC' 4 #音频输入,左声道管理 #Turn on Left Input Mixer Boost amixer sset 'Left Input Mixer Boost' off amixer sset 'Left Boost Mixer LINPUT1' off amixer sset 'Left Input Boost Mixer LINPUT1' 0 amixer sset 'Left Boost Mixer LINPUT2' off amixer sset 'Left Input Boost Mixer LINPUT2' 0 #Turn off Left Boost Mixer LINPUT3 amixer sset 'Left Boost Mixer LINPUT3' off amixer sset 'Left Input Boost Mixer LINPUT3' 0 #音频输入,右声道管理,全部关闭 #Turn on Right Input Mixer Boost amixer sset 'Right Input Mixer Boost' on amixer sset 'Right Boost Mixer RINPUT1' off amixer sset 'Right Input Boost Mixer RINPUT2' 0 amixer sset 'Right Boost Mixer RINPUT2' on amixer sset 'Right Input Boost Mixer RINPUT2' 127 amixer sset 'Right Boost Mixer RINPUT3' off amixer sset 'Right Input Boost Mixer RINPUT3' 0
使用 arecord 录制音频
1
arecord -f cd -d 10 record.wav
刷屏提示错误:
1 2 3 4 5 6 7 8 9 10 11
[@obito:/music]# arecord -f cd -d 10 record.wav Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo overrun!!! (at least 3.360 ms long) overrun!!! (at least 3.064 ms long) overrun!!! (at least 2.956 ms long) overrun!!! (at least 3.157 ms long) overrun!!! (at least 2.959 ms long) overrun!!! (at least 3.087 ms long) overrun!!! (at least 2.956 ms long) overrun!!! (at least 2.950 ms long) overrun!!! (at least 3.026 ms long)
[@obito:/music]# alsactl -f /var/lib/alsa/asound.state store alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: No such file or directory