From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lb1-smtp-cloud6.xs4all.net ([194.109.24.24]:52424 "EHLO lb1-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932248AbaJaOyJ (ORCPT ); Fri, 31 Oct 2014 10:54:09 -0400 Message-ID: <5453A289.5020007@xs4all.nl> Date: Fri, 31 Oct 2014 15:54:01 +0100 From: Hans Verkuil MIME-Version: 1.0 To: Simon Farnsworth , linux-media@vger.kernel.org Subject: Re: [PATCH] DocBook media: Clarify V4L2_FIELD_ANY for drivers References: <1414766908-24894-1-git-send-email-simon.farnsworth@onelan.co.uk> In-Reply-To: <1414766908-24894-1-git-send-email-simon.farnsworth@onelan.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On 10/31/2014 03:48 PM, Simon Farnsworth wrote: > Documentation for enum v4l2_field did not make it clear that V4L2_FIELD_ANY > is only acceptable as input to the kernel, not as a response from the > driver. > > Make it clear, to stop userspace developers like me assuming it can be > returned by the driver. > > Signed-off-by: Simon Farnsworth > --- > Documentation/DocBook/media/v4l/io.xml | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml > index e5e8325..8918bb2 100644 > --- a/Documentation/DocBook/media/v4l/io.xml > +++ b/Documentation/DocBook/media/v4l/io.xml > @@ -1422,7 +1422,10 @@ one of the V4L2_FIELD_NONE, > V4L2_FIELD_BOTTOM, or > V4L2_FIELD_INTERLACED formats is acceptable. > Drivers choose depending on hardware capabilities or e. g. the > -requested image size, and return the actual field order. &v4l2-buffer; > +requested image size, and return the actual field order. If multiple > +field orders are possible the driver must choose one of the possible > +field orders during &VIDIOC-S-FMT; or &VIDIOC-TRY-FMT; and must not > +return V4L2_FIELD_ANY. &v4l2-buffer; I would phrase it slightly differently: "Drivers must never return V4L2_FIELD_ANY. If multiple field orders are possible the driver must choose one of the possible field orders during &VIDIOC-S-FMT; or &VIDIOC-TRY-FMT;." Regards, Hans > field can never be > V4L2_FIELD_ANY. > >