diff options
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
| -rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index d1f88406a5e..ac272456fbf 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #define UVC_CONTROL_RESTORE (1 << 6) | 27 | #define UVC_CONTROL_RESTORE (1 << 6) |
| 28 | /* Control can be updated by the camera. */ | 28 | /* Control can be updated by the camera. */ |
| 29 | #define UVC_CONTROL_AUTO_UPDATE (1 << 7) | 29 | #define UVC_CONTROL_AUTO_UPDATE (1 << 7) |
| 30 | /* Control is an extension unit control. */ | ||
| 31 | #define UVC_CONTROL_EXTENSION (1 << 8) | ||
| 30 | 32 | ||
| 31 | #define UVC_CONTROL_GET_RANGE (UVC_CONTROL_GET_CUR | UVC_CONTROL_GET_MIN | \ | 33 | #define UVC_CONTROL_GET_RANGE (UVC_CONTROL_GET_CUR | UVC_CONTROL_GET_MIN | \ |
| 32 | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | \ | 34 | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | \ |
| @@ -40,6 +42,15 @@ struct uvc_xu_control_info { | |||
| 40 | __u32 flags; | 42 | __u32 flags; |
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 45 | struct uvc_menu_info { | ||
| 46 | __u32 value; | ||
| 47 | __u8 name[32]; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct uvc_xu_control_mapping_old { | ||
| 51 | __u8 reserved[64]; | ||
| 52 | }; | ||
| 53 | |||
| 43 | struct uvc_xu_control_mapping { | 54 | struct uvc_xu_control_mapping { |
| 44 | __u32 id; | 55 | __u32 id; |
| 45 | __u8 name[32]; | 56 | __u8 name[32]; |
| @@ -50,6 +61,11 @@ struct uvc_xu_control_mapping { | |||
| 50 | __u8 offset; | 61 | __u8 offset; |
| 51 | enum v4l2_ctrl_type v4l2_type; | 62 | enum v4l2_ctrl_type v4l2_type; |
| 52 | __u32 data_type; | 63 | __u32 data_type; |
| 64 | |||
| 65 | struct uvc_menu_info __user *menu_info; | ||
| 66 | __u32 menu_count; | ||
| 67 | |||
| 68 | __u32 reserved[4]; | ||
| 53 | }; | 69 | }; |
| 54 | 70 | ||
| 55 | struct uvc_xu_control { | 71 | struct uvc_xu_control { |
| @@ -60,6 +76,7 @@ struct uvc_xu_control { | |||
| 60 | }; | 76 | }; |
| 61 | 77 | ||
| 62 | #define UVCIOC_CTRL_ADD _IOW('U', 1, struct uvc_xu_control_info) | 78 | #define UVCIOC_CTRL_ADD _IOW('U', 1, struct uvc_xu_control_info) |
| 79 | #define UVCIOC_CTRL_MAP_OLD _IOWR('U', 2, struct uvc_xu_control_mapping_old) | ||
| 63 | #define UVCIOC_CTRL_MAP _IOWR('U', 2, struct uvc_xu_control_mapping) | 80 | #define UVCIOC_CTRL_MAP _IOWR('U', 2, struct uvc_xu_control_mapping) |
| 64 | #define UVCIOC_CTRL_GET _IOWR('U', 3, struct uvc_xu_control) | 81 | #define UVCIOC_CTRL_GET _IOWR('U', 3, struct uvc_xu_control) |
| 65 | #define UVCIOC_CTRL_SET _IOW('U', 4, struct uvc_xu_control) | 82 | #define UVCIOC_CTRL_SET _IOW('U', 4, struct uvc_xu_control) |
| @@ -179,30 +196,6 @@ struct uvc_device; | |||
| 179 | /* TODO: Put the most frequently accessed fields at the beginning of | 196 | /* TODO: Put the most frequently accessed fields at the beginning of |
| 180 | * structures to maximize cache efficiency. | 197 | * structures to maximize cache efficiency. |
| 181 | */ | 198 | */ |
| 182 | struct uvc_streaming_control { | ||
| 183 | __u16 bmHint; | ||
| 184 | __u8 bFormatIndex; | ||
| 185 | __u8 bFrameIndex; | ||
| 186 | __u32 dwFrameInterval; | ||
| 187 | __u16 wKeyFrameRate; | ||
| 188 | __u16 wPFrameRate; | ||
| 189 | __u16 wCompQuality; | ||
| 190 | __u16 wCompWindowSize; | ||
| 191 | __u16 wDelay; | ||
| 192 | __u32 dwMaxVideoFrameSize; | ||
| 193 | __u32 dwMaxPayloadTransferSize; | ||
| 194 | __u32 dwClockFrequency; | ||
| 195 | __u8 bmFramingInfo; | ||
| 196 | __u8 bPreferedVersion; | ||
| 197 | __u8 bMinVersion; | ||
| 198 | __u8 bMaxVersion; | ||
| 199 | }; | ||
| 200 | |||
| 201 | struct uvc_menu_info { | ||
| 202 | __u32 value; | ||
| 203 | __u8 name[32]; | ||
| 204 | }; | ||
| 205 | |||
| 206 | struct uvc_control_info { | 199 | struct uvc_control_info { |
| 207 | struct list_head list; | 200 | struct list_head list; |
| 208 | struct list_head mappings; | 201 | struct list_head mappings; |
| @@ -250,7 +243,8 @@ struct uvc_control { | |||
| 250 | modified : 1, | 243 | modified : 1, |
| 251 | cached : 1; | 244 | cached : 1; |
| 252 | 245 | ||
| 253 | __u8 *data; | 246 | __u8 *uvc_data; |
| 247 | __u8 *uvc_info; | ||
| 254 | }; | 248 | }; |
| 255 | 249 | ||
| 256 | struct uvc_format_desc { | 250 | struct uvc_format_desc { |
| @@ -625,6 +619,7 @@ extern int uvc_ctrl_init_device(struct uvc_device *dev); | |||
| 625 | extern void uvc_ctrl_cleanup_device(struct uvc_device *dev); | 619 | extern void uvc_ctrl_cleanup_device(struct uvc_device *dev); |
| 626 | extern int uvc_ctrl_resume_device(struct uvc_device *dev); | 620 | extern int uvc_ctrl_resume_device(struct uvc_device *dev); |
| 627 | extern void uvc_ctrl_init(void); | 621 | extern void uvc_ctrl_init(void); |
| 622 | extern void uvc_ctrl_cleanup(void); | ||
| 628 | 623 | ||
| 629 | extern int uvc_ctrl_begin(struct uvc_video_chain *chain); | 624 | extern int uvc_ctrl_begin(struct uvc_video_chain *chain); |
| 630 | extern int __uvc_ctrl_commit(struct uvc_video_chain *chain, int rollback); | 625 | extern int __uvc_ctrl_commit(struct uvc_video_chain *chain, int rollback); |
