From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from galahad.ideasonboard.com ([185.26.127.97]:42202 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757254AbaITSfK (ORCPT ); Sat, 20 Sep 2014 14:35:10 -0400 From: Laurent Pinchart To: Hans Verkuil Cc: linux-media@vger.kernel.org, m.chehab@samsung.com, Hans Verkuil Subject: Re: [PATCH 2/3] DocBook media: fix the poll() 'no QBUF' documentation Date: Sat, 20 Sep 2014 21:35:16 +0300 Message-ID: <3467173.gE0lEHfa57@avalon> In-Reply-To: <1411203375-15310-3-git-send-email-hverkuil@xs4all.nl> References: <1411203375-15310-1-git-send-email-hverkuil@xs4all.nl> <1411203375-15310-3-git-send-email-hverkuil@xs4all.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-media-owner@vger.kernel.org List-ID: Hi Hans, Thank you for the patch. On Saturday 20 September 2014 10:56:14 Hans Verkuil wrote: > From: Hans Verkuil > > Clarify what poll() returns if STREAMON was called but not QBUF. > Make explicit the different behavior for this scenario for > capture and output devices. > > Signed-off-by: Hans Verkuil > --- > Documentation/DocBook/media/v4l/func-poll.xml | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/Documentation/DocBook/media/v4l/func-poll.xml > b/Documentation/DocBook/media/v4l/func-poll.xml index 85cad8b..b7ed9e8 > 100644 > --- a/Documentation/DocBook/media/v4l/func-poll.xml > +++ b/Documentation/DocBook/media/v4l/func-poll.xml > @@ -44,10 +44,18 @@ Capture devices set the POLLIN and > flags. When the function timed out it returns a value of zero, on > failure it returns -1 and the > errno variable is set appropriately. When the > -application did not call &VIDIOC-QBUF; or &VIDIOC-STREAMON; yet the > +application did not call &VIDIOC-STREAMON; the > poll() function succeeds, but sets the > POLLERR flag in the > -revents field. > +revents field. When the > +application calls &VIDIOC-STREAMON; for a capture device without a > +preceeding &VIDIOC-QBUF; the poll() function > +succeeds, but sets the POLLERR flag in the > +revents field. Nitpicking here, I would word it as When the application has called &VIDIOC-STREAMON; for a capture device but hasn't called &VIDIOC-QBUF; yet the poll() function succeeds and sets the POLLERR flag in the revents field. > For output devices this > +same situation will cause poll() to succeed > +as well, but it sets the POLLOUT and > +POLLWRNORM flags in the > revents > +field. > > When use of the read() function has > been negotiated and the driver does not capture yet, the -- Regards, Laurent Pinchart