v4l2 ioctl DQBUF error EIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello all,

While debugging one of my apps I noticed that the saa7134 driver makes
the VBI device readable in select() and returns EIO for ioctl DQBUF
when there's no signal, i.e. when the card appearently doesn't generate
an interrupt for a long time.  Not sure what this is meant to be used
for since users can implement a timeout if needed with select(), but
anyways, the matter I'm worrying about is that DQBUF in this case does
not simply abort, but actually does de-queue a buffer although it
returns an error code.  Is this a bug or a feature?

If it's a feature I don't understand how the user is supposed to deal
with it, since video_usercopy() sees the error code returned by the
ioctl and hence does not copy struct v4l2_buffer into user space, so
the user doesn't even obtain the buffer index and cannot re-queue it.
Hence EIO turns into EINVAL after a few iterations, i.e. when all
buffers are exhausted, and most apps will either abort or busy loop
since select() doesn't block anymore.

In any case the EIO error code should be documented in the v4l2 API
specification, currently at http://bytesex.org/v4l/spec/r7556.html

bye,
-tom




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux