Tom Zoerner <tomzo@xxxxxxxxxx> writes: > 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. So does bttv 0.9.x btw, and it may happen for other reasons than "no signal" too. > 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? Its done intentionally. > 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. Whoops. Good point. Maybe better use something like V4L2_BUF_FLAG_IOERROR instead? Gerd PS: the event stuff is still sitting in my inbox, waiting for me finding some time to look at it in detail ... -- sigfault