All of lore.kernel.org
 help / color / mirror / Atom feed
* gspca V4L2_CID_EXPOSURE_AUTO and VIDIOC_G/S/TRY_EXT_CTRLS
@ 2012-04-18 13:37 Antonio Ospite
  2012-04-20 15:19 ` [RFC PATCH 0/3] gspca: Implement VIDIOC_G_EXT_CTRLS and VIDIOC_S_EXT_CTRLS Antonio Ospite
  2012-04-27  7:53 ` gspca V4L2_CID_EXPOSURE_AUTO and VIDIOC_G/S/TRY_EXT_CTRLS Jean-Francois Moine
  0 siblings, 2 replies; 12+ messages in thread
From: Antonio Ospite @ 2012-04-18 13:37 UTC (permalink / raw)
  To: linux-media; +Cc: Jean-Francois Moine, Erik Andrén

[-- Attachment #1: Type: text/plain, Size: 1645 bytes --]

Hi,

I noticed that AEC (Automatic Exposure Control, or
V4L2_CID_EXPOSURE_AUTO) does not work in the ov534 gspca driver, either
from guvcview or qv4l2.

From what I can see (but I do not have a deep knowledge of v4l2) this
happens because:
  - V4L2_CID_EXPOSURE_AUTO is of class V4L2_CTRL_CLASS_CAMERA which is
    greater than V4L2_CTRL_CLASS_USER
  - some programs use VIDIOC_G_EXT_CTRLS with this class of controls;
    for instance v4l2-ctrl does more or less this:

	if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_USER)
		test_ioctl(fd, VIDIOC_G_EXT_CTRLS, &ctrls)
	else
		test_ioctl(fd, VIDIOC_G_CTRL, &ctrl)

  - gspca does not handle the _EXT_CTRLS ioclts

So in ov534, but I think in m5602 too, V4L2_CID_EXPOSURE_AUTO does not
work from guvcview, qv4l2, or v4l2-ctrl, for instance the latter fails
with the message:

	error 25 getting ext_ctrl Auto Exposure

I tried adding an hackish implementation of vidioc_g_ext_ctrls and
vidioc_s_ext_ctrls to gspca, and with these V4L2_CID_EXPOSURE_AUTO seems
to work, but I need to learn more about this kind of controls before
I can propose a decent implementation for mainline inclusion myself, so
if anyone wants to anticipate me I'd be glad to test :)

Unrelated, but maybe worth mentioning is that V4L2_CID_EXPOSURE_AUTO is
of type MENU, while some drivers are treating it as a boolean, I think
I can fix this one if needed.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2012-04-27 12:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 13:37 gspca V4L2_CID_EXPOSURE_AUTO and VIDIOC_G/S/TRY_EXT_CTRLS Antonio Ospite
2012-04-20 15:19 ` [RFC PATCH 0/3] gspca: Implement VIDIOC_G_EXT_CTRLS and VIDIOC_S_EXT_CTRLS Antonio Ospite
2012-04-20 15:19   ` [RFC PATCH 1/3] [media] gspca - main: rename get_ctrl to get_ctrl_index Antonio Ospite
2012-04-20 15:19   ` [RFC PATCH 2/3] [media] gspca - main: factor out the logic to set and get controls Antonio Ospite
2012-04-20 15:19   ` [RFC PATCH 3/3] [media] gspca - main: implement vidioc_g_ext_ctrls and vidioc_s_ext_ctrls Antonio Ospite
2012-04-27  8:20     ` Hans Verkuil
2012-04-27  9:24       ` Jean-Francois Moine
2012-04-27  9:34         ` Hans Verkuil
2012-04-27 10:51         ` Hans de Goede
2012-04-27  7:53 ` gspca V4L2_CID_EXPOSURE_AUTO and VIDIOC_G/S/TRY_EXT_CTRLS Jean-Francois Moine
2012-04-27 12:04   ` Antonio Ospite
2012-04-27 12:14     ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.