linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] How to get current position/status of iris/focus/pan/tilt/zoom?
@ 2015-07-02 12:00 Hans Verkuil
  2015-07-08  7:55 ` Hans Verkuil
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hans Verkuil @ 2015-07-02 12:00 UTC (permalink / raw)
  To: linux-media, Laurent Pinchart, Sakari Ailus; +Cc: Bjornar Salberg

When using V4L2_CID_IRIS/FOCUS/PAN/TILT/ZOOM_ABSOLUTE/RELATIVE, how do you know
when the new position has been reached? If this is controlled through a motor,
then it may take some time and ideally you would like to be able to get the
current absolute position (if the hardware knows) and whether the final position
has been reached or not.

In addition, it should be possible to raise fault conditions.

The way the ABSOLUTE controls are defined is ambiguous since it doesn't say
anything about what it returns when you read it: is that the current absolute
position, or the last set absolute position? I suspect it is the second one.

If it is the second one, then I propose a V4L2_CID_IRIS_CURRENT control (and
ditto for the other variants) that is a read-only control returning the current
position with the same range and unit as the ABSOLUTE control.

For the status/fault information I think the V4L2_CID_AUTO_FOCUS_STATUS comes
close, but it is too specific for auto focus. For manually positioning things
this might be more suitable:

V4L2_CID_IRIS_STATUS	bitmask

	V4L2_IRIS_STATUS_MOVING (or perhaps _BUSY?)
	V4L2_IRIS_STATUS_FAILED

And ditto for the other variants.

Interaction between V4L2_CID_FOCUS_STATUS and AUTO_FOCUS_STATUS:

If auto focus is enabled, then FOCUS_STATUS is always 0, if auto focus is
disabled, then AUTO_FOCUS_STATUS is always IDLE.

Comments? Ideas?

Regards,

	Hans

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-07-22 21:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02 12:00 [RFC] How to get current position/status of iris/focus/pan/tilt/zoom? Hans Verkuil
2015-07-08  7:55 ` Hans Verkuil
2015-07-08 11:25 ` Laurent Pinchart
2015-07-14  7:51   ` Hans Verkuil
2015-07-22  8:21 ` Sakari Ailus
2015-07-22  8:51   ` Hans Verkuil
2015-07-22 21:27     ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).