V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16
[safe/jmp/linux-2.6] / drivers / media / video / uvc / uvcvideo.h
index a860c6b..d1f8840 100644 (file)
@@ -67,161 +67,26 @@ struct uvc_xu_control {
 #ifdef __KERNEL__
 
 #include <linux/poll.h>
+#include <linux/usb/video.h>
 
 /* --------------------------------------------------------------------------
  * UVC constants
  */
 
-#define UVC_SC_UNDEFINED                               0x00
-#define UVC_SC_VIDEOCONTROL                            0x01
-#define UVC_SC_VIDEOSTREAMING                          0x02
-#define UVC_SC_VIDEO_INTERFACE_COLLECTION              0x03
-
-#define UVC_PC_PROTOCOL_UNDEFINED                      0x00
-
-/* VideoControl class specific interface descriptor */
-#define UVC_VC_DESCRIPTOR_UNDEFINED                    0x00
-#define UVC_VC_HEADER                                  0x01
-#define UVC_VC_INPUT_TERMINAL                          0x02
-#define UVC_VC_OUTPUT_TERMINAL                         0x03
-#define UVC_VC_SELECTOR_UNIT                           0x04
-#define UVC_VC_PROCESSING_UNIT                         0x05
-#define UVC_VC_EXTENSION_UNIT                          0x06
-
-/* VideoStreaming class specific interface descriptor */
-#define UVC_VS_UNDEFINED                               0x00
-#define UVC_VS_INPUT_HEADER                            0x01
-#define UVC_VS_OUTPUT_HEADER                           0x02
-#define UVC_VS_STILL_IMAGE_FRAME                       0x03
-#define UVC_VS_FORMAT_UNCOMPRESSED                     0x04
-#define UVC_VS_FRAME_UNCOMPRESSED                      0x05
-#define UVC_VS_FORMAT_MJPEG                            0x06
-#define UVC_VS_FRAME_MJPEG                             0x07
-#define UVC_VS_FORMAT_MPEG2TS                          0x0a
-#define UVC_VS_FORMAT_DV                               0x0c
-#define UVC_VS_COLORFORMAT                             0x0d
-#define UVC_VS_FORMAT_FRAME_BASED                      0x10
-#define UVC_VS_FRAME_FRAME_BASED                       0x11
-#define UVC_VS_FORMAT_STREAM_BASED                     0x12
-
-/* Endpoint type */
-#define UVC_EP_UNDEFINED                               0x00
-#define UVC_EP_GENERAL                                 0x01
-#define UVC_EP_ENDPOINT                                        0x02
-#define UVC_EP_INTERRUPT                               0x03
-
-/* Request codes */
-#define UVC_RC_UNDEFINED                               0x00
-#define UVC_SET_CUR                                    0x01
-#define UVC_GET_CUR                                    0x81
-#define UVC_GET_MIN                                    0x82
-#define UVC_GET_MAX                                    0x83
-#define UVC_GET_RES                                    0x84
-#define UVC_GET_LEN                                    0x85
-#define UVC_GET_INFO                                   0x86
-#define UVC_GET_DEF                                    0x87
-
-/* VideoControl interface controls */
-#define UVC_VC_CONTROL_UNDEFINED                       0x00
-#define UVC_VC_VIDEO_POWER_MODE_CONTROL                        0x01
-#define UVC_VC_REQUEST_ERROR_CODE_CONTROL              0x02
-
-/* Terminal controls */
-#define UVC_TE_CONTROL_UNDEFINED                       0x00
-
-/* Selector Unit controls */
-#define UVC_SU_CONTROL_UNDEFINED                       0x00
-#define UVC_SU_INPUT_SELECT_CONTROL                    0x01
-
-/* Camera Terminal controls */
-#define UVC_CT_CONTROL_UNDEFINED                       0x00
-#define UVC_CT_SCANNING_MODE_CONTROL                   0x01
-#define UVC_CT_AE_MODE_CONTROL                         0x02
-#define UVC_CT_AE_PRIORITY_CONTROL                     0x03
-#define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL          0x04
-#define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL          0x05
-#define UVC_CT_FOCUS_ABSOLUTE_CONTROL                  0x06
-#define UVC_CT_FOCUS_RELATIVE_CONTROL                  0x07
-#define UVC_CT_FOCUS_AUTO_CONTROL                      0x08
-#define UVC_CT_IRIS_ABSOLUTE_CONTROL                   0x09
-#define UVC_CT_IRIS_RELATIVE_CONTROL                   0x0a
-#define UVC_CT_ZOOM_ABSOLUTE_CONTROL                   0x0b
-#define UVC_CT_ZOOM_RELATIVE_CONTROL                   0x0c
-#define UVC_CT_PANTILT_ABSOLUTE_CONTROL                        0x0d
-#define UVC_CT_PANTILT_RELATIVE_CONTROL                        0x0e
-#define UVC_CT_ROLL_ABSOLUTE_CONTROL                   0x0f
-#define UVC_CT_ROLL_RELATIVE_CONTROL                   0x10
-#define UVC_CT_PRIVACY_CONTROL                         0x11
-
-/* Processing Unit controls */
-#define UVC_PU_CONTROL_UNDEFINED                       0x00
-#define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL          0x01
-#define UVC_PU_BRIGHTNESS_CONTROL                      0x02
-#define UVC_PU_CONTRAST_CONTROL                                0x03
-#define UVC_PU_GAIN_CONTROL                            0x04
-#define UVC_PU_POWER_LINE_FREQUENCY_CONTROL            0x05
-#define UVC_PU_HUE_CONTROL                             0x06
-#define UVC_PU_SATURATION_CONTROL                      0x07
-#define UVC_PU_SHARPNESS_CONTROL                       0x08
-#define UVC_PU_GAMMA_CONTROL                           0x09
-#define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL       0x0a
-#define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL  0x0b
-#define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL         0x0c
-#define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL    0x0d
-#define UVC_PU_DIGITAL_MULTIPLIER_CONTROL              0x0e
-#define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL                0x0f
-#define UVC_PU_HUE_AUTO_CONTROL                                0x10
-#define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL           0x11
-#define UVC_PU_ANALOG_LOCK_STATUS_CONTROL              0x12
-
-#define UVC_LXU_MOTOR_PANTILT_RELATIVE_CONTROL         0x01
-#define UVC_LXU_MOTOR_PANTILT_RESET_CONTROL            0x02
-#define UVC_LXU_MOTOR_FOCUS_MOTOR_CONTROL              0x03
-
-/* VideoStreaming interface controls */
-#define UVC_VS_CONTROL_UNDEFINED                       0x00
-#define UVC_VS_PROBE_CONTROL                           0x01
-#define UVC_VS_COMMIT_CONTROL                          0x02
-#define UVC_VS_STILL_PROBE_CONTROL                     0x03
-#define UVC_VS_STILL_COMMIT_CONTROL                    0x04
-#define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL             0x05
-#define UVC_VS_STREAM_ERROR_CODE_CONTROL               0x06
-#define UVC_VS_GENERATE_KEY_FRAME_CONTROL              0x07
-#define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL            0x08
-#define UVC_VS_SYNC_DELAY_CONTROL                      0x09
-
-#define UVC_TT_VENDOR_SPECIFIC                         0x0100
-#define UVC_TT_STREAMING                               0x0101
-
-/* Input Terminal types */
-#define UVC_ITT_VENDOR_SPECIFIC                                0x0200
-#define UVC_ITT_CAMERA                                 0x0201
-#define UVC_ITT_MEDIA_TRANSPORT_INPUT                  0x0202
-
-/* Output Terminal types */
-#define UVC_OTT_VENDOR_SPECIFIC                                0x0300
-#define UVC_OTT_DISPLAY                                        0x0301
-#define UVC_OTT_MEDIA_TRANSPORT_OUTPUT                 0x0302
-
-/* External Terminal types */
-#define UVC_EXTERNAL_VENDOR_SPECIFIC                   0x0400
-#define UVC_COMPOSITE_CONNECTOR                                0x0401
-#define UVC_SVIDEO_CONNECTOR                           0x0402
-#define UVC_COMPONENT_CONNECTOR                                0x0403
-
 #define UVC_TERM_INPUT                 0x0000
 #define UVC_TERM_OUTPUT                        0x8000
+#define UVC_TERM_DIRECTION(term)       ((term)->type & 0x8000)
 
 #define UVC_ENTITY_TYPE(entity)                ((entity)->type & 0x7fff)
 #define UVC_ENTITY_IS_UNIT(entity)     (((entity)->type & 0xff00) == 0)
 #define UVC_ENTITY_IS_TERM(entity)     (((entity)->type & 0xff00) != 0)
 #define UVC_ENTITY_IS_ITERM(entity) \
-       (((entity)->type & 0x8000) == UVC_TERM_INPUT)
+       (UVC_ENTITY_IS_TERM(entity) && \
+       ((entity)->type & 0x8000) == UVC_TERM_INPUT)
 #define UVC_ENTITY_IS_OTERM(entity) \
-       (((entity)->type & 0x8000) == UVC_TERM_OUTPUT)
+       (UVC_ENTITY_IS_TERM(entity) && \
+       ((entity)->type & 0x8000) == UVC_TERM_OUTPUT)
 
-#define UVC_STATUS_TYPE_CONTROL                1
-#define UVC_STATUS_TYPE_STREAMING      2
 
 /* ------------------------------------------------------------------------
  * GUIDs
@@ -242,25 +107,15 @@ struct uvc_xu_control {
        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02}
 
-#define UVC_GUID_LOGITECH_DEV_INFO \
-       {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
-        0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x1e}
-#define UVC_GUID_LOGITECH_USER_HW \
-       {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
-        0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x1f}
-#define UVC_GUID_LOGITECH_VIDEO \
-       {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
-        0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x50}
-#define UVC_GUID_LOGITECH_MOTOR \
-       {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
-        0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x56}
-
 #define UVC_GUID_FORMAT_MJPEG \
        { 'M',  'J',  'P',  'G', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 #define UVC_GUID_FORMAT_YUY2 \
        { 'Y',  'U',  'Y',  '2', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_YUY2_ISIGHT \
+       { 'Y',  'U',  'Y',  '2', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0x00, 0x00, 0x38, 0x9b, 0x71}
 #define UVC_GUID_FORMAT_NV12 \
        { 'N',  'V',  '1',  '2', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
@@ -276,11 +131,13 @@ struct uvc_xu_control {
 #define UVC_GUID_FORMAT_Y800 \
        { 'Y',  '8',  '0',  '0', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_Y16 \
+       { 'Y',  '1',  '6',  ' ', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 #define UVC_GUID_FORMAT_BY8 \
        { 'B',  'Y',  '8',  ' ', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 
-
 /* ------------------------------------------------------------------------
  * Driver specific constants.
  */
@@ -297,7 +154,7 @@ struct uvc_xu_control {
 #define UVC_MAX_STATUS_SIZE    16
 
 #define UVC_CTRL_CONTROL_TIMEOUT       300
-#define UVC_CTRL_STREAMING_TIMEOUT     1000
+#define UVC_CTRL_STREAMING_TIMEOUT     5000
 
 /* Devices quirks */
 #define UVC_QUIRK_STATUS_INTERVAL      0x00000001
@@ -307,6 +164,7 @@ struct uvc_xu_control {
 #define UVC_QUIRK_STREAM_NO_FID                0x00000010
 #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020
 #define UVC_QUIRK_FIX_BANDWIDTH                0x00000080
+#define UVC_QUIRK_PROBE_DEF            0x00000100
 
 /* Format flags */
 #define UVC_FMT_FLAG_COMPRESSED                0x00000001
@@ -389,7 +247,8 @@ struct uvc_control {
                           uvc_control_info. */
        __u8 dirty : 1,
             loaded : 1,
-            modified : 1;
+            modified : 1,
+            cached : 1;
 
        __u8 *data;
 };
@@ -440,11 +299,9 @@ struct uvc_entity {
                } media;
 
                struct {
-                       __u8  bSourceID;
                } output;
 
                struct {
-                       __u8  bSourceID;
                        __u16 wMaxMultiplier;
                        __u8  bControlSize;
                        __u8  *bmControls;
@@ -452,21 +309,20 @@ struct uvc_entity {
                } processing;
 
                struct {
-                       __u8  bNrInPins;
-                       __u8  *baSourceID;
                } selector;
 
                struct {
                        __u8  guidExtensionCode[16];
                        __u8  bNumControls;
-                       __u8  bNrInPins;
-                       __u8  *baSourceID;
                        __u8  bControlSize;
                        __u8  *bmControls;
                        __u8  *bmControlsType;
                } extension;
        };
 
+       __u8 bNrInPins;
+       __u8 *baSourceID;
+
        unsigned int ncontrols;
        struct uvc_control *controls;
 };
@@ -511,32 +367,13 @@ struct uvc_streaming_header {
        __u8 bTriggerUsage;
 };
 
-struct uvc_streaming {
-       struct list_head list;
-
-       struct usb_interface *intf;
-       int intfnum;
-       __u16 maxpsize;
-
-       struct uvc_streaming_header header;
-       enum v4l2_buf_type type;
-
-       unsigned int nformats;
-       struct uvc_format *format;
-
-       struct uvc_streaming_control ctrl;
-       struct uvc_format *cur_format;
-       struct uvc_frame *cur_frame;
-
-       struct mutex mutex;
-};
-
 enum uvc_buffer_state {
        UVC_BUF_STATE_IDLE      = 0,
        UVC_BUF_STATE_QUEUED    = 1,
        UVC_BUF_STATE_ACTIVE    = 2,
-       UVC_BUF_STATE_DONE      = 3,
-       UVC_BUF_STATE_ERROR     = 4,
+       UVC_BUF_STATE_READY     = 3,
+       UVC_BUF_STATE_DONE      = 4,
+       UVC_BUF_STATE_ERROR     = 5,
 };
 
 struct uvc_buffer {
@@ -572,26 +409,43 @@ struct uvc_video_queue {
        struct list_head irqqueue;
 };
 
-struct uvc_video_device {
+struct uvc_video_chain {
+       struct uvc_device *dev;
+       struct list_head list;
+
+       struct list_head entities;              /* All entities */
+       struct uvc_entity *processing;          /* Processing unit */
+       struct uvc_entity *selector;            /* Selector unit */
+
+       struct mutex ctrl_mutex;
+};
+
+struct uvc_streaming {
+       struct list_head list;
        struct uvc_device *dev;
        struct video_device *vdev;
+       struct uvc_video_chain *chain;
        atomic_t active;
-       unsigned int frozen : 1;
 
-       struct list_head iterms;                /* Input terminals */
-       struct uvc_entity *oterm;               /* Output terminal */
-       struct uvc_entity *sterm;               /* USB streaming terminal */
-       struct uvc_entity *processing;
-       struct uvc_entity *selector;
-       struct list_head extensions;
-       struct mutex ctrl_mutex;
+       struct usb_interface *intf;
+       int intfnum;
+       __u16 maxpsize;
 
-       struct uvc_video_queue queue;
+       struct uvc_streaming_header header;
+       enum v4l2_buf_type type;
 
-       /* Video streaming object, must always be non-NULL. */
-       struct uvc_streaming *streaming;
+       unsigned int nformats;
+       struct uvc_format *format;
+
+       struct uvc_streaming_control ctrl;
+       struct uvc_format *cur_format;
+       struct uvc_frame *cur_frame;
+
+       struct mutex mutex;
 
-       void (*decode) (struct urb *urb, struct uvc_video_device *video,
+       unsigned int frozen : 1;
+       struct uvc_video_queue queue;
+       void (*decode) (struct urb *urb, struct uvc_streaming *video,
                        struct uvc_buffer *buf);
 
        /* Context data used by the bulk completion handler. */
@@ -624,7 +478,6 @@ struct uvc_device {
        char name[32];
 
        enum uvc_device_state state;
-       struct kref kref;
        struct list_head list;
        atomic_t users;
 
@@ -633,8 +486,11 @@ struct uvc_device {
        __u32 clock_frequency;
 
        struct list_head entities;
+       struct list_head chains;
 
-       struct uvc_video_device video;
+       /* Video Streaming interfaces */
+       struct list_head streams;
+       atomic_t nstreams;
 
        /* Status Interrupt Endpoint */
        struct usb_host_endpoint *int_ep;
@@ -642,9 +498,6 @@ struct uvc_device {
        __u8 *status;
        struct input_dev *input;
        char input_phys[64];
-
-       /* Video Streaming interfaces */
-       struct list_head streaming;
 };
 
 enum uvc_handle_state {
@@ -653,15 +506,14 @@ enum uvc_handle_state {
 };
 
 struct uvc_fh {
-       struct uvc_video_device *device;
+       struct uvc_video_chain *chain;
+       struct uvc_streaming *stream;
        enum uvc_handle_state state;
 };
 
 struct uvc_driver {
        struct usb_driver driver;
 
-       struct mutex open_mutex;        /* protects from open/disconnect race */
-
        struct list_head devices;       /* struct uvc_device list */
        struct list_head controls;      /* struct uvc_control_info list */
        struct mutex ctrl_mutex;        /* protects controls and devices
@@ -682,12 +534,15 @@ struct uvc_driver {
 #define UVC_TRACE_FRAME                (1 << 7)
 #define UVC_TRACE_SUSPEND      (1 << 8)
 #define UVC_TRACE_STATUS       (1 << 9)
+#define UVC_TRACE_VIDEO                (1 << 10)
 
 #define UVC_WARN_MINMAX                0
 #define UVC_WARN_PROBE_DEF     1
 
+extern unsigned int uvc_clock_param;
 extern unsigned int uvc_no_drop_param;
 extern unsigned int uvc_trace_param;
+extern unsigned int uvc_timeout_param;
 
 #define uvc_trace(flag, msg...) \
        do { \
@@ -704,23 +559,12 @@ extern unsigned int uvc_trace_param;
 #define uvc_printk(level, msg...) \
        printk(level "uvcvideo: " msg)
 
-#define UVC_GUID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" \
-                       "%02x%02x%02x%02x%02x%02x"
-#define UVC_GUID_ARGS(guid) \
-       (guid)[3],  (guid)[2],  (guid)[1],  (guid)[0], \
-       (guid)[5],  (guid)[4], \
-       (guid)[7],  (guid)[6], \
-       (guid)[8],  (guid)[9], \
-       (guid)[10], (guid)[11], (guid)[12], \
-       (guid)[13], (guid)[14], (guid)[15]
-
 /* --------------------------------------------------------------------------
  * Internal functions.
  */
 
 /* Core driver */
 extern struct uvc_driver uvc_driver;
-extern void uvc_delete(struct kref *kref);
 
 /* Video buffers queue management. */
 extern void uvc_queue_init(struct uvc_video_queue *queue,
@@ -750,13 +594,13 @@ static inline int uvc_queue_streaming(struct uvc_video_queue *queue)
 extern const struct v4l2_file_operations uvc_fops;
 
 /* Video */
-extern int uvc_video_init(struct uvc_video_device *video);
-extern int uvc_video_suspend(struct uvc_video_device *video);
-extern int uvc_video_resume(struct uvc_video_device *video);
-extern int uvc_video_enable(struct uvc_video_device *video, int enable);
-extern int uvc_probe_video(struct uvc_video_device *video,
+extern int uvc_video_init(struct uvc_streaming *stream);
+extern int uvc_video_suspend(struct uvc_streaming *stream);
+extern int uvc_video_resume(struct uvc_streaming *stream);
+extern int uvc_video_enable(struct uvc_streaming *stream, int enable);
+extern int uvc_probe_video(struct uvc_streaming *stream,
                struct uvc_streaming_control *probe);
-extern int uvc_commit_video(struct uvc_video_device *video,
+extern int uvc_commit_video(struct uvc_streaming *stream,
                struct uvc_streaming_control *ctrl);
 extern int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
                __u8 intfnum, __u8 cs, void *data, __u16 size);
@@ -770,9 +614,9 @@ extern int uvc_status_suspend(struct uvc_device *dev);
 extern int uvc_status_resume(struct uvc_device *dev);
 
 /* Controls */
-extern struct uvc_control *uvc_find_control(struct uvc_video_device *video,
+extern struct uvc_control *uvc_find_control(struct uvc_video_chain *chain,
                __u32 v4l2_id, struct uvc_control_mapping **mapping);
-extern int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
+extern int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
                struct v4l2_queryctrl *v4l2_ctrl);
 
 extern int uvc_ctrl_add_info(struct uvc_control_info *info);
@@ -782,23 +626,23 @@ extern void uvc_ctrl_cleanup_device(struct uvc_device *dev);
 extern int uvc_ctrl_resume_device(struct uvc_device *dev);
 extern void uvc_ctrl_init(void);
 
-extern int uvc_ctrl_begin(struct uvc_video_device *video);
-extern int __uvc_ctrl_commit(struct uvc_video_device *video, int rollback);
-static inline int uvc_ctrl_commit(struct uvc_video_device *video)
+extern int uvc_ctrl_begin(struct uvc_video_chain *chain);
+extern int __uvc_ctrl_commit(struct uvc_video_chain *chain, int rollback);
+static inline int uvc_ctrl_commit(struct uvc_video_chain *chain)
 {
-       return __uvc_ctrl_commit(video, 0);
+       return __uvc_ctrl_commit(chain, 0);
 }
-static inline int uvc_ctrl_rollback(struct uvc_video_device *video)
+static inline int uvc_ctrl_rollback(struct uvc_video_chain *chain)
 {
-       return __uvc_ctrl_commit(video, 1);
+       return __uvc_ctrl_commit(chain, 1);
 }
 
-extern int uvc_ctrl_get(struct uvc_video_device *video,
+extern int uvc_ctrl_get(struct uvc_video_chain *chain,
                struct v4l2_ext_control *xctrl);
-extern int uvc_ctrl_set(struct uvc_video_device *video,
+extern int uvc_ctrl_set(struct uvc_video_chain *chain,
                struct v4l2_ext_control *xctrl);
 
-extern int uvc_xu_ctrl_query(struct uvc_video_device *video,
+extern int uvc_xu_ctrl_query(struct uvc_video_chain *chain,
                struct uvc_xu_control *ctrl, int set);
 
 /* Utility functions */
@@ -810,7 +654,7 @@ extern struct usb_host_endpoint *uvc_find_endpoint(
                struct usb_host_interface *alts, __u8 epaddr);
 
 /* Quirks support */
-void uvc_video_decode_isight(struct urb *urb, struct uvc_video_device *video,
+void uvc_video_decode_isight(struct urb *urb, struct uvc_streaming *stream,
                struct uvc_buffer *buf);
 
 #endif /* __KERNEL__ */