Setting up Alsa by hand on an embedded system
OK, I tried this question about a month ago but I did not make it clear I think.
I need to add the ability to record and playback audio on the embedded linux platform my company uses. Being embedded, I do not have a full Linux distribution. I have to set up ALSA by hand. I can't simply untar the alsa package and do ./configure followed by make.
Here's what I have done so far:
Rebuilt the kernel to have support for alsa and my chipset (an Intel ICH5 that uses the AC97 codec).
added the /dev/snd/ device nodes (I skipped the midi nodes because I do not need them
copied libasound.so.2.0.0. from my host development box to the lib path on my embedded box. I added all the symlinks pointing to this library.
So I started by compiling some of the simple test programs, specifically the ones from the LinuxJournal article on ALSA (
http://www.linuxjournal.com/article/6735). The 4 sample programs run just fine on my host system. On my embedded system the command to open the PCM device fails with:
ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default unable to open pcm device: No such file or directory
So I changed device name in the code from "default" to "plug:0,0" and it still fails with the same message (but reads "plug:0,0" instead of default).
So what am I doing wrong? Do I need a configuration file somewhere? Do I need to use a different argument for the PCM open? Any suggestions? David
Quoted 4 lines · David Smoot
I need to add the ability to record and playback audio on the embedded linux platform my company uses. Being embedded, I do not have a full Linux distribution. I have to set up ALSA by hand. I can't simply untar the alsa package and do ./configure followed by make.
Have a look into alsa-lib's Makefile.am files to see what gets installed.
Quoted 1 line
ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default
I guess the configuration files in /use/share/alsa/ are missing.
HTH
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
Quoted 4 lines · David Smoot
[...]
So I started by compiling some of the simple test programs, specifically the ones from the LinuxJournal article on ALSA (
http://www.linuxjournal.com/article/6735).
You noticed the comment about the bug in some of the listings? The variable "dir" must be initialized to zero, or segfaults may occur.
Asbj.S.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
I don't the dir variable is the issue because I am not getting segfaults. The code compiles and works on my "host machine" (full debian box) but does not on my embedded.
It appears that combining the two suggestions from Clements and Steve have gotten me further. It appears that the file /usr/share/alsa.conf loads the default configuration and also loads the file in /etc/asound.conf. I get a different error now, I think I need to tweak the files in /usr/share/alsa to match the correct chipset.
Does the alsa configuration environment require python? My embedded system does not have python. I'm sure I will have to hack it in someday but it is not there yet.
I've gotten further but a few more errors but I think you all have gotten me on the correct track. Thank you.
David
Hm, yeah, I missed the /usr/share/alsa stuff. Whoops.
We don't have python on our box, so I'd guess you'd be fine.
- Steve
Quoted 9 lines · David Smoot
I don't the dir variable is the issue because I am not getting segfaults. The code compiles and works on my "host machine" (full debian box) but does not on my embedded.
It appears that combining the two suggestions from Clements and Steve have gotten me further. It appears that the file
/usr/share/alsa.confloads the default configuration and also loads the file in/etc/asound.conf. I get a different error now, I think I need to tweak the files in/usr/share/alsato match the correct chipset.Does the alsa configuration environment require python? My embedded system does not have python. I'm sure I will have to hack it in someday but it is not there yet.
I've gotten further but a few more errors but I think you all have gotten me on the correct track. Thank you.
David
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click