hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/uapi/linux/usb/video.h
....@@ -192,14 +192,14 @@
192192
193193 /* 3.7.2. Video Control Interface Header Descriptor */
194194 struct uvc_header_descriptor {
195
- __u8 bLength;
196
- __u8 bDescriptorType;
197
- __u8 bDescriptorSubType;
198
- __u16 bcdUVC;
199
- __u16 wTotalLength;
200
- __u32 dwClockFrequency;
201
- __u8 bInCollection;
202
- __u8 baInterfaceNr[];
195
+ __u8 bLength;
196
+ __u8 bDescriptorType;
197
+ __u8 bDescriptorSubType;
198
+ __le16 bcdUVC;
199
+ __le16 wTotalLength;
200
+ __le32 dwClockFrequency;
201
+ __u8 bInCollection;
202
+ __u8 baInterfaceNr[];
203203 } __attribute__((__packed__));
204204
205205 #define UVC_DT_HEADER_SIZE(n) (12+(n))
....@@ -209,57 +209,57 @@
209209
210210 #define DECLARE_UVC_HEADER_DESCRIPTOR(n) \
211211 struct UVC_HEADER_DESCRIPTOR(n) { \
212
- __u8 bLength; \
213
- __u8 bDescriptorType; \
214
- __u8 bDescriptorSubType; \
215
- __u16 bcdUVC; \
216
- __u16 wTotalLength; \
217
- __u32 dwClockFrequency; \
218
- __u8 bInCollection; \
219
- __u8 baInterfaceNr[n]; \
212
+ __u8 bLength; \
213
+ __u8 bDescriptorType; \
214
+ __u8 bDescriptorSubType; \
215
+ __le16 bcdUVC; \
216
+ __le16 wTotalLength; \
217
+ __le32 dwClockFrequency; \
218
+ __u8 bInCollection; \
219
+ __u8 baInterfaceNr[n]; \
220220 } __attribute__ ((packed))
221221
222222 /* 3.7.2.1. Input Terminal Descriptor */
223223 struct uvc_input_terminal_descriptor {
224
- __u8 bLength;
225
- __u8 bDescriptorType;
226
- __u8 bDescriptorSubType;
227
- __u8 bTerminalID;
228
- __u16 wTerminalType;
229
- __u8 bAssocTerminal;
230
- __u8 iTerminal;
224
+ __u8 bLength;
225
+ __u8 bDescriptorType;
226
+ __u8 bDescriptorSubType;
227
+ __u8 bTerminalID;
228
+ __le16 wTerminalType;
229
+ __u8 bAssocTerminal;
230
+ __u8 iTerminal;
231231 } __attribute__((__packed__));
232232
233233 #define UVC_DT_INPUT_TERMINAL_SIZE 8
234234
235235 /* 3.7.2.2. Output Terminal Descriptor */
236236 struct uvc_output_terminal_descriptor {
237
- __u8 bLength;
238
- __u8 bDescriptorType;
239
- __u8 bDescriptorSubType;
240
- __u8 bTerminalID;
241
- __u16 wTerminalType;
242
- __u8 bAssocTerminal;
243
- __u8 bSourceID;
244
- __u8 iTerminal;
237
+ __u8 bLength;
238
+ __u8 bDescriptorType;
239
+ __u8 bDescriptorSubType;
240
+ __u8 bTerminalID;
241
+ __le16 wTerminalType;
242
+ __u8 bAssocTerminal;
243
+ __u8 bSourceID;
244
+ __u8 iTerminal;
245245 } __attribute__((__packed__));
246246
247247 #define UVC_DT_OUTPUT_TERMINAL_SIZE 9
248248
249249 /* 3.7.2.3. Camera Terminal Descriptor */
250250 struct uvc_camera_terminal_descriptor {
251
- __u8 bLength;
252
- __u8 bDescriptorType;
253
- __u8 bDescriptorSubType;
254
- __u8 bTerminalID;
255
- __u16 wTerminalType;
256
- __u8 bAssocTerminal;
257
- __u8 iTerminal;
258
- __u16 wObjectiveFocalLengthMin;
259
- __u16 wObjectiveFocalLengthMax;
260
- __u16 wOcularFocalLength;
261
- __u8 bControlSize;
262
- __u8 bmControls[3];
251
+ __u8 bLength;
252
+ __u8 bDescriptorType;
253
+ __u8 bDescriptorSubType;
254
+ __u8 bTerminalID;
255
+ __le16 wTerminalType;
256
+ __u8 bAssocTerminal;
257
+ __u8 iTerminal;
258
+ __le16 wObjectiveFocalLengthMin;
259
+ __le16 wObjectiveFocalLengthMax;
260
+ __le16 wOcularFocalLength;
261
+ __u8 bControlSize;
262
+ __u8 bmControls[3];
263263 } __attribute__((__packed__));
264264
265265 #define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n))
....@@ -293,18 +293,19 @@
293293
294294 /* 3.7.2.5. Processing Unit Descriptor */
295295 struct uvc_processing_unit_descriptor {
296
- __u8 bLength;
297
- __u8 bDescriptorType;
298
- __u8 bDescriptorSubType;
299
- __u8 bUnitID;
300
- __u8 bSourceID;
301
- __u16 wMaxMultiplier;
302
- __u8 bControlSize;
303
- __u8 bmControls[2];
304
- __u8 iProcessing;
296
+ __u8 bLength;
297
+ __u8 bDescriptorType;
298
+ __u8 bDescriptorSubType;
299
+ __u8 bUnitID;
300
+ __u8 bSourceID;
301
+ __le16 wMaxMultiplier;
302
+ __u8 bControlSize;
303
+ __u8 bmControls[2];
304
+ __u8 iProcessing;
305
+ __u8 bmVideoStandards;
305306 } __attribute__((__packed__));
306307
307
-#define UVC_DT_PROCESSING_UNIT_SIZE(n) (9+(n))
308
+#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
308309
309310 /* 3.7.2.6. Extension Unit Descriptor */
310311 struct uvc_extension_unit_descriptor {
....@@ -343,29 +344,29 @@
343344
344345 /* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */
345346 struct uvc_control_endpoint_descriptor {
346
- __u8 bLength;
347
- __u8 bDescriptorType;
348
- __u8 bDescriptorSubType;
349
- __u16 wMaxTransferSize;
347
+ __u8 bLength;
348
+ __u8 bDescriptorType;
349
+ __u8 bDescriptorSubType;
350
+ __le16 wMaxTransferSize;
350351 } __attribute__((__packed__));
351352
352353 #define UVC_DT_CONTROL_ENDPOINT_SIZE 5
353354
354355 /* 3.9.2.1. Input Header Descriptor */
355356 struct uvc_input_header_descriptor {
356
- __u8 bLength;
357
- __u8 bDescriptorType;
358
- __u8 bDescriptorSubType;
359
- __u8 bNumFormats;
360
- __u16 wTotalLength;
361
- __u8 bEndpointAddress;
362
- __u8 bmInfo;
363
- __u8 bTerminalLink;
364
- __u8 bStillCaptureMethod;
365
- __u8 bTriggerSupport;
366
- __u8 bTriggerUsage;
367
- __u8 bControlSize;
368
- __u8 bmaControls[];
357
+ __u8 bLength;
358
+ __u8 bDescriptorType;
359
+ __u8 bDescriptorSubType;
360
+ __u8 bNumFormats;
361
+ __le16 wTotalLength;
362
+ __u8 bEndpointAddress;
363
+ __u8 bmInfo;
364
+ __u8 bTerminalLink;
365
+ __u8 bStillCaptureMethod;
366
+ __u8 bTriggerSupport;
367
+ __u8 bTriggerUsage;
368
+ __u8 bControlSize;
369
+ __u8 bmaControls[];
369370 } __attribute__((__packed__));
370371
371372 #define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p))
....@@ -375,32 +376,32 @@
375376
376377 #define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \
377378 struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \
378
- __u8 bLength; \
379
- __u8 bDescriptorType; \
380
- __u8 bDescriptorSubType; \
381
- __u8 bNumFormats; \
382
- __u16 wTotalLength; \
383
- __u8 bEndpointAddress; \
384
- __u8 bmInfo; \
385
- __u8 bTerminalLink; \
386
- __u8 bStillCaptureMethod; \
387
- __u8 bTriggerSupport; \
388
- __u8 bTriggerUsage; \
389
- __u8 bControlSize; \
390
- __u8 bmaControls[p][n]; \
379
+ __u8 bLength; \
380
+ __u8 bDescriptorType; \
381
+ __u8 bDescriptorSubType; \
382
+ __u8 bNumFormats; \
383
+ __le16 wTotalLength; \
384
+ __u8 bEndpointAddress; \
385
+ __u8 bmInfo; \
386
+ __u8 bTerminalLink; \
387
+ __u8 bStillCaptureMethod; \
388
+ __u8 bTriggerSupport; \
389
+ __u8 bTriggerUsage; \
390
+ __u8 bControlSize; \
391
+ __u8 bmaControls[p][n]; \
391392 } __attribute__ ((packed))
392393
393394 /* 3.9.2.2. Output Header Descriptor */
394395 struct uvc_output_header_descriptor {
395
- __u8 bLength;
396
- __u8 bDescriptorType;
397
- __u8 bDescriptorSubType;
398
- __u8 bNumFormats;
399
- __u16 wTotalLength;
400
- __u8 bEndpointAddress;
401
- __u8 bTerminalLink;
402
- __u8 bControlSize;
403
- __u8 bmaControls[];
396
+ __u8 bLength;
397
+ __u8 bDescriptorType;
398
+ __u8 bDescriptorSubType;
399
+ __u8 bNumFormats;
400
+ __le16 wTotalLength;
401
+ __u8 bEndpointAddress;
402
+ __u8 bTerminalLink;
403
+ __u8 bControlSize;
404
+ __u8 bmaControls[];
404405 } __attribute__((__packed__));
405406
406407 #define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p))
....@@ -410,15 +411,15 @@
410411
411412 #define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \
412413 struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \
413
- __u8 bLength; \
414
- __u8 bDescriptorType; \
415
- __u8 bDescriptorSubType; \
416
- __u8 bNumFormats; \
417
- __u16 wTotalLength; \
418
- __u8 bEndpointAddress; \
419
- __u8 bTerminalLink; \
420
- __u8 bControlSize; \
421
- __u8 bmaControls[p][n]; \
414
+ __u8 bLength; \
415
+ __u8 bDescriptorType; \
416
+ __u8 bDescriptorSubType; \
417
+ __u8 bNumFormats; \
418
+ __le16 wTotalLength; \
419
+ __u8 bEndpointAddress; \
420
+ __u8 bTerminalLink; \
421
+ __u8 bControlSize; \
422
+ __u8 bmaControls[p][n]; \
422423 } __attribute__ ((packed))
423424
424425 /* 3.9.2.6. Color matching descriptor */
....@@ -473,19 +474,19 @@
473474
474475 /* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */
475476 struct uvc_frame_uncompressed {
476
- __u8 bLength;
477
- __u8 bDescriptorType;
478
- __u8 bDescriptorSubType;
479
- __u8 bFrameIndex;
480
- __u8 bmCapabilities;
481
- __u16 wWidth;
482
- __u16 wHeight;
483
- __u32 dwMinBitRate;
484
- __u32 dwMaxBitRate;
485
- __u32 dwMaxVideoFrameBufferSize;
486
- __u32 dwDefaultFrameInterval;
487
- __u8 bFrameIntervalType;
488
- __u32 dwFrameInterval[];
477
+ __u8 bLength;
478
+ __u8 bDescriptorType;
479
+ __u8 bDescriptorSubType;
480
+ __u8 bFrameIndex;
481
+ __u8 bmCapabilities;
482
+ __le16 wWidth;
483
+ __le16 wHeight;
484
+ __le32 dwMinBitRate;
485
+ __le32 dwMaxBitRate;
486
+ __le32 dwMaxVideoFrameBufferSize;
487
+ __le32 dwDefaultFrameInterval;
488
+ __u8 bFrameIntervalType;
489
+ __le32 dwFrameInterval[];
489490 } __attribute__((__packed__));
490491
491492 #define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n) (26+4*(n))
....@@ -495,19 +496,19 @@
495496
496497 #define DECLARE_UVC_FRAME_UNCOMPRESSED(n) \
497498 struct UVC_FRAME_UNCOMPRESSED(n) { \
498
- __u8 bLength; \
499
- __u8 bDescriptorType; \
500
- __u8 bDescriptorSubType; \
501
- __u8 bFrameIndex; \
502
- __u8 bmCapabilities; \
503
- __u16 wWidth; \
504
- __u16 wHeight; \
505
- __u32 dwMinBitRate; \
506
- __u32 dwMaxBitRate; \
507
- __u32 dwMaxVideoFrameBufferSize; \
508
- __u32 dwDefaultFrameInterval; \
509
- __u8 bFrameIntervalType; \
510
- __u32 dwFrameInterval[n]; \
499
+ __u8 bLength; \
500
+ __u8 bDescriptorType; \
501
+ __u8 bDescriptorSubType; \
502
+ __u8 bFrameIndex; \
503
+ __u8 bmCapabilities; \
504
+ __le16 wWidth; \
505
+ __le16 wHeight; \
506
+ __le32 dwMinBitRate; \
507
+ __le32 dwMaxBitRate; \
508
+ __le32 dwMaxVideoFrameBufferSize; \
509
+ __le32 dwDefaultFrameInterval; \
510
+ __u8 bFrameIntervalType; \
511
+ __le32 dwFrameInterval[n]; \
511512 } __attribute__ ((packed))
512513
513514 /* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */
....@@ -529,19 +530,19 @@
529530
530531 /* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */
531532 struct uvc_frame_mjpeg {
532
- __u8 bLength;
533
- __u8 bDescriptorType;
534
- __u8 bDescriptorSubType;
535
- __u8 bFrameIndex;
536
- __u8 bmCapabilities;
537
- __u16 wWidth;
538
- __u16 wHeight;
539
- __u32 dwMinBitRate;
540
- __u32 dwMaxBitRate;
541
- __u32 dwMaxVideoFrameBufferSize;
542
- __u32 dwDefaultFrameInterval;
543
- __u8 bFrameIntervalType;
544
- __u32 dwFrameInterval[];
533
+ __u8 bLength;
534
+ __u8 bDescriptorType;
535
+ __u8 bDescriptorSubType;
536
+ __u8 bFrameIndex;
537
+ __u8 bmCapabilities;
538
+ __le16 wWidth;
539
+ __le16 wHeight;
540
+ __le32 dwMinBitRate;
541
+ __le32 dwMaxBitRate;
542
+ __le32 dwMaxVideoFrameBufferSize;
543
+ __le32 dwDefaultFrameInterval;
544
+ __u8 bFrameIntervalType;
545
+ __le32 dwFrameInterval[];
545546 } __attribute__((__packed__));
546547
547548 #define UVC_DT_FRAME_MJPEG_SIZE(n) (26+4*(n))
....@@ -551,19 +552,19 @@
551552
552553 #define DECLARE_UVC_FRAME_MJPEG(n) \
553554 struct UVC_FRAME_MJPEG(n) { \
554
- __u8 bLength; \
555
- __u8 bDescriptorType; \
556
- __u8 bDescriptorSubType; \
557
- __u8 bFrameIndex; \
558
- __u8 bmCapabilities; \
559
- __u16 wWidth; \
560
- __u16 wHeight; \
561
- __u32 dwMinBitRate; \
562
- __u32 dwMaxBitRate; \
563
- __u32 dwMaxVideoFrameBufferSize; \
564
- __u32 dwDefaultFrameInterval; \
565
- __u8 bFrameIntervalType; \
566
- __u32 dwFrameInterval[n]; \
555
+ __u8 bLength; \
556
+ __u8 bDescriptorType; \
557
+ __u8 bDescriptorSubType; \
558
+ __u8 bFrameIndex; \
559
+ __u8 bmCapabilities; \
560
+ __le16 wWidth; \
561
+ __le16 wHeight; \
562
+ __le32 dwMinBitRate; \
563
+ __le32 dwMaxBitRate; \
564
+ __le32 dwMaxVideoFrameBufferSize; \
565
+ __le32 dwDefaultFrameInterval; \
566
+ __u8 bFrameIntervalType; \
567
+ __le32 dwFrameInterval[n]; \
567568 } __attribute__ ((packed))
568569
569570 /* Frame Based Payload - 3.1.1. Frame Based Video Format Descriptor */