All of lore.kernel.org
 help / color / mirror / Atom feed
* ALSA : Can't open capture device
@ 2008-01-11 10:56 Alexandre BOUIN
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre BOUIN @ 2008-01-11 10:56 UTC (permalink / raw)
  To: alsa-devel

Hi list, 

I'm working on an intern project, using an AT91SAM9260EK-based board,
embedded system.
Our kernel contains a full ALSA 1.14 with ASoC layer.
Our ASoC driver works well in capture and playback, if we are using OSS
layer or directly /dev/dsp.
So I need some tips on ALSA layer side :

here you can see that my device is created : 
ll /dev/snd/
crwxrwxrwx    1 root     root     116,   0 Dec 26  2007 controlC0
crwxrwxrwx    1 root     root     116,   4 Dec 26  2007 hwC0D0
crwxrwxrwx    1 root     root     116,  14 Dec 26  2007 pcmC0D0c
crwxrwxrwx    1 root     root     116,  16 Dec 26  2007 pcmC0D0p
ll /dev/dsp
crwxrwxrwx    1 root     root      14,   3 Dec 26  2007 /dev/dsp

A cat on playback device works (I added some traces in kernel) : 
cat < /dev/snd/pcmC0D0p
snd_pcm_open : enter
snd_pcm_open_file : before snd_pcm_open_substream
snd_pcm_open_file : after snd_pcm_open_substream
cat: read error: Invalid argument

But a cat on capture device does not work : 
cat < /dev/snd/pcmC0D0c
-sh: cannot open /dev/snd/pcmC0D0c: No such device

Any suggestion will be greatfull !!

Regards, 

Alex.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA : Can't open capture device
       [not found] <000801c85440$8ec2f280$ac48d780$@bouin@kerlink.fr>
@ 2008-01-11 13:16 ` Clemens Ladisch
  2008-01-11 13:26   ` Alexandre BOUIN
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2008-01-11 13:16 UTC (permalink / raw)
  To: Alexandre BOUIN, alsa-devel

Alexandre BOUIN wrote:
> I'm working on an intern project, using an AT91SAM9260EK-based board,
> embedded system.
> Our kernel contains a full ALSA 1.14 with ASoC layer.
> Our ASoC driver works well in capture and playback, if we are using OSS
> layer or directly /dev/dsp.
> So I need some tips on ALSA layer side :
> 
> here you can see that my device is created : 
> ll /dev/snd/
> crwxrwxrwx    1 root     root     116,   0 Dec 26  2007 controlC0
> crwxrwxrwx    1 root     root     116,   4 Dec 26  2007 hwC0D0
> crwxrwxrwx    1 root     root     116,  14 Dec 26  2007 pcmC0D0c
> crwxrwxrwx    1 root     root     116,  16 Dec 26  2007 pcmC0D0p
> ll /dev/dsp
> crwxrwxrwx    1 root     root      14,   3 Dec 26  2007 /dev/dsp
> 
> A cat on playback device works (I added some traces in kernel) : 
> cat < /dev/snd/pcmC0D0p
> snd_pcm_open : enter
> snd_pcm_open_file : before snd_pcm_open_substream
> snd_pcm_open_file : after snd_pcm_open_substream
> cat: read error: Invalid argument
> 
> But a cat on capture device does not work : 
> cat < /dev/snd/pcmC0D0c
> -sh: cannot open /dev/snd/pcmC0D0c: No such device

Does the capture device appear in /proc/asound/devices or in the output
of "arecord -l"?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA : Can't open capture device
  2008-01-11 13:16 ` ALSA : Can't open capture device Clemens Ladisch
@ 2008-01-11 13:26   ` Alexandre BOUIN
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre BOUIN @ 2008-01-11 13:26 UTC (permalink / raw)
  To: 'Clemens Ladisch'; +Cc: alsa-devel

arecord answer me this : 
arecord -l
**** List of PLAYBACK Hardware Devices ****
card 0: codec [xxxxxxx audio codec], device 0: xxxxxx xxxxxx-I2S-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

After looking for traces in pcm.c and sound.c, I've found this : 
soc_new_pcm playback 1, capture 1
snd_pcm_dev_register str pcmC0D0p
snd_register_device_for_dev minor 16
snd_pcm_dev_register str pcmC0D0c
snd_register_device_for_dev minor 24
snd_register_device_for_dev minor 0

My pcmC0D0x minor devices were wrong :'( i've remade them and now it works.

Thanks a lot.

Regards,
Alex.

-----Message d'origine-----
De : Clemens Ladisch [mailto:cladisch@fastmail.net] 
Envoyé : vendredi 11 janvier 2008 14:17
À : Alexandre BOUIN; alsa-devel@alsa-project.org
Objet : Re: [alsa-devel] ALSA : Can't open capture device

Alexandre BOUIN wrote:
> I'm working on an intern project, using an AT91SAM9260EK-based board,
> embedded system.
> Our kernel contains a full ALSA 1.14 with ASoC layer.
> Our ASoC driver works well in capture and playback, if we are using OSS
> layer or directly /dev/dsp.
> So I need some tips on ALSA layer side :
> 
> here you can see that my device is created : 
> ll /dev/snd/
> crwxrwxrwx    1 root     root     116,   0 Dec 26  2007 controlC0
> crwxrwxrwx    1 root     root     116,   4 Dec 26  2007 hwC0D0
> crwxrwxrwx    1 root     root     116,  14 Dec 26  2007 pcmC0D0c
> crwxrwxrwx    1 root     root     116,  16 Dec 26  2007 pcmC0D0p
> ll /dev/dsp
> crwxrwxrwx    1 root     root      14,   3 Dec 26  2007 /dev/dsp
> 
> A cat on playback device works (I added some traces in kernel) : 
> cat < /dev/snd/pcmC0D0p
> snd_pcm_open : enter
> snd_pcm_open_file : before snd_pcm_open_substream
> snd_pcm_open_file : after snd_pcm_open_substream
> cat: read error: Invalid argument
> 
> But a cat on capture device does not work : 
> cat < /dev/snd/pcmC0D0c
> -sh: cannot open /dev/snd/pcmC0D0c: No such device

Does the capture device appear in /proc/asound/devices or in the output
of "arecord -l"?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-11 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <000801c85440$8ec2f280$ac48d780$@bouin@kerlink.fr>
2008-01-11 13:16 ` ALSA : Can't open capture device Clemens Ladisch
2008-01-11 13:26   ` Alexandre BOUIN
2008-01-11 10:56 Alexandre BOUIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.