alsa的alsa-utils测试cannot find card '0'
# ./aplay
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:682: audio open error: No such file or directory
--------------------------------------------------------------------------------------------------------------
运行不出来可能是
1、在/dev/snd目录下没有建立相关的文件节点
参见:http://www.arm9home.net/simple/index.php?t7739.html
2、权限原因。没有/dev/snd、/dev/dsp的权限
参见:http://stackoverflow.com/questions/3570132/aplay-alsaplayer-sound-not-working-for-normal-user
3、设备号设定原因
参见:http://forums.debian.net/viewtopic.php?f=7&t=53516
但以上均不是我的原因……,那我的原因是什么呢?
相关信息:
# cat /proc/asound/cards
0 [No00 ]: MStar ALSA DriveMStar MAD No.00 - MStar MAD No.00
MStar MPEG Audio Decoder No.00
# cat devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
# cat modules
0 mdrv_alsa_audio
备注:设置ALSA设备的主设备号,它固定为116