[alsa-devel] Question regarding snd_pcm_control_ioctl
Hi,
I have question concerning ALSA Core snd_pcm_control_ioctl function.
I have noticed that the IOCTL fails if it's called for a device with substream_count = 0, since I'm implementing a PCM device that supports Record and does not support Playback, the IOCTL fails when called for the Playback stream. I would propose, in such case, to return that the stream has 0 playback substreams instead of failing.
Thanks in advance for your help,
Regards,
Selma.
--------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
On Fri, 22 Oct 2010, Bensaid, Selma wrote:
Hi,
I have question concerning ALSA Core snd_pcm_control_ioctl function.
I have noticed that the IOCTL fails if it's called for a device with substream_count = 0, since I'm implementing a PCM device that supports Record and does not support Playback, the IOCTL fails when called for the Playback stream. I would propose, in such case, to return that the stream has 0 playback substreams instead of failing.
You mean probably that the SNDRV_CTL_IOCTL_PCM_INFO ioctl returns -ENOENT when an invalid direction is accessed. It looks correct to me. If a direction does not exist, it makes no sense to gather info for it. And -ENOENT response clearly shows that this direction is not available, so the user space tools can distict if it's an unexpected error or this one.
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.
participants (2)
-
Bensaid, Selma
-
Jaroslav Kysela