diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-11-21 15:08:16 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:30:34 -0400 |
commit | 9eb30d2fa9a2018fbc7d12232d4646c52782d3a9 (patch) | |
tree | c7e218bc49b298115093919cf62c1f59a59f4de5 /drivers/media/video/uvc/uvc_ctrl.c | |
parent | 1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1 (diff) |
[media] uvcvideo: Rename UVC_CONTROL_* flags to UVC_CTRL_FLAG_*
This makes the public driver API more uniform, in preparation of moving
uvcvideo.h to include/linux. Keep the old names for backward
compatibility with existing applications.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_ctrl.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_ctrl.c | 252 |
1 files changed, 143 insertions, 109 deletions
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 47175ccd2f01..d6fe13de7ae4 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c | |||
@@ -42,281 +42,313 @@ static struct uvc_control_info uvc_ctrls[] = { | |||
42 | .selector = UVC_PU_BRIGHTNESS_CONTROL, | 42 | .selector = UVC_PU_BRIGHTNESS_CONTROL, |
43 | .index = 0, | 43 | .index = 0, |
44 | .size = 2, | 44 | .size = 2, |
45 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 45 | .flags = UVC_CTRL_FLAG_SET_CUR |
46 | | UVC_CONTROL_RESTORE, | 46 | | UVC_CTRL_FLAG_GET_RANGE |
47 | | UVC_CTRL_FLAG_RESTORE, | ||
47 | }, | 48 | }, |
48 | { | 49 | { |
49 | .entity = UVC_GUID_UVC_PROCESSING, | 50 | .entity = UVC_GUID_UVC_PROCESSING, |
50 | .selector = UVC_PU_CONTRAST_CONTROL, | 51 | .selector = UVC_PU_CONTRAST_CONTROL, |
51 | .index = 1, | 52 | .index = 1, |
52 | .size = 2, | 53 | .size = 2, |
53 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 54 | .flags = UVC_CTRL_FLAG_SET_CUR |
54 | | UVC_CONTROL_RESTORE, | 55 | | UVC_CTRL_FLAG_GET_RANGE |
56 | | UVC_CTRL_FLAG_RESTORE, | ||
55 | }, | 57 | }, |
56 | { | 58 | { |
57 | .entity = UVC_GUID_UVC_PROCESSING, | 59 | .entity = UVC_GUID_UVC_PROCESSING, |
58 | .selector = UVC_PU_HUE_CONTROL, | 60 | .selector = UVC_PU_HUE_CONTROL, |
59 | .index = 2, | 61 | .index = 2, |
60 | .size = 2, | 62 | .size = 2, |
61 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 63 | .flags = UVC_CTRL_FLAG_SET_CUR |
62 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 64 | | UVC_CTRL_FLAG_GET_RANGE |
65 | | UVC_CTRL_FLAG_RESTORE | ||
66 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
63 | }, | 67 | }, |
64 | { | 68 | { |
65 | .entity = UVC_GUID_UVC_PROCESSING, | 69 | .entity = UVC_GUID_UVC_PROCESSING, |
66 | .selector = UVC_PU_SATURATION_CONTROL, | 70 | .selector = UVC_PU_SATURATION_CONTROL, |
67 | .index = 3, | 71 | .index = 3, |
68 | .size = 2, | 72 | .size = 2, |
69 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 73 | .flags = UVC_CTRL_FLAG_SET_CUR |
70 | | UVC_CONTROL_RESTORE, | 74 | | UVC_CTRL_FLAG_GET_RANGE |
75 | | UVC_CTRL_FLAG_RESTORE, | ||
71 | }, | 76 | }, |
72 | { | 77 | { |
73 | .entity = UVC_GUID_UVC_PROCESSING, | 78 | .entity = UVC_GUID_UVC_PROCESSING, |
74 | .selector = UVC_PU_SHARPNESS_CONTROL, | 79 | .selector = UVC_PU_SHARPNESS_CONTROL, |
75 | .index = 4, | 80 | .index = 4, |
76 | .size = 2, | 81 | .size = 2, |
77 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 82 | .flags = UVC_CTRL_FLAG_SET_CUR |
78 | | UVC_CONTROL_RESTORE, | 83 | | UVC_CTRL_FLAG_GET_RANGE |
84 | | UVC_CTRL_FLAG_RESTORE, | ||
79 | }, | 85 | }, |
80 | { | 86 | { |
81 | .entity = UVC_GUID_UVC_PROCESSING, | 87 | .entity = UVC_GUID_UVC_PROCESSING, |
82 | .selector = UVC_PU_GAMMA_CONTROL, | 88 | .selector = UVC_PU_GAMMA_CONTROL, |
83 | .index = 5, | 89 | .index = 5, |
84 | .size = 2, | 90 | .size = 2, |
85 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 91 | .flags = UVC_CTRL_FLAG_SET_CUR |
86 | | UVC_CONTROL_RESTORE, | 92 | | UVC_CTRL_FLAG_GET_RANGE |
93 | | UVC_CTRL_FLAG_RESTORE, | ||
87 | }, | 94 | }, |
88 | { | 95 | { |
89 | .entity = UVC_GUID_UVC_PROCESSING, | 96 | .entity = UVC_GUID_UVC_PROCESSING, |
90 | .selector = UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL, | 97 | .selector = UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL, |
91 | .index = 6, | 98 | .index = 6, |
92 | .size = 2, | 99 | .size = 2, |
93 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 100 | .flags = UVC_CTRL_FLAG_SET_CUR |
94 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 101 | | UVC_CTRL_FLAG_GET_RANGE |
102 | | UVC_CTRL_FLAG_RESTORE | ||
103 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
95 | }, | 104 | }, |
96 | { | 105 | { |
97 | .entity = UVC_GUID_UVC_PROCESSING, | 106 | .entity = UVC_GUID_UVC_PROCESSING, |
98 | .selector = UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL, | 107 | .selector = UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL, |
99 | .index = 7, | 108 | .index = 7, |
100 | .size = 4, | 109 | .size = 4, |
101 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 110 | .flags = UVC_CTRL_FLAG_SET_CUR |
102 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 111 | | UVC_CTRL_FLAG_GET_RANGE |
112 | | UVC_CTRL_FLAG_RESTORE | ||
113 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
103 | }, | 114 | }, |
104 | { | 115 | { |
105 | .entity = UVC_GUID_UVC_PROCESSING, | 116 | .entity = UVC_GUID_UVC_PROCESSING, |
106 | .selector = UVC_PU_BACKLIGHT_COMPENSATION_CONTROL, | 117 | .selector = UVC_PU_BACKLIGHT_COMPENSATION_CONTROL, |
107 | .index = 8, | 118 | .index = 8, |
108 | .size = 2, | 119 | .size = 2, |
109 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 120 | .flags = UVC_CTRL_FLAG_SET_CUR |
110 | | UVC_CONTROL_RESTORE, | 121 | | UVC_CTRL_FLAG_GET_RANGE |
122 | | UVC_CTRL_FLAG_RESTORE, | ||
111 | }, | 123 | }, |
112 | { | 124 | { |
113 | .entity = UVC_GUID_UVC_PROCESSING, | 125 | .entity = UVC_GUID_UVC_PROCESSING, |
114 | .selector = UVC_PU_GAIN_CONTROL, | 126 | .selector = UVC_PU_GAIN_CONTROL, |
115 | .index = 9, | 127 | .index = 9, |
116 | .size = 2, | 128 | .size = 2, |
117 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 129 | .flags = UVC_CTRL_FLAG_SET_CUR |
118 | | UVC_CONTROL_RESTORE, | 130 | | UVC_CTRL_FLAG_GET_RANGE |
131 | | UVC_CTRL_FLAG_RESTORE, | ||
119 | }, | 132 | }, |
120 | { | 133 | { |
121 | .entity = UVC_GUID_UVC_PROCESSING, | 134 | .entity = UVC_GUID_UVC_PROCESSING, |
122 | .selector = UVC_PU_POWER_LINE_FREQUENCY_CONTROL, | 135 | .selector = UVC_PU_POWER_LINE_FREQUENCY_CONTROL, |
123 | .index = 10, | 136 | .index = 10, |
124 | .size = 1, | 137 | .size = 1, |
125 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 138 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
126 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE, | 139 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_RESTORE, |
127 | }, | 140 | }, |
128 | { | 141 | { |
129 | .entity = UVC_GUID_UVC_PROCESSING, | 142 | .entity = UVC_GUID_UVC_PROCESSING, |
130 | .selector = UVC_PU_HUE_AUTO_CONTROL, | 143 | .selector = UVC_PU_HUE_AUTO_CONTROL, |
131 | .index = 11, | 144 | .index = 11, |
132 | .size = 1, | 145 | .size = 1, |
133 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 146 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
134 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE, | 147 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_RESTORE, |
135 | }, | 148 | }, |
136 | { | 149 | { |
137 | .entity = UVC_GUID_UVC_PROCESSING, | 150 | .entity = UVC_GUID_UVC_PROCESSING, |
138 | .selector = UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL, | 151 | .selector = UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL, |
139 | .index = 12, | 152 | .index = 12, |
140 | .size = 1, | 153 | .size = 1, |
141 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 154 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
142 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE, | 155 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_RESTORE, |
143 | }, | 156 | }, |
144 | { | 157 | { |
145 | .entity = UVC_GUID_UVC_PROCESSING, | 158 | .entity = UVC_GUID_UVC_PROCESSING, |
146 | .selector = UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL, | 159 | .selector = UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL, |
147 | .index = 13, | 160 | .index = 13, |
148 | .size = 1, | 161 | .size = 1, |
149 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 162 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
150 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE, | 163 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_RESTORE, |
151 | }, | 164 | }, |
152 | { | 165 | { |
153 | .entity = UVC_GUID_UVC_PROCESSING, | 166 | .entity = UVC_GUID_UVC_PROCESSING, |
154 | .selector = UVC_PU_DIGITAL_MULTIPLIER_CONTROL, | 167 | .selector = UVC_PU_DIGITAL_MULTIPLIER_CONTROL, |
155 | .index = 14, | 168 | .index = 14, |
156 | .size = 2, | 169 | .size = 2, |
157 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 170 | .flags = UVC_CTRL_FLAG_SET_CUR |
158 | | UVC_CONTROL_RESTORE, | 171 | | UVC_CTRL_FLAG_GET_RANGE |
172 | | UVC_CTRL_FLAG_RESTORE, | ||
159 | }, | 173 | }, |
160 | { | 174 | { |
161 | .entity = UVC_GUID_UVC_PROCESSING, | 175 | .entity = UVC_GUID_UVC_PROCESSING, |
162 | .selector = UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL, | 176 | .selector = UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL, |
163 | .index = 15, | 177 | .index = 15, |
164 | .size = 2, | 178 | .size = 2, |
165 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 179 | .flags = UVC_CTRL_FLAG_SET_CUR |
166 | | UVC_CONTROL_RESTORE, | 180 | | UVC_CTRL_FLAG_GET_RANGE |
181 | | UVC_CTRL_FLAG_RESTORE, | ||
167 | }, | 182 | }, |
168 | { | 183 | { |
169 | .entity = UVC_GUID_UVC_PROCESSING, | 184 | .entity = UVC_GUID_UVC_PROCESSING, |
170 | .selector = UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL, | 185 | .selector = UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL, |
171 | .index = 16, | 186 | .index = 16, |
172 | .size = 1, | 187 | .size = 1, |
173 | .flags = UVC_CONTROL_GET_CUR, | 188 | .flags = UVC_CTRL_FLAG_GET_CUR, |
174 | }, | 189 | }, |
175 | { | 190 | { |
176 | .entity = UVC_GUID_UVC_PROCESSING, | 191 | .entity = UVC_GUID_UVC_PROCESSING, |
177 | .selector = UVC_PU_ANALOG_LOCK_STATUS_CONTROL, | 192 | .selector = UVC_PU_ANALOG_LOCK_STATUS_CONTROL, |
178 | .index = 17, | 193 | .index = 17, |
179 | .size = 1, | 194 | .size = 1, |
180 | .flags = UVC_CONTROL_GET_CUR, | 195 | .flags = UVC_CTRL_FLAG_GET_CUR, |
181 | }, | 196 | }, |
182 | { | 197 | { |
183 | .entity = UVC_GUID_UVC_CAMERA, | 198 | .entity = UVC_GUID_UVC_CAMERA, |
184 | .selector = UVC_CT_SCANNING_MODE_CONTROL, | 199 | .selector = UVC_CT_SCANNING_MODE_CONTROL, |
185 | .index = 0, | 200 | .index = 0, |
186 | .size = 1, | 201 | .size = 1, |
187 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 202 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
188 | | UVC_CONTROL_RESTORE, | 203 | | UVC_CTRL_FLAG_RESTORE, |
189 | }, | 204 | }, |
190 | { | 205 | { |
191 | .entity = UVC_GUID_UVC_CAMERA, | 206 | .entity = UVC_GUID_UVC_CAMERA, |
192 | .selector = UVC_CT_AE_MODE_CONTROL, | 207 | .selector = UVC_CT_AE_MODE_CONTROL, |
193 | .index = 1, | 208 | .index = 1, |
194 | .size = 1, | 209 | .size = 1, |
195 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 210 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
196 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_GET_RES | 211 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_GET_RES |
197 | | UVC_CONTROL_RESTORE, | 212 | | UVC_CTRL_FLAG_RESTORE, |
198 | }, | 213 | }, |
199 | { | 214 | { |
200 | .entity = UVC_GUID_UVC_CAMERA, | 215 | .entity = UVC_GUID_UVC_CAMERA, |
201 | .selector = UVC_CT_AE_PRIORITY_CONTROL, | 216 | .selector = UVC_CT_AE_PRIORITY_CONTROL, |
202 | .index = 2, | 217 | .index = 2, |
203 | .size = 1, | 218 | .size = 1, |
204 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 219 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
205 | | UVC_CONTROL_RESTORE, | 220 | | UVC_CTRL_FLAG_RESTORE, |
206 | }, | 221 | }, |
207 | { | 222 | { |
208 | .entity = UVC_GUID_UVC_CAMERA, | 223 | .entity = UVC_GUID_UVC_CAMERA, |
209 | .selector = UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL, | 224 | .selector = UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL, |
210 | .index = 3, | 225 | .index = 3, |
211 | .size = 4, | 226 | .size = 4, |
212 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 227 | .flags = UVC_CTRL_FLAG_SET_CUR |
213 | | UVC_CONTROL_RESTORE, | 228 | | UVC_CTRL_FLAG_GET_RANGE |
229 | | UVC_CTRL_FLAG_RESTORE, | ||
214 | }, | 230 | }, |
215 | { | 231 | { |
216 | .entity = UVC_GUID_UVC_CAMERA, | 232 | .entity = UVC_GUID_UVC_CAMERA, |
217 | .selector = UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL, | 233 | .selector = UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL, |
218 | .index = 4, | 234 | .index = 4, |
219 | .size = 1, | 235 | .size = 1, |
220 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_RESTORE, | 236 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_RESTORE, |
221 | }, | 237 | }, |
222 | { | 238 | { |
223 | .entity = UVC_GUID_UVC_CAMERA, | 239 | .entity = UVC_GUID_UVC_CAMERA, |
224 | .selector = UVC_CT_FOCUS_ABSOLUTE_CONTROL, | 240 | .selector = UVC_CT_FOCUS_ABSOLUTE_CONTROL, |
225 | .index = 5, | 241 | .index = 5, |
226 | .size = 2, | 242 | .size = 2, |
227 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 243 | .flags = UVC_CTRL_FLAG_SET_CUR |
228 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 244 | | UVC_CTRL_FLAG_GET_RANGE |
245 | | UVC_CTRL_FLAG_RESTORE | ||
246 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
229 | }, | 247 | }, |
230 | { | 248 | { |
231 | .entity = UVC_GUID_UVC_CAMERA, | 249 | .entity = UVC_GUID_UVC_CAMERA, |
232 | .selector = UVC_CT_FOCUS_RELATIVE_CONTROL, | 250 | .selector = UVC_CT_FOCUS_RELATIVE_CONTROL, |
233 | .index = 6, | 251 | .index = 6, |
234 | .size = 2, | 252 | .size = 2, |
235 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_MIN | 253 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN |
236 | | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | 254 | | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES |
237 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_AUTO_UPDATE, | 255 | | UVC_CTRL_FLAG_GET_DEF |
256 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
238 | }, | 257 | }, |
239 | { | 258 | { |
240 | .entity = UVC_GUID_UVC_CAMERA, | 259 | .entity = UVC_GUID_UVC_CAMERA, |
241 | .selector = UVC_CT_IRIS_ABSOLUTE_CONTROL, | 260 | .selector = UVC_CT_IRIS_ABSOLUTE_CONTROL, |
242 | .index = 7, | 261 | .index = 7, |
243 | .size = 2, | 262 | .size = 2, |
244 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 263 | .flags = UVC_CTRL_FLAG_SET_CUR |
245 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 264 | | UVC_CTRL_FLAG_GET_RANGE |
265 | | UVC_CTRL_FLAG_RESTORE | ||
266 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
246 | }, | 267 | }, |
247 | { | 268 | { |
248 | .entity = UVC_GUID_UVC_CAMERA, | 269 | .entity = UVC_GUID_UVC_CAMERA, |
249 | .selector = UVC_CT_IRIS_RELATIVE_CONTROL, | 270 | .selector = UVC_CT_IRIS_RELATIVE_CONTROL, |
250 | .index = 8, | 271 | .index = 8, |
251 | .size = 1, | 272 | .size = 1, |
252 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_AUTO_UPDATE, | 273 | .flags = UVC_CTRL_FLAG_SET_CUR |
274 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
253 | }, | 275 | }, |
254 | { | 276 | { |
255 | .entity = UVC_GUID_UVC_CAMERA, | 277 | .entity = UVC_GUID_UVC_CAMERA, |
256 | .selector = UVC_CT_ZOOM_ABSOLUTE_CONTROL, | 278 | .selector = UVC_CT_ZOOM_ABSOLUTE_CONTROL, |
257 | .index = 9, | 279 | .index = 9, |
258 | .size = 2, | 280 | .size = 2, |
259 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 281 | .flags = UVC_CTRL_FLAG_SET_CUR |
260 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 282 | | UVC_CTRL_FLAG_GET_RANGE |
283 | | UVC_CTRL_FLAG_RESTORE | ||
284 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
261 | }, | 285 | }, |
262 | { | 286 | { |
263 | .entity = UVC_GUID_UVC_CAMERA, | 287 | .entity = UVC_GUID_UVC_CAMERA, |
264 | .selector = UVC_CT_ZOOM_RELATIVE_CONTROL, | 288 | .selector = UVC_CT_ZOOM_RELATIVE_CONTROL, |
265 | .index = 10, | 289 | .index = 10, |
266 | .size = 3, | 290 | .size = 3, |
267 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_MIN | 291 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN |
268 | | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | 292 | | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES |
269 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_AUTO_UPDATE, | 293 | | UVC_CTRL_FLAG_GET_DEF |
294 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
270 | }, | 295 | }, |
271 | { | 296 | { |
272 | .entity = UVC_GUID_UVC_CAMERA, | 297 | .entity = UVC_GUID_UVC_CAMERA, |
273 | .selector = UVC_CT_PANTILT_ABSOLUTE_CONTROL, | 298 | .selector = UVC_CT_PANTILT_ABSOLUTE_CONTROL, |
274 | .index = 11, | 299 | .index = 11, |
275 | .size = 8, | 300 | .size = 8, |
276 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 301 | .flags = UVC_CTRL_FLAG_SET_CUR |
277 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 302 | | UVC_CTRL_FLAG_GET_RANGE |
303 | | UVC_CTRL_FLAG_RESTORE | ||
304 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
278 | }, | 305 | }, |
279 | { | 306 | { |
280 | .entity = UVC_GUID_UVC_CAMERA, | 307 | .entity = UVC_GUID_UVC_CAMERA, |
281 | .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, | 308 | .selector = UVC_CT_PANTILT_RELATIVE_CONTROL, |
282 | .index = 12, | 309 | .index = 12, |
283 | .size = 4, | 310 | .size = 4, |
284 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_MIN | 311 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN |
285 | | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | 312 | | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES |
286 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_AUTO_UPDATE, | 313 | | UVC_CTRL_FLAG_GET_DEF |
314 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
287 | }, | 315 | }, |
288 | { | 316 | { |
289 | .entity = UVC_GUID_UVC_CAMERA, | 317 | .entity = UVC_GUID_UVC_CAMERA, |
290 | .selector = UVC_CT_ROLL_ABSOLUTE_CONTROL, | 318 | .selector = UVC_CT_ROLL_ABSOLUTE_CONTROL, |
291 | .index = 13, | 319 | .index = 13, |
292 | .size = 2, | 320 | .size = 2, |
293 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE | 321 | .flags = UVC_CTRL_FLAG_SET_CUR |
294 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 322 | | UVC_CTRL_FLAG_GET_RANGE |
323 | | UVC_CTRL_FLAG_RESTORE | ||
324 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
295 | }, | 325 | }, |
296 | { | 326 | { |
297 | .entity = UVC_GUID_UVC_CAMERA, | 327 | .entity = UVC_GUID_UVC_CAMERA, |
298 | .selector = UVC_CT_ROLL_RELATIVE_CONTROL, | 328 | .selector = UVC_CT_ROLL_RELATIVE_CONTROL, |
299 | .index = 14, | 329 | .index = 14, |
300 | .size = 2, | 330 | .size = 2, |
301 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_MIN | 331 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_MIN |
302 | | UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | 332 | | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES |
303 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_AUTO_UPDATE, | 333 | | UVC_CTRL_FLAG_GET_DEF |
334 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
304 | }, | 335 | }, |
305 | { | 336 | { |
306 | .entity = UVC_GUID_UVC_CAMERA, | 337 | .entity = UVC_GUID_UVC_CAMERA, |
307 | .selector = UVC_CT_FOCUS_AUTO_CONTROL, | 338 | .selector = UVC_CT_FOCUS_AUTO_CONTROL, |
308 | .index = 17, | 339 | .index = 17, |
309 | .size = 1, | 340 | .size = 1, |
310 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 341 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
311 | | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE, | 342 | | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_RESTORE, |
312 | }, | 343 | }, |
313 | { | 344 | { |
314 | .entity = UVC_GUID_UVC_CAMERA, | 345 | .entity = UVC_GUID_UVC_CAMERA, |
315 | .selector = UVC_CT_PRIVACY_CONTROL, | 346 | .selector = UVC_CT_PRIVACY_CONTROL, |
316 | .index = 18, | 347 | .index = 18, |
317 | .size = 1, | 348 | .size = 1, |
318 | .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR | 349 | .flags = UVC_CTRL_FLAG_SET_CUR | UVC_CTRL_FLAG_GET_CUR |
319 | | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE, | 350 | | UVC_CTRL_FLAG_RESTORE |
351 | | UVC_CTRL_FLAG_AUTO_UPDATE, | ||
320 | }, | 352 | }, |
321 | }; | 353 | }; |
322 | 354 | ||
@@ -816,7 +848,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain, | |||
816 | { | 848 | { |
817 | int ret; | 849 | int ret; |
818 | 850 | ||
819 | if (ctrl->info.flags & UVC_CONTROL_GET_DEF) { | 851 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_DEF) { |
820 | ret = uvc_query_ctrl(chain->dev, UVC_GET_DEF, ctrl->entity->id, | 852 | ret = uvc_query_ctrl(chain->dev, UVC_GET_DEF, ctrl->entity->id, |
821 | chain->dev->intfnum, ctrl->info.selector, | 853 | chain->dev->intfnum, ctrl->info.selector, |
822 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF), | 854 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF), |
@@ -825,7 +857,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain, | |||
825 | return ret; | 857 | return ret; |
826 | } | 858 | } |
827 | 859 | ||
828 | if (ctrl->info.flags & UVC_CONTROL_GET_MIN) { | 860 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_MIN) { |
829 | ret = uvc_query_ctrl(chain->dev, UVC_GET_MIN, ctrl->entity->id, | 861 | ret = uvc_query_ctrl(chain->dev, UVC_GET_MIN, ctrl->entity->id, |
830 | chain->dev->intfnum, ctrl->info.selector, | 862 | chain->dev->intfnum, ctrl->info.selector, |
831 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN), | 863 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN), |
@@ -833,7 +865,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain, | |||
833 | if (ret < 0) | 865 | if (ret < 0) |
834 | return ret; | 866 | return ret; |
835 | } | 867 | } |
836 | if (ctrl->info.flags & UVC_CONTROL_GET_MAX) { | 868 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_MAX) { |
837 | ret = uvc_query_ctrl(chain->dev, UVC_GET_MAX, ctrl->entity->id, | 869 | ret = uvc_query_ctrl(chain->dev, UVC_GET_MAX, ctrl->entity->id, |
838 | chain->dev->intfnum, ctrl->info.selector, | 870 | chain->dev->intfnum, ctrl->info.selector, |
839 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX), | 871 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX), |
@@ -841,7 +873,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain, | |||
841 | if (ret < 0) | 873 | if (ret < 0) |
842 | return ret; | 874 | return ret; |
843 | } | 875 | } |
844 | if (ctrl->info.flags & UVC_CONTROL_GET_RES) { | 876 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES) { |
845 | ret = uvc_query_ctrl(chain->dev, UVC_GET_RES, ctrl->entity->id, | 877 | ret = uvc_query_ctrl(chain->dev, UVC_GET_RES, ctrl->entity->id, |
846 | chain->dev->intfnum, ctrl->info.selector, | 878 | chain->dev->intfnum, ctrl->info.selector, |
847 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES), | 879 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES), |
@@ -879,9 +911,9 @@ int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain, | |||
879 | strlcpy(v4l2_ctrl->name, mapping->name, sizeof v4l2_ctrl->name); | 911 | strlcpy(v4l2_ctrl->name, mapping->name, sizeof v4l2_ctrl->name); |
880 | v4l2_ctrl->flags = 0; | 912 | v4l2_ctrl->flags = 0; |
881 | 913 | ||
882 | if (!(ctrl->info.flags & UVC_CONTROL_GET_CUR)) | 914 | if (!(ctrl->info.flags & UVC_CTRL_FLAG_GET_CUR)) |
883 | v4l2_ctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY; | 915 | v4l2_ctrl->flags |= V4L2_CTRL_FLAG_WRITE_ONLY; |
884 | if (!(ctrl->info.flags & UVC_CONTROL_SET_CUR)) | 916 | if (!(ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR)) |
885 | v4l2_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; | 917 | v4l2_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; |
886 | 918 | ||
887 | if (!ctrl->cached) { | 919 | if (!ctrl->cached) { |
@@ -890,7 +922,7 @@ int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain, | |||
890 | goto done; | 922 | goto done; |
891 | } | 923 | } |
892 | 924 | ||
893 | if (ctrl->info.flags & UVC_CONTROL_GET_DEF) { | 925 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_DEF) { |
894 | v4l2_ctrl->default_value = mapping->get(mapping, UVC_GET_DEF, | 926 | v4l2_ctrl->default_value = mapping->get(mapping, UVC_GET_DEF, |
895 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF)); | 927 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_DEF)); |
896 | } | 928 | } |
@@ -927,15 +959,15 @@ int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain, | |||
927 | break; | 959 | break; |
928 | } | 960 | } |
929 | 961 | ||
930 | if (ctrl->info.flags & UVC_CONTROL_GET_MIN) | 962 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_MIN) |
931 | v4l2_ctrl->minimum = mapping->get(mapping, UVC_GET_MIN, | 963 | v4l2_ctrl->minimum = mapping->get(mapping, UVC_GET_MIN, |
932 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN)); | 964 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MIN)); |
933 | 965 | ||
934 | if (ctrl->info.flags & UVC_CONTROL_GET_MAX) | 966 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_MAX) |
935 | v4l2_ctrl->maximum = mapping->get(mapping, UVC_GET_MAX, | 967 | v4l2_ctrl->maximum = mapping->get(mapping, UVC_GET_MAX, |
936 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX)); | 968 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_MAX)); |
937 | 969 | ||
938 | if (ctrl->info.flags & UVC_CONTROL_GET_RES) | 970 | if (ctrl->info.flags & UVC_CTRL_FLAG_GET_RES) |
939 | v4l2_ctrl->step = mapping->get(mapping, UVC_GET_RES, | 971 | v4l2_ctrl->step = mapping->get(mapping, UVC_GET_RES, |
940 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES)); | 972 | uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES)); |
941 | 973 | ||
@@ -1039,7 +1071,7 @@ static int uvc_ctrl_commit_entity(struct uvc_device *dev, | |||
1039 | * marked as loaded in uvc_ctrl_get/uvc_ctrl_set to prevent | 1071 | * marked as loaded in uvc_ctrl_get/uvc_ctrl_set to prevent |
1040 | * uvc_ctrl_get from using the cached value. | 1072 | * uvc_ctrl_get from using the cached value. |
1041 | */ | 1073 | */ |
1042 | if (ctrl->info.flags & UVC_CONTROL_AUTO_UPDATE) | 1074 | if (ctrl->info.flags & UVC_CTRL_FLAG_AUTO_UPDATE) |
1043 | ctrl->loaded = 0; | 1075 | ctrl->loaded = 0; |
1044 | 1076 | ||
1045 | if (!ctrl->dirty) | 1077 | if (!ctrl->dirty) |
@@ -1094,7 +1126,7 @@ int uvc_ctrl_get(struct uvc_video_chain *chain, | |||
1094 | int ret; | 1126 | int ret; |
1095 | 1127 | ||
1096 | ctrl = uvc_find_control(chain, xctrl->id, &mapping); | 1128 | ctrl = uvc_find_control(chain, xctrl->id, &mapping); |
1097 | if (ctrl == NULL || (ctrl->info.flags & UVC_CONTROL_GET_CUR) == 0) | 1129 | if (ctrl == NULL || (ctrl->info.flags & UVC_CTRL_FLAG_GET_CUR) == 0) |
1098 | return -EINVAL; | 1130 | return -EINVAL; |
1099 | 1131 | ||
1100 | if (!ctrl->loaded) { | 1132 | if (!ctrl->loaded) { |
@@ -1136,7 +1168,7 @@ int uvc_ctrl_set(struct uvc_video_chain *chain, | |||
1136 | int ret; | 1168 | int ret; |
1137 | 1169 | ||
1138 | ctrl = uvc_find_control(chain, xctrl->id, &mapping); | 1170 | ctrl = uvc_find_control(chain, xctrl->id, &mapping); |
1139 | if (ctrl == NULL || (ctrl->info.flags & UVC_CONTROL_SET_CUR) == 0) | 1171 | if (ctrl == NULL || (ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR) == 0) |
1140 | return -EINVAL; | 1172 | return -EINVAL; |
1141 | 1173 | ||
1142 | /* Clamp out of range values. */ | 1174 | /* Clamp out of range values. */ |
@@ -1183,7 +1215,7 @@ int uvc_ctrl_set(struct uvc_video_chain *chain, | |||
1183 | * operation. | 1215 | * operation. |
1184 | */ | 1216 | */ |
1185 | if (!ctrl->loaded && (ctrl->info.size * 8) != mapping->size) { | 1217 | if (!ctrl->loaded && (ctrl->info.size * 8) != mapping->size) { |
1186 | if ((ctrl->info.flags & UVC_CONTROL_GET_CUR) == 0) { | 1218 | if ((ctrl->info.flags & UVC_CTRL_FLAG_GET_CUR) == 0) { |
1187 | memset(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT), | 1219 | memset(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT), |
1188 | 0, ctrl->info.size); | 1220 | 0, ctrl->info.size); |
1189 | } else { | 1221 | } else { |
@@ -1230,17 +1262,17 @@ static void uvc_ctrl_fixup_xu_info(struct uvc_device *dev, | |||
1230 | 1262 | ||
1231 | static const struct uvc_ctrl_fixup fixups[] = { | 1263 | static const struct uvc_ctrl_fixup fixups[] = { |
1232 | { { USB_DEVICE(0x046d, 0x08c2) }, 9, 1, | 1264 | { { USB_DEVICE(0x046d, 0x08c2) }, 9, 1, |
1233 | UVC_CONTROL_GET_MIN | UVC_CONTROL_GET_MAX | | 1265 | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | |
1234 | UVC_CONTROL_GET_DEF | UVC_CONTROL_SET_CUR | | 1266 | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_SET_CUR | |
1235 | UVC_CONTROL_AUTO_UPDATE }, | 1267 | UVC_CTRL_FLAG_AUTO_UPDATE }, |
1236 | { { USB_DEVICE(0x046d, 0x08cc) }, 9, 1, | 1268 | { { USB_DEVICE(0x046d, 0x08cc) }, 9, 1, |
1237 | UVC_CONTROL_GET_MIN | UVC_CONTROL_GET_MAX | | 1269 | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | |
1238 | UVC_CONTROL_GET_DEF | UVC_CONTROL_SET_CUR | | 1270 | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_SET_CUR | |
1239 | UVC_CONTROL_AUTO_UPDATE }, | 1271 | UVC_CTRL_FLAG_AUTO_UPDATE }, |
1240 | { { USB_DEVICE(0x046d, 0x0994) }, 9, 1, | 1272 | { { USB_DEVICE(0x046d, 0x0994) }, 9, 1, |
1241 | UVC_CONTROL_GET_MIN | UVC_CONTROL_GET_MAX | | 1273 | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | |
1242 | UVC_CONTROL_GET_DEF | UVC_CONTROL_SET_CUR | | 1274 | UVC_CTRL_FLAG_GET_DEF | UVC_CTRL_FLAG_SET_CUR | |
1243 | UVC_CONTROL_AUTO_UPDATE }, | 1275 | UVC_CTRL_FLAG_AUTO_UPDATE }, |
1244 | }; | 1276 | }; |
1245 | 1277 | ||
1246 | unsigned int i; | 1278 | unsigned int i; |
@@ -1297,21 +1329,23 @@ static int uvc_ctrl_fill_xu_info(struct uvc_device *dev, | |||
1297 | goto done; | 1329 | goto done; |
1298 | } | 1330 | } |
1299 | 1331 | ||
1300 | info->flags = UVC_CONTROL_GET_MIN | UVC_CONTROL_GET_MAX | 1332 | info->flags = UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX |
1301 | | UVC_CONTROL_GET_RES | UVC_CONTROL_GET_DEF | 1333 | | UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF |
1302 | | (data[0] & UVC_CONTROL_CAP_GET ? UVC_CONTROL_GET_CUR : 0) | 1334 | | (data[0] & UVC_CONTROL_CAP_GET ? |
1303 | | (data[0] & UVC_CONTROL_CAP_SET ? UVC_CONTROL_SET_CUR : 0) | 1335 | UVC_CTRL_FLAG_GET_CUR : 0) |
1336 | | (data[0] & UVC_CONTROL_CAP_SET ? | ||
1337 | UVC_CTRL_FLAG_SET_CUR : 0) | ||
1304 | | (data[0] & UVC_CONTROL_CAP_AUTOUPDATE ? | 1338 | | (data[0] & UVC_CONTROL_CAP_AUTOUPDATE ? |
1305 | UVC_CONTROL_AUTO_UPDATE : 0); | 1339 | UVC_CTRL_FLAG_AUTO_UPDATE : 0); |
1306 | 1340 | ||
1307 | uvc_ctrl_fixup_xu_info(dev, ctrl, info); | 1341 | uvc_ctrl_fixup_xu_info(dev, ctrl, info); |
1308 | 1342 | ||
1309 | uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, " | 1343 | uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, " |
1310 | "flags { get %u set %u auto %u }.\n", | 1344 | "flags { get %u set %u auto %u }.\n", |
1311 | info->entity, info->selector, info->size, | 1345 | info->entity, info->selector, info->size, |
1312 | (info->flags & UVC_CONTROL_GET_CUR) ? 1 : 0, | 1346 | (info->flags & UVC_CTRL_FLAG_GET_CUR) ? 1 : 0, |
1313 | (info->flags & UVC_CONTROL_SET_CUR) ? 1 : 0, | 1347 | (info->flags & UVC_CTRL_FLAG_SET_CUR) ? 1 : 0, |
1314 | (info->flags & UVC_CONTROL_AUTO_UPDATE) ? 1 : 0); | 1348 | (info->flags & UVC_CTRL_FLAG_AUTO_UPDATE) ? 1 : 0); |
1315 | 1349 | ||
1316 | done: | 1350 | done: |
1317 | kfree(data); | 1351 | kfree(data); |
@@ -1397,22 +1431,22 @@ int uvc_xu_ctrl_query(struct uvc_video_chain *chain, | |||
1397 | 1431 | ||
1398 | switch (xqry->query) { | 1432 | switch (xqry->query) { |
1399 | case UVC_GET_CUR: | 1433 | case UVC_GET_CUR: |
1400 | reqflags = UVC_CONTROL_GET_CUR; | 1434 | reqflags = UVC_CTRL_FLAG_GET_CUR; |
1401 | break; | 1435 | break; |
1402 | case UVC_GET_MIN: | 1436 | case UVC_GET_MIN: |
1403 | reqflags = UVC_CONTROL_GET_MIN; | 1437 | reqflags = UVC_CTRL_FLAG_GET_MIN; |
1404 | break; | 1438 | break; |
1405 | case UVC_GET_MAX: | 1439 | case UVC_GET_MAX: |
1406 | reqflags = UVC_CONTROL_GET_MAX; | 1440 | reqflags = UVC_CTRL_FLAG_GET_MAX; |
1407 | break; | 1441 | break; |
1408 | case UVC_GET_DEF: | 1442 | case UVC_GET_DEF: |
1409 | reqflags = UVC_CONTROL_GET_DEF; | 1443 | reqflags = UVC_CTRL_FLAG_GET_DEF; |
1410 | break; | 1444 | break; |
1411 | case UVC_GET_RES: | 1445 | case UVC_GET_RES: |
1412 | reqflags = UVC_CONTROL_GET_RES; | 1446 | reqflags = UVC_CTRL_FLAG_GET_RES; |
1413 | break; | 1447 | break; |
1414 | case UVC_SET_CUR: | 1448 | case UVC_SET_CUR: |
1415 | reqflags = UVC_CONTROL_SET_CUR; | 1449 | reqflags = UVC_CTRL_FLAG_SET_CUR; |
1416 | break; | 1450 | break; |
1417 | case UVC_GET_LEN: | 1451 | case UVC_GET_LEN: |
1418 | size = 2; | 1452 | size = 2; |
@@ -1488,7 +1522,7 @@ int uvc_ctrl_resume_device(struct uvc_device *dev) | |||
1488 | ctrl = &entity->controls[i]; | 1522 | ctrl = &entity->controls[i]; |
1489 | 1523 | ||
1490 | if (!ctrl->initialized || !ctrl->modified || | 1524 | if (!ctrl->initialized || !ctrl->modified || |
1491 | (ctrl->info.flags & UVC_CONTROL_RESTORE) == 0) | 1525 | (ctrl->info.flags & UVC_CTRL_FLAG_RESTORE) == 0) |
1492 | continue; | 1526 | continue; |
1493 | 1527 | ||
1494 | printk(KERN_INFO "restoring control %pUl/%u/%u\n", | 1528 | printk(KERN_INFO "restoring control %pUl/%u/%u\n", |