Results 1 to 2 of 2
Hi All, I am writing a driver for one of the USB audio devices and i have been proceeding as per the document "Writing an ALSA driver", published in ALSA ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-16-2012 #1
- Join Date
- Aug 2012
ALSA User program Help needed
I am writing a driver for one of the USB audio devices and i have been proceeding as per the document "Writing an ALSA driver", published in ALSA homepage.
I am trying to create a user program but i am stuck as i am not able to open the device file.
My call to open in my user application fails:
snd_pcm_open fails with error "ALSA lib pcm.c:2212snd_pcm_open_noupdate) Unknown PCM /dev/snd/pcmC12D0p "
where the last argument is my device file name(pcmCxDxp).
I have tried passing the second argument as "hw:c,d" but the result is the same
I have registered the device and the device files are also generated properly, but when i try to open the device file it fails.
I am not sure where i am going wrong Can anybody throw some light on this.
I have also checked the files generated according to number of USB interfaces and it seems to be fine.
Also other commands like aplay -l etc seems to show my device properly
Also "default" device opens fine.
Last edited by pmr123; 08-16-2012 at 11:49 AM.
- 08-17-2012 #2
- Join Date
- Dec 2008
- Lund, Sweden
I find it odd that the device would be called /dev/snd/pcmC12D0p, as normally the names are of the form CnDmp, where n is the card number, starting at 0 for the first card etc.
When you've created the device file, have you given it the correct major/minor numbers? The fact that it says 'Unknown PCM' indicates that the device file exists but is not properly binding to the underlying driver.