ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have gone through the above link and compiled the program successfully with -lasound....but while executing it with argument /dev/audio i m getting the error as below
ALSA lib pcm.c:2184snd_pcm_open_noupdate) Unknown PCM /dev/audio
cannot open audio device (No such file or directory)
So what changes i have to do.....i have done alsoconf.....no problem with the sound card as i have seen,i have played some .wav files...
Thanks in advance kindly please help.
k thank you as u said i gave ./a.out plughw:0,0 / hw:0,0 but got this error ALSA lib pcm_hw.c:1429_snd_pcm_hw_open) Invalid value for card
cannot open audio device (No such file or directory)
Hi ALL,
i compiled the capture program given in the above link by passing the argument hw:0,0 bt getting the segmentation fault as below when i run gdb...Please kindly help i m not able to open the device and capture the sound..
Breakpoint 1, main (argc=1, argv=0xbff3bbc4) at captest.c:13
13 if ((err = snd_pcm_open (&capture_handle, argv[1], SND_PCM_STREAM_CAPTURE, 0)) < 0) {
(gdb) s
a.out: pcm.c:2210: snd_pcm_open: Assertion `pcmp && name' failed.
Program received signal SIGABRT, Aborted.
0xb7d15c66 in raise () from /lib/libc.so.6
I m extremely sorry for that previous post i have passed argument with executable got the seg fault bt i didnt pass while i was checking with gdb....i have attached gdb output..hope this helps u little more to figure out...
and this is what i get when i gave command aplay -l...
**** List of PLAYBACK Hardware Devices ****
card 0: ICH6 [Intel ICH6], device 0: Intel ICH [Intel ICH6]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH6 [Intel ICH6], device 4: Intel ICH - IEC958 [Intel ICH6 - IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
i have tried even giving all the combinations hw:0,0 0,4 bt results are same...
This GDB was configured as "i486-slackware-linux"...
(gdb) b main
Breakpoint 1 at 0x80487ee: file captest.c, line 13.
(gdb) r hw:0,0
Starting program: /home/puneeth/a.out hw:0,0
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c876c0 (LWP 3408)]
[Switching to Thread 0xb7c876c0 (LWP 3408)]
Breakpoint 1, main (argc=2, argv=0xbfe22294) at captest.c:13
13 if ((err = snd_pcm_open (&capture_handle, argv[1], SND_PCM_STREAM_CAPTURE, 0)) < 0) {
(gdb) s
20 if ((err = snd_pcm_hw_params_malloc (&hw_params)) < 0) {
(gdb) s
26 if ((err = snd_pcm_hw_params_any (capture_handle, hw_params)) < 0) {
(gdb) s
32 if ((err = snd_pcm_hw_params_set_access (capture_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
(gdb) s
38 if ((err = snd_pcm_hw_params_set_format (capture_handle, hw_params, SND_PCM_FORMAT_S16_LE)) < 0) {
(gdb) s
44 if ((err = snd_pcm_hw_params_set_rate_near (capture_handle, hw_params, 44100, 0)) < 0) {
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0xb7e6ec24 in ?? () from /usr/lib/libasound.so.2
(gdb)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.