[alsa-devel] can not access the alsa driver
Ning Zhang
ning.zhang06 at gmail.com
Sat Jan 5 15:42:03 CET 2008
Dear all,
I wrote an alsa device driver for my arm_based platform. Then I cross
compiled the alsa-lib-1.0.15, and build an application (static) with the
lib.
I build the driver in the kernel, so after the kernel booted, I can get
these information:
# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.14rc1 (Tue Jan 09
09:56:17 2007 UTC).
cat /proc/asound/devices
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer
# cat /proc/asound/cards
0 [XYZ ]: XYZ - ARM
XYZ at 0xc485e000 0xc4870000 irq 57
( I did not found /dev/snd or /dev/dsp )
But when I run the application, I got these errors:
# /tmp/pcm_play_arm_s default
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default
Playback open error: No such file or directory
I googled the Internet, and add two files manually :
# cat /etc/alsa/alsa.conf
pcm.default{
type hw
card 0
}
# cat ~/.asoundrc
pcm.default {
type hw
card 0
}
But I still can not let the application to access the pcm device, this time
I got the following information:
# /tmp/pcm_play_arm_s default
cannot open audio device default (No such file or directory)
Here are my questions:
1, When we install the alsa-lib, we can get some libs, besides those, do we
also get some config files according to the local linux environment and
alsa-lib will use these config files to access the real driver? If that, how
can I install the alsa-lib to a embedded platform directly or what config
files should I port to embedded platform?
2, Must I edit ~/.asoundrc and /etc/alsa/alsa.conf ? In my situation, what
should I do ? Is somebody so kind can give me a simple template?
Because I am a newbie in alsa world, I must make some mistakes, so I am
lookinf forward to your advice.
Thanks in advance for your help.
David.
More information about the Alsa-devel
mailing list