diff mbox series

[RFC,v2,1/6] media: v4l2-ctrls: fix documentation of V4L2_CID_FOCUS_ABSOLUTE unit

Message ID 20230406-feature-controls-lens-v2-1-faa8ad2bc404@wolfvision.net (mailing list archive)
State New, archived
Headers show
Series media: v4l2-ctrls: add controls for complex lens controller devices | expand

Commit Message

Michael Riesch April 25, 2023, 9:45 a.m. UTC
The current unit description of the V4L2_CID_FOCUS_ABSOLUTE does not
make sense and was probably copy-pasted from V4L2_CID_FOCUS_RELATIVE.
Fix the unit description in the documentation.

Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
 Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hans Verkuil June 6, 2023, 10:31 a.m. UTC | #1
On 25/04/2023 11:45, Michael Riesch wrote:
> The current unit description of the V4L2_CID_FOCUS_ABSOLUTE does not
> make sense and was probably copy-pasted from V4L2_CID_FOCUS_RELATIVE.
> Fix the unit description in the documentation.
> 
> Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
> ---
>  Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> index daa4f40869f8..df29150dce7b 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> @@ -140,8 +140,8 @@ enum v4l2_exposure_metering -
>  
>  ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
>      This control sets the focal point of the camera to the specified
> -    position. The unit is undefined. Positive values set the focus
> -    closer to the camera, negative values towards infinity.
> +    position. The unit is undefined. Larger values move the focus closer to
> +    the camera, smaller values move the focus to infinity.
>  
>  ``V4L2_CID_FOCUS_RELATIVE (integer)``
>      This control moves the focal point of the camera by the specified
> 

Can you repost patches 1 and 2 separately (i.e. without the RFC tag)? This
seems reasonable to apply, so let's split this off from the remainder of
this series.

Regards,

	Hans
Laurent Pinchart June 6, 2023, 10:34 a.m. UTC | #2
Hi Michael,

Thank you for the patch.

On Tue, Apr 25, 2023 at 11:45:11AM +0200, Michael Riesch wrote:
> The current unit description of the V4L2_CID_FOCUS_ABSOLUTE does not
> make sense and was probably copy-pasted from V4L2_CID_FOCUS_RELATIVE.
> Fix the unit description in the documentation.
> 
> Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
> ---
>  Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> index daa4f40869f8..df29150dce7b 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> @@ -140,8 +140,8 @@ enum v4l2_exposure_metering -
>  
>  ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
>      This control sets the focal point of the camera to the specified
> -    position. The unit is undefined. Positive values set the focus
> -    closer to the camera, negative values towards infinity.
> +    position. The unit is undefined. Larger values move the focus closer to
> +    the camera, smaller values move the focus to infinity.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  ``V4L2_CID_FOCUS_RELATIVE (integer)``
>      This control moves the focal point of the camera by the specified
>
Laurent Pinchart June 7, 2023, 6:49 a.m. UTC | #3
On Tue, Jun 06, 2023 at 01:34:21PM +0300, Laurent Pinchart wrote:
> On Tue, Apr 25, 2023 at 11:45:11AM +0200, Michael Riesch wrote:
> > The current unit description of the V4L2_CID_FOCUS_ABSOLUTE does not
> > make sense and was probably copy-pasted from V4L2_CID_FOCUS_RELATIVE.
> > Fix the unit description in the documentation.
> > 
> > Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
> > ---
> >  Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> > index daa4f40869f8..df29150dce7b 100644
> > --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> > +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
> > @@ -140,8 +140,8 @@ enum v4l2_exposure_metering -
> >  
> >  ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
> >      This control sets the focal point of the camera to the specified
> > -    position. The unit is undefined. Positive values set the focus
> > -    closer to the camera, negative values towards infinity.
> > +    position. The unit is undefined. Larger values move the focus closer to
> > +    the camera, smaller values move the focus to infinity.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I just noticed that the UVC specification states

  4.2.2.1.6 Focus (Absolute) Control

  The Focus (Absolute) Control is used to specify the distance to the
  optimally focused target. This value is expressed in millimeters. The
  default value is implementation-specific.

This is the opposite of the V4L2_CID_FOCUS_ABSOLUTE control :-( I
suppose this will need to be solved in the uvcvideo driver by converting
the value.

> >  
> >  ``V4L2_CID_FOCUS_RELATIVE (integer)``
> >      This control moves the focal point of the camera by the specified
> >
diff mbox series

Patch

diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
index daa4f40869f8..df29150dce7b 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst
@@ -140,8 +140,8 @@  enum v4l2_exposure_metering -
 
 ``V4L2_CID_FOCUS_ABSOLUTE (integer)``
     This control sets the focal point of the camera to the specified
-    position. The unit is undefined. Positive values set the focus
-    closer to the camera, negative values towards infinity.
+    position. The unit is undefined. Larger values move the focus closer to
+    the camera, smaller values move the focus to infinity.
 
 ``V4L2_CID_FOCUS_RELATIVE (integer)``
     This control moves the focal point of the camera by the specified