Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _USB_VIDEO_H_
00026 #define _USB_VIDEO_H_
00027
00028 #include <linux/kernel.h>
00029 #include <linux/videodev2.h>
00030
00031
00032 #include "uvc_compat.h"
00033
00034
00035
00036
00037
00038 #ifndef V4L2_CID_BACKLIGHT_COMPENSATION
00039 #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_PRIVATE_BASE+0)
00040 #endif
00041
00042 #ifndef V4L2_CID_POWER_LINE_FREQUENCY
00043 #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_PRIVATE_BASE+1)
00044 #endif
00045
00046 #ifndef V4L2_CID_SHARPNESS
00047 #define V4L2_CID_SHARPNESS (V4L2_CID_PRIVATE_BASE+2)
00048 #endif
00049
00050 #ifndef V4L2_CID_HUE_AUTO
00051 #define V4L2_CID_HUE_AUTO (V4L2_CID_PRIVATE_BASE+3)
00052 #endif
00053
00054 #ifndef V4L2_CID_FOCUS_AUTO
00055 #define V4L2_CID_FOCUS_AUTO (V4L2_CID_PRIVATE_BASE+4)
00056 #endif
00057
00058 #ifndef V4L2_CID_FOCUS_ABSOLUTE
00059 #define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_PRIVATE_BASE+5)
00060 #endif
00061
00062 #ifndef V4L2_CID_FOCUS_RELATIVE
00063 #define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_PRIVATE_BASE+6)
00064 #endif
00065
00066 #ifndef V4L2_CID_PAN_RELATIVE
00067 #define V4L2_CID_PAN_RELATIVE (V4L2_CID_PRIVATE_BASE+7)
00068 #endif
00069
00070 #ifndef V4L2_CID_TILT_RELATIVE
00071 #define V4L2_CID_TILT_RELATIVE (V4L2_CID_PRIVATE_BASE+8)
00072 #endif
00073
00074 #ifndef V4L2_CID_PANTILT_RESET
00075 #define V4L2_CID_PANTILT_RESET (V4L2_CID_PRIVATE_BASE+9)
00076 #endif
00077
00078 #ifndef V4L2_CID_EXPOSURE_AUTO
00079 #define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_PRIVATE_BASE+10)
00080 #endif
00081
00082 #ifndef V4L2_CID_EXPOSURE_ABSOLUTE
00083 #define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_PRIVATE_BASE+11)
00084 #endif
00085
00086 #ifndef V4L2_CID_EXPOSURE_AUTO_PRIORITY
00087 #define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_PRIVATE_BASE+14)
00088 #endif
00089
00090 #ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE_AUTO
00091 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE_AUTO (V4L2_CID_PRIVATE_BASE+12)
00092 #endif
00093
00094 #ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE
00095 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_PRIVATE_BASE+13)
00096 #endif
00097
00098 #ifndef V4L2_CID_PRIVATE_LAST
00099 #define V4L2_CID_PRIVATE_LAST V4L2_CID_EXPOSURE_AUTO_PRIORITY
00100 #endif
00101
00102
00103
00104
00105 enum uvc_control_data_type {
00106 UVC_CTRL_DATA_TYPE_RAW = 0,
00107 UVC_CTRL_DATA_TYPE_SIGNED,
00108 UVC_CTRL_DATA_TYPE_UNSIGNED,
00109 UVC_CTRL_DATA_TYPE_BOOLEAN,
00110 UVC_CTRL_DATA_TYPE_ENUM,
00111 UVC_CTRL_DATA_TYPE_BITMASK,
00112 };
00113
00114 #define UVC_CONTROL_SET_CUR (1 << 0)
00115 #define UVC_CONTROL_GET_CUR (1 << 1)
00116 #define UVC_CONTROL_GET_MIN (1 << 2)
00117 #define UVC_CONTROL_GET_MAX (1 << 3)
00118 #define UVC_CONTROL_GET_RES (1 << 4)
00119 #define UVC_CONTROL_GET_DEF (1 << 5)
00120
00121 #define UVC_CONTROL_RESTORE (1 << 6)
00122
00123 #define UVC_CONTROL_GET_RANGE (UVC_CONTROL_GET_CUR | UVC_CONTROL_GET_MIN | \
00124 UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | \
00125 UVC_CONTROL_GET_DEF)
00126
00127 struct uvc_xu_control_info {
00128 __u8 entity[16];
00129 __u8 index;
00130 __u8 selector;
00131 __u16 size;
00132 __u32 flags;
00133 };
00134
00135 struct uvc_xu_control_mapping {
00136 __u32 id;
00137 __u8 name[32];
00138 __u8 entity[16];
00139 __u8 selector;
00140
00141 __u8 size;
00142 __u8 offset;
00143 enum v4l2_ctrl_type v4l2_type;
00144 enum uvc_control_data_type data_type;
00145 };
00146
00147 struct uvc_xu_control {
00148 __u8 unit;
00149 __u8 selector;
00150 __u16 size;
00151 __u8 __user *data;
00152 };
00153
00154 #define UVCIOC_CTRL_ADD _IOW ('U', 1, struct uvc_xu_control_info)
00155 #define UVCIOC_CTRL_MAP _IOWR ('U', 2, struct uvc_xu_control_mapping)
00156 #define UVCIOC_CTRL_GET _IOWR ('U', 3, struct uvc_xu_control)
00157 #define UVCIOC_CTRL_SET _IOW ('U', 4, struct uvc_xu_control)
00158
00159
00160
00161 #endif
00162