V4L/DVB: uvcvideo: Add support for absolute pan/tilt controls
authorMartin Rubli <martin_rubli@logitech.com>
Wed, 19 May 2010 22:51:56 +0000 (19:51 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 18:33:08 +0000 (15:33 -0300)
Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c

index 27a79f087b15c565004f44f14631be68ff78b890..fcfcfbce0a2d199bdfb846298086f0ed931948df 100644 (file)
@@ -605,6 +605,26 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = {
                .get            = uvc_ctrl_get_zoom,
                .set            = uvc_ctrl_set_zoom,
        },
+       {
+               .id             = V4L2_CID_PAN_ABSOLUTE,
+               .name           = "Pan (Absolute)",
+               .entity         = UVC_GUID_UVC_CAMERA,
+               .selector       = UVC_CT_PANTILT_ABSOLUTE_CONTROL,
+               .size           = 32,
+               .offset         = 0,
+               .v4l2_type      = V4L2_CTRL_TYPE_INTEGER,
+               .data_type      = UVC_CTRL_DATA_TYPE_UNSIGNED,
+       },
+       {
+               .id             = V4L2_CID_TILT_ABSOLUTE,
+               .name           = "Tilt (Absolute)",
+               .entity         = UVC_GUID_UVC_CAMERA,
+               .selector       = UVC_CT_PANTILT_ABSOLUTE_CONTROL,
+               .size           = 32,
+               .offset         = 32,
+               .v4l2_type      = V4L2_CTRL_TYPE_INTEGER,
+               .data_type      = UVC_CTRL_DATA_TYPE_UNSIGNED,
+       },
        {
                .id             = V4L2_CID_PRIVACY,
                .name           = "Privacy",