[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170607123116.GB1019@valkosipuli.retiisi.org.uk>
Date: Wed, 7 Jun 2017 15:31:16 +0300
From: Sakari Ailus <sakari.ailus@....fi>
To: Steve Longerbeam <slongerbeam@...il.com>
Cc: Pavel Machek <pavel@....cz>, robh+dt@...nel.org,
mark.rutland@....com, shawnguo@...nel.org, kernel@...gutronix.de,
fabio.estevam@....com, linux@...linux.org.uk, mchehab@...nel.org,
hverkuil@...all.nl, nick@...anahar.org, markus.heiser@...marIT.de,
p.zabel@...gutronix.de, laurent.pinchart+renesas@...asonboard.com,
bparrot@...com, geert@...ux-m68k.org, arnd@...db.de,
sudipm.mukherjee@...il.com, minghsiu.tsai@...iatek.com,
tiffany.lin@...iatek.com, jean-christophe.trotin@...com,
horms+renesas@...ge.net.au, niklas.soderlund+renesas@...natech.se,
robert.jarzmik@...e.fr, songjun.wu@...rochip.com,
andrew-ct.chen@...iatek.com, gregkh@...uxfoundation.org,
shuah@...nel.org, sakari.ailus@...ux.intel.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org,
devel@...verdev.osuosl.org,
Steve Longerbeam <steve_longerbeam@...tor.com>
Subject: Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver
On Sat, Jun 03, 2017 at 09:46:36PM -0700, Steve Longerbeam wrote:
>
>
> On 06/03/2017 02:57 PM, Sakari Ailus wrote:
> >On Sat, Jun 03, 2017 at 09:51:39PM +0200, Pavel Machek wrote:
> >>Hi!
> >>
> >>>>>>+ /* Auto/manual exposure */
> >>>>>>+ ctrls->auto_exp = v4l2_ctrl_new_std_menu(hdl, ops,
> >>>>>>+ V4L2_CID_EXPOSURE_AUTO,
> >>>>>>+ V4L2_EXPOSURE_MANUAL, 0,
> >>>>>>+ V4L2_EXPOSURE_AUTO);
> >>>>>>+ ctrls->exposure = v4l2_ctrl_new_std(hdl, ops,
> >>>>>>+ V4L2_CID_EXPOSURE_ABSOLUTE,
> >>>>>>+ 0, 65535, 1, 0);
> >>>>>
> >>>>>Is exposure_absolute supposed to be in microseconds...?
> >>>>
> >>>>Yes.
> >>>
> >>>According to the docs V4L2_CID_EXPOSURE_ABSOLUTE is in 100 usec units.
> >>>
> >>> OTOH V4L2_CID_EXPOSURE has no defined unit, so it's a better fit IMO.
> >>>>Way more drivers appear to be using EXPOSURE than EXPOSURE_ABSOLUTE, too.
> >>>
> >>>Done, switched to V4L2_CID_EXPOSURE. It's true, this control is not
> >>>taking 100 usec units, so unit-less is better.
> >>
> >>Thanks. If you know the units, it would be of course better to use
> >>right units...
> >
> >Steve: what's the unit in this case? Is it lines or something else?
>
> Yes, the register interface for exposure takes lines*16.
>
> Maybe converting from seconds to lines is as simple as
> framerate * height * seconds. But I'm not sure about that.
The smiapp and a few other drivers are using lines. One option could be to
use lines as the unit and have step as 16.
Then the hblank + vblank controls will be needed, too, to enable the user to
at least figure out the conversion to Si units.
--
Sakari Ailus
e-mail: sakari.ailus@....fi XMPP: sailus@...iisi.org.uk
Powered by blists - more mailing lists