lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190815134848.GA20020@pendragon.ideasonboard.com>
Date:   Thu, 15 Aug 2019 16:48:48 +0300
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Hans Verkuil <hverkuil-cisco@...all.nl>
Cc:     Jacopo Mondi <jacopo@...ndi.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" 
        <linux-media@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 2/5] media: v4l2-ctrl: Document V4L2_CID_LOCATION

Hi Hans,

On Thu, Aug 15, 2019 at 03:30:59PM +0200, Hans Verkuil wrote:
> On 8/14/19 10:28 PM, Jacopo Mondi wrote:
> > Add documentation for the V4L2_CID_LOCATION camera control. The newly
> > added read-only control reports the camera device mounting position.
> > 
> > Signed-off-by: Jacopo Mondi <jacopo@...ndi.org>
> > ---
> >  .../media/uapi/v4l/ext-ctrls-camera.rst       | 23 +++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> > 
> > diff --git a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst
> > index 51c1d5c9eb00..fc0a02eee6d4 100644
> > --- a/Documentation/media/uapi/v4l/ext-ctrls-camera.rst
> > +++ b/Documentation/media/uapi/v4l/ext-ctrls-camera.rst
> > @@ -510,6 +510,29 @@ enum v4l2_scene_mode -
> >      value down. A value of zero stops the motion if one is in progress
> >      and has no effect otherwise.
> > 
> > +``V4L2_CID_LOCATION (integer)``
> > +    This read-only control describes the camera location by reporting its
> > +    mounting position on the device where the camera is installed. This
> > +    control is particularly meaningful for devices which have a well defined
> > +    orientation, such as phones, laptops and portable devices as the camera
> > +    location is expressed as a position relative to the device intended
> > +    usage position. In example, a camera installed on the user-facing side
> > +    of a phone device is said to be installed in the ``V4L2_LOCATION_FRONT``
> > +    position.
> 
> When should this control be created? If there is only one location (e.g.
> all sensors are front-facing) would you still expose this? Or does it depend
> on the type of device?

Those are important questions that need to be answered :-) Going forward
I think all camera sensors should expose this, and I'd like a helper
function to create the control and set its value based on firmware
properties that all (or most) camera sensor drivers should use. That
helper function should also create the other mandatory or optional
standard controls for camera sensors, such as the pixel rate or link
frequency controls.

> And is the sensor in a digital camera front or back facing? (Just curious
> about what you think about that situation!)

I think we should include here a list of supported device types, and for
each device type, define what the front location is. All other locations
are then derived from that. For a digital camera I would define the
front side as facing the scene being photographed.

> > +
> > +
> > +
> > +.. flat-table::
> > +    :header-rows:  0
> > +    :stub-columns: 0
> > +
> > +    * - ``V4L2_LOCATION_FRONT``
> > +      - The camera device is located on the front side of the device.
> > +    * - ``V4L2_LOCATION_BACK``
> > +      - The camera device is located on the back side of the device.
> > +
> > +
> > +
> >  .. [#f1]
> >     This control may be changed to a menu control in the future, if more
> >     options are required.

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ