Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux/usb
File: video.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* USB Video Class definitions.
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 2009 Laurent Pinchart <laurent.pinchart@skynet.be>
[4] Fix | Delete
*
[5] Fix | Delete
* This file holds USB constants and structures defined by the USB Device
[6] Fix | Delete
* Class Definition for Video Devices. Unless otherwise stated, comments
[7] Fix | Delete
* below reference relevant sections of the USB Video Class 1.1 specification
[8] Fix | Delete
* available at
[9] Fix | Delete
*
[10] Fix | Delete
* http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
#ifndef __LINUX_USB_VIDEO_H
[14] Fix | Delete
#define __LINUX_USB_VIDEO_H
[15] Fix | Delete
[16] Fix | Delete
#include <linux/types.h>
[17] Fix | Delete
[18] Fix | Delete
/* --------------------------------------------------------------------------
[19] Fix | Delete
* UVC constants
[20] Fix | Delete
*/
[21] Fix | Delete
[22] Fix | Delete
/* A.2. Video Interface Subclass Codes */
[23] Fix | Delete
#define UVC_SC_UNDEFINED 0x00
[24] Fix | Delete
#define UVC_SC_VIDEOCONTROL 0x01
[25] Fix | Delete
#define UVC_SC_VIDEOSTREAMING 0x02
[26] Fix | Delete
#define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03
[27] Fix | Delete
[28] Fix | Delete
/* A.3. Video Interface Protocol Codes */
[29] Fix | Delete
#define UVC_PC_PROTOCOL_UNDEFINED 0x00
[30] Fix | Delete
#define UVC_PC_PROTOCOL_15 0x01
[31] Fix | Delete
[32] Fix | Delete
/* A.5. Video Class-Specific VC Interface Descriptor Subtypes */
[33] Fix | Delete
#define UVC_VC_DESCRIPTOR_UNDEFINED 0x00
[34] Fix | Delete
#define UVC_VC_HEADER 0x01
[35] Fix | Delete
#define UVC_VC_INPUT_TERMINAL 0x02
[36] Fix | Delete
#define UVC_VC_OUTPUT_TERMINAL 0x03
[37] Fix | Delete
#define UVC_VC_SELECTOR_UNIT 0x04
[38] Fix | Delete
#define UVC_VC_PROCESSING_UNIT 0x05
[39] Fix | Delete
#define UVC_VC_EXTENSION_UNIT 0x06
[40] Fix | Delete
[41] Fix | Delete
/* A.6. Video Class-Specific VS Interface Descriptor Subtypes */
[42] Fix | Delete
#define UVC_VS_UNDEFINED 0x00
[43] Fix | Delete
#define UVC_VS_INPUT_HEADER 0x01
[44] Fix | Delete
#define UVC_VS_OUTPUT_HEADER 0x02
[45] Fix | Delete
#define UVC_VS_STILL_IMAGE_FRAME 0x03
[46] Fix | Delete
#define UVC_VS_FORMAT_UNCOMPRESSED 0x04
[47] Fix | Delete
#define UVC_VS_FRAME_UNCOMPRESSED 0x05
[48] Fix | Delete
#define UVC_VS_FORMAT_MJPEG 0x06
[49] Fix | Delete
#define UVC_VS_FRAME_MJPEG 0x07
[50] Fix | Delete
#define UVC_VS_FORMAT_MPEG2TS 0x0a
[51] Fix | Delete
#define UVC_VS_FORMAT_DV 0x0c
[52] Fix | Delete
#define UVC_VS_COLORFORMAT 0x0d
[53] Fix | Delete
#define UVC_VS_FORMAT_FRAME_BASED 0x10
[54] Fix | Delete
#define UVC_VS_FRAME_FRAME_BASED 0x11
[55] Fix | Delete
#define UVC_VS_FORMAT_STREAM_BASED 0x12
[56] Fix | Delete
[57] Fix | Delete
/* A.7. Video Class-Specific Endpoint Descriptor Subtypes */
[58] Fix | Delete
#define UVC_EP_UNDEFINED 0x00
[59] Fix | Delete
#define UVC_EP_GENERAL 0x01
[60] Fix | Delete
#define UVC_EP_ENDPOINT 0x02
[61] Fix | Delete
#define UVC_EP_INTERRUPT 0x03
[62] Fix | Delete
[63] Fix | Delete
/* A.8. Video Class-Specific Request Codes */
[64] Fix | Delete
#define UVC_RC_UNDEFINED 0x00
[65] Fix | Delete
#define UVC_SET_CUR 0x01
[66] Fix | Delete
#define UVC_GET_CUR 0x81
[67] Fix | Delete
#define UVC_GET_MIN 0x82
[68] Fix | Delete
#define UVC_GET_MAX 0x83
[69] Fix | Delete
#define UVC_GET_RES 0x84
[70] Fix | Delete
#define UVC_GET_LEN 0x85
[71] Fix | Delete
#define UVC_GET_INFO 0x86
[72] Fix | Delete
#define UVC_GET_DEF 0x87
[73] Fix | Delete
[74] Fix | Delete
/* A.9.1. VideoControl Interface Control Selectors */
[75] Fix | Delete
#define UVC_VC_CONTROL_UNDEFINED 0x00
[76] Fix | Delete
#define UVC_VC_VIDEO_POWER_MODE_CONTROL 0x01
[77] Fix | Delete
#define UVC_VC_REQUEST_ERROR_CODE_CONTROL 0x02
[78] Fix | Delete
[79] Fix | Delete
/* A.9.2. Terminal Control Selectors */
[80] Fix | Delete
#define UVC_TE_CONTROL_UNDEFINED 0x00
[81] Fix | Delete
[82] Fix | Delete
/* A.9.3. Selector Unit Control Selectors */
[83] Fix | Delete
#define UVC_SU_CONTROL_UNDEFINED 0x00
[84] Fix | Delete
#define UVC_SU_INPUT_SELECT_CONTROL 0x01
[85] Fix | Delete
[86] Fix | Delete
/* A.9.4. Camera Terminal Control Selectors */
[87] Fix | Delete
#define UVC_CT_CONTROL_UNDEFINED 0x00
[88] Fix | Delete
#define UVC_CT_SCANNING_MODE_CONTROL 0x01
[89] Fix | Delete
#define UVC_CT_AE_MODE_CONTROL 0x02
[90] Fix | Delete
#define UVC_CT_AE_PRIORITY_CONTROL 0x03
[91] Fix | Delete
#define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04
[92] Fix | Delete
#define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05
[93] Fix | Delete
#define UVC_CT_FOCUS_ABSOLUTE_CONTROL 0x06
[94] Fix | Delete
#define UVC_CT_FOCUS_RELATIVE_CONTROL 0x07
[95] Fix | Delete
#define UVC_CT_FOCUS_AUTO_CONTROL 0x08
[96] Fix | Delete
#define UVC_CT_IRIS_ABSOLUTE_CONTROL 0x09
[97] Fix | Delete
#define UVC_CT_IRIS_RELATIVE_CONTROL 0x0a
[98] Fix | Delete
#define UVC_CT_ZOOM_ABSOLUTE_CONTROL 0x0b
[99] Fix | Delete
#define UVC_CT_ZOOM_RELATIVE_CONTROL 0x0c
[100] Fix | Delete
#define UVC_CT_PANTILT_ABSOLUTE_CONTROL 0x0d
[101] Fix | Delete
#define UVC_CT_PANTILT_RELATIVE_CONTROL 0x0e
[102] Fix | Delete
#define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f
[103] Fix | Delete
#define UVC_CT_ROLL_RELATIVE_CONTROL 0x10
[104] Fix | Delete
#define UVC_CT_PRIVACY_CONTROL 0x11
[105] Fix | Delete
[106] Fix | Delete
/* A.9.5. Processing Unit Control Selectors */
[107] Fix | Delete
#define UVC_PU_CONTROL_UNDEFINED 0x00
[108] Fix | Delete
#define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 0x01
[109] Fix | Delete
#define UVC_PU_BRIGHTNESS_CONTROL 0x02
[110] Fix | Delete
#define UVC_PU_CONTRAST_CONTROL 0x03
[111] Fix | Delete
#define UVC_PU_GAIN_CONTROL 0x04
[112] Fix | Delete
#define UVC_PU_POWER_LINE_FREQUENCY_CONTROL 0x05
[113] Fix | Delete
#define UVC_PU_HUE_CONTROL 0x06
[114] Fix | Delete
#define UVC_PU_SATURATION_CONTROL 0x07
[115] Fix | Delete
#define UVC_PU_SHARPNESS_CONTROL 0x08
[116] Fix | Delete
#define UVC_PU_GAMMA_CONTROL 0x09
[117] Fix | Delete
#define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a
[118] Fix | Delete
#define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b
[119] Fix | Delete
#define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c
[120] Fix | Delete
#define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d
[121] Fix | Delete
#define UVC_PU_DIGITAL_MULTIPLIER_CONTROL 0x0e
[122] Fix | Delete
#define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f
[123] Fix | Delete
#define UVC_PU_HUE_AUTO_CONTROL 0x10
[124] Fix | Delete
#define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11
[125] Fix | Delete
#define UVC_PU_ANALOG_LOCK_STATUS_CONTROL 0x12
[126] Fix | Delete
[127] Fix | Delete
/* A.9.7. VideoStreaming Interface Control Selectors */
[128] Fix | Delete
#define UVC_VS_CONTROL_UNDEFINED 0x00
[129] Fix | Delete
#define UVC_VS_PROBE_CONTROL 0x01
[130] Fix | Delete
#define UVC_VS_COMMIT_CONTROL 0x02
[131] Fix | Delete
#define UVC_VS_STILL_PROBE_CONTROL 0x03
[132] Fix | Delete
#define UVC_VS_STILL_COMMIT_CONTROL 0x04
[133] Fix | Delete
#define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 0x05
[134] Fix | Delete
#define UVC_VS_STREAM_ERROR_CODE_CONTROL 0x06
[135] Fix | Delete
#define UVC_VS_GENERATE_KEY_FRAME_CONTROL 0x07
[136] Fix | Delete
#define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08
[137] Fix | Delete
#define UVC_VS_SYNC_DELAY_CONTROL 0x09
[138] Fix | Delete
[139] Fix | Delete
/* B.1. USB Terminal Types */
[140] Fix | Delete
#define UVC_TT_VENDOR_SPECIFIC 0x0100
[141] Fix | Delete
#define UVC_TT_STREAMING 0x0101
[142] Fix | Delete
[143] Fix | Delete
/* B.2. Input Terminal Types */
[144] Fix | Delete
#define UVC_ITT_VENDOR_SPECIFIC 0x0200
[145] Fix | Delete
#define UVC_ITT_CAMERA 0x0201
[146] Fix | Delete
#define UVC_ITT_MEDIA_TRANSPORT_INPUT 0x0202
[147] Fix | Delete
[148] Fix | Delete
/* B.3. Output Terminal Types */
[149] Fix | Delete
#define UVC_OTT_VENDOR_SPECIFIC 0x0300
[150] Fix | Delete
#define UVC_OTT_DISPLAY 0x0301
[151] Fix | Delete
#define UVC_OTT_MEDIA_TRANSPORT_OUTPUT 0x0302
[152] Fix | Delete
[153] Fix | Delete
/* B.4. External Terminal Types */
[154] Fix | Delete
#define UVC_EXTERNAL_VENDOR_SPECIFIC 0x0400
[155] Fix | Delete
#define UVC_COMPOSITE_CONNECTOR 0x0401
[156] Fix | Delete
#define UVC_SVIDEO_CONNECTOR 0x0402
[157] Fix | Delete
#define UVC_COMPONENT_CONNECTOR 0x0403
[158] Fix | Delete
[159] Fix | Delete
/* 2.4.2.2. Status Packet Type */
[160] Fix | Delete
#define UVC_STATUS_TYPE_CONTROL 1
[161] Fix | Delete
#define UVC_STATUS_TYPE_STREAMING 2
[162] Fix | Delete
[163] Fix | Delete
/* 2.4.3.3. Payload Header Information */
[164] Fix | Delete
#define UVC_STREAM_EOH (1 << 7)
[165] Fix | Delete
#define UVC_STREAM_ERR (1 << 6)
[166] Fix | Delete
#define UVC_STREAM_STI (1 << 5)
[167] Fix | Delete
#define UVC_STREAM_RES (1 << 4)
[168] Fix | Delete
#define UVC_STREAM_SCR (1 << 3)
[169] Fix | Delete
#define UVC_STREAM_PTS (1 << 2)
[170] Fix | Delete
#define UVC_STREAM_EOF (1 << 1)
[171] Fix | Delete
#define UVC_STREAM_FID (1 << 0)
[172] Fix | Delete
[173] Fix | Delete
/* 4.1.2. Control Capabilities */
[174] Fix | Delete
#define UVC_CONTROL_CAP_GET (1 << 0)
[175] Fix | Delete
#define UVC_CONTROL_CAP_SET (1 << 1)
[176] Fix | Delete
#define UVC_CONTROL_CAP_DISABLED (1 << 2)
[177] Fix | Delete
#define UVC_CONTROL_CAP_AUTOUPDATE (1 << 3)
[178] Fix | Delete
#define UVC_CONTROL_CAP_ASYNCHRONOUS (1 << 4)
[179] Fix | Delete
[180] Fix | Delete
/* 3.9.2.6 Color Matching Descriptor Values */
[181] Fix | Delete
enum uvc_color_primaries_values {
[182] Fix | Delete
UVC_COLOR_PRIMARIES_UNSPECIFIED,
[183] Fix | Delete
UVC_COLOR_PRIMARIES_BT_709_SRGB,
[184] Fix | Delete
UVC_COLOR_PRIMARIES_BT_470_2_M,
[185] Fix | Delete
UVC_COLOR_PRIMARIES_BT_470_2_B_G,
[186] Fix | Delete
UVC_COLOR_PRIMARIES_SMPTE_170M,
[187] Fix | Delete
UVC_COLOR_PRIMARIES_SMPTE_240M,
[188] Fix | Delete
};
[189] Fix | Delete
[190] Fix | Delete
enum uvc_transfer_characteristics_values {
[191] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_UNSPECIFIED,
[192] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_BT_709,
[193] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_BT_470_2_M,
[194] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_BT_470_2_B_G,
[195] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_SMPTE_170M,
[196] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_SMPTE_240M,
[197] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_LINEAR,
[198] Fix | Delete
UVC_TRANSFER_CHARACTERISTICS_SRGB,
[199] Fix | Delete
};
[200] Fix | Delete
[201] Fix | Delete
enum uvc_matrix_coefficients {
[202] Fix | Delete
UVC_MATRIX_COEFFICIENTS_UNSPECIFIED,
[203] Fix | Delete
UVC_MATRIX_COEFFICIENTS_BT_709,
[204] Fix | Delete
UVC_MATRIX_COEFFICIENTS_FCC,
[205] Fix | Delete
UVC_MATRIX_COEFFICIENTS_BT_470_2_B_G,
[206] Fix | Delete
UVC_MATRIX_COEFFICIENTS_SMPTE_170M,
[207] Fix | Delete
UVC_MATRIX_COEFFICIENTS_SMPTE_240M,
[208] Fix | Delete
};
[209] Fix | Delete
[210] Fix | Delete
/* ------------------------------------------------------------------------
[211] Fix | Delete
* UVC structures
[212] Fix | Delete
*/
[213] Fix | Delete
[214] Fix | Delete
/* All UVC descriptors have these 3 fields at the beginning */
[215] Fix | Delete
struct uvc_descriptor_header {
[216] Fix | Delete
__u8 bLength;
[217] Fix | Delete
__u8 bDescriptorType;
[218] Fix | Delete
__u8 bDescriptorSubType;
[219] Fix | Delete
} __attribute__((packed));
[220] Fix | Delete
[221] Fix | Delete
/* 3.7.2. Video Control Interface Header Descriptor */
[222] Fix | Delete
struct uvc_header_descriptor {
[223] Fix | Delete
__u8 bLength;
[224] Fix | Delete
__u8 bDescriptorType;
[225] Fix | Delete
__u8 bDescriptorSubType;
[226] Fix | Delete
__le16 bcdUVC;
[227] Fix | Delete
__le16 wTotalLength;
[228] Fix | Delete
__le32 dwClockFrequency;
[229] Fix | Delete
__u8 bInCollection;
[230] Fix | Delete
__u8 baInterfaceNr[];
[231] Fix | Delete
} __attribute__((__packed__));
[232] Fix | Delete
[233] Fix | Delete
#define UVC_DT_HEADER_SIZE(n) (12+(n))
[234] Fix | Delete
[235] Fix | Delete
#define UVC_HEADER_DESCRIPTOR(n) \
[236] Fix | Delete
uvc_header_descriptor_##n
[237] Fix | Delete
[238] Fix | Delete
#define DECLARE_UVC_HEADER_DESCRIPTOR(n) \
[239] Fix | Delete
struct UVC_HEADER_DESCRIPTOR(n) { \
[240] Fix | Delete
__u8 bLength; \
[241] Fix | Delete
__u8 bDescriptorType; \
[242] Fix | Delete
__u8 bDescriptorSubType; \
[243] Fix | Delete
__le16 bcdUVC; \
[244] Fix | Delete
__le16 wTotalLength; \
[245] Fix | Delete
__le32 dwClockFrequency; \
[246] Fix | Delete
__u8 bInCollection; \
[247] Fix | Delete
__u8 baInterfaceNr[n]; \
[248] Fix | Delete
} __attribute__ ((packed))
[249] Fix | Delete
[250] Fix | Delete
/* 3.7.2.1. Input Terminal Descriptor */
[251] Fix | Delete
struct uvc_input_terminal_descriptor {
[252] Fix | Delete
__u8 bLength;
[253] Fix | Delete
__u8 bDescriptorType;
[254] Fix | Delete
__u8 bDescriptorSubType;
[255] Fix | Delete
__u8 bTerminalID;
[256] Fix | Delete
__le16 wTerminalType;
[257] Fix | Delete
__u8 bAssocTerminal;
[258] Fix | Delete
__u8 iTerminal;
[259] Fix | Delete
} __attribute__((__packed__));
[260] Fix | Delete
[261] Fix | Delete
#define UVC_DT_INPUT_TERMINAL_SIZE 8
[262] Fix | Delete
[263] Fix | Delete
/* 3.7.2.2. Output Terminal Descriptor */
[264] Fix | Delete
struct uvc_output_terminal_descriptor {
[265] Fix | Delete
__u8 bLength;
[266] Fix | Delete
__u8 bDescriptorType;
[267] Fix | Delete
__u8 bDescriptorSubType;
[268] Fix | Delete
__u8 bTerminalID;
[269] Fix | Delete
__le16 wTerminalType;
[270] Fix | Delete
__u8 bAssocTerminal;
[271] Fix | Delete
__u8 bSourceID;
[272] Fix | Delete
__u8 iTerminal;
[273] Fix | Delete
} __attribute__((__packed__));
[274] Fix | Delete
[275] Fix | Delete
#define UVC_DT_OUTPUT_TERMINAL_SIZE 9
[276] Fix | Delete
[277] Fix | Delete
/* 3.7.2.3. Camera Terminal Descriptor */
[278] Fix | Delete
struct uvc_camera_terminal_descriptor {
[279] Fix | Delete
__u8 bLength;
[280] Fix | Delete
__u8 bDescriptorType;
[281] Fix | Delete
__u8 bDescriptorSubType;
[282] Fix | Delete
__u8 bTerminalID;
[283] Fix | Delete
__le16 wTerminalType;
[284] Fix | Delete
__u8 bAssocTerminal;
[285] Fix | Delete
__u8 iTerminal;
[286] Fix | Delete
__le16 wObjectiveFocalLengthMin;
[287] Fix | Delete
__le16 wObjectiveFocalLengthMax;
[288] Fix | Delete
__le16 wOcularFocalLength;
[289] Fix | Delete
__u8 bControlSize;
[290] Fix | Delete
__u8 bmControls[3];
[291] Fix | Delete
} __attribute__((__packed__));
[292] Fix | Delete
[293] Fix | Delete
#define UVC_DT_CAMERA_TERMINAL_SIZE(n) (15+(n))
[294] Fix | Delete
[295] Fix | Delete
/* 3.7.2.4. Selector Unit Descriptor */
[296] Fix | Delete
struct uvc_selector_unit_descriptor {
[297] Fix | Delete
__u8 bLength;
[298] Fix | Delete
__u8 bDescriptorType;
[299] Fix | Delete
__u8 bDescriptorSubType;
[300] Fix | Delete
__u8 bUnitID;
[301] Fix | Delete
__u8 bNrInPins;
[302] Fix | Delete
__u8 baSourceID[0];
[303] Fix | Delete
__u8 iSelector;
[304] Fix | Delete
} __attribute__((__packed__));
[305] Fix | Delete
[306] Fix | Delete
#define UVC_DT_SELECTOR_UNIT_SIZE(n) (6+(n))
[307] Fix | Delete
[308] Fix | Delete
#define UVC_SELECTOR_UNIT_DESCRIPTOR(n) \
[309] Fix | Delete
uvc_selector_unit_descriptor_##n
[310] Fix | Delete
[311] Fix | Delete
#define DECLARE_UVC_SELECTOR_UNIT_DESCRIPTOR(n) \
[312] Fix | Delete
struct UVC_SELECTOR_UNIT_DESCRIPTOR(n) { \
[313] Fix | Delete
__u8 bLength; \
[314] Fix | Delete
__u8 bDescriptorType; \
[315] Fix | Delete
__u8 bDescriptorSubType; \
[316] Fix | Delete
__u8 bUnitID; \
[317] Fix | Delete
__u8 bNrInPins; \
[318] Fix | Delete
__u8 baSourceID[n]; \
[319] Fix | Delete
__u8 iSelector; \
[320] Fix | Delete
} __attribute__ ((packed))
[321] Fix | Delete
[322] Fix | Delete
/* 3.7.2.5. Processing Unit Descriptor */
[323] Fix | Delete
struct uvc_processing_unit_descriptor {
[324] Fix | Delete
__u8 bLength;
[325] Fix | Delete
__u8 bDescriptorType;
[326] Fix | Delete
__u8 bDescriptorSubType;
[327] Fix | Delete
__u8 bUnitID;
[328] Fix | Delete
__u8 bSourceID;
[329] Fix | Delete
__le16 wMaxMultiplier;
[330] Fix | Delete
__u8 bControlSize;
[331] Fix | Delete
__u8 bmControls[2];
[332] Fix | Delete
__u8 iProcessing;
[333] Fix | Delete
__u8 bmVideoStandards;
[334] Fix | Delete
} __attribute__((__packed__));
[335] Fix | Delete
[336] Fix | Delete
#define UVC_DT_PROCESSING_UNIT_SIZE(n) (10+(n))
[337] Fix | Delete
[338] Fix | Delete
/* 3.7.2.6. Extension Unit Descriptor */
[339] Fix | Delete
struct uvc_extension_unit_descriptor {
[340] Fix | Delete
__u8 bLength;
[341] Fix | Delete
__u8 bDescriptorType;
[342] Fix | Delete
__u8 bDescriptorSubType;
[343] Fix | Delete
__u8 bUnitID;
[344] Fix | Delete
__u8 guidExtensionCode[16];
[345] Fix | Delete
__u8 bNumControls;
[346] Fix | Delete
__u8 bNrInPins;
[347] Fix | Delete
__u8 baSourceID[0];
[348] Fix | Delete
__u8 bControlSize;
[349] Fix | Delete
__u8 bmControls[0];
[350] Fix | Delete
__u8 iExtension;
[351] Fix | Delete
} __attribute__((__packed__));
[352] Fix | Delete
[353] Fix | Delete
#define UVC_DT_EXTENSION_UNIT_SIZE(p, n) (24+(p)+(n))
[354] Fix | Delete
[355] Fix | Delete
#define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \
[356] Fix | Delete
uvc_extension_unit_descriptor_##p_##n
[357] Fix | Delete
[358] Fix | Delete
#define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) \
[359] Fix | Delete
struct UVC_EXTENSION_UNIT_DESCRIPTOR(p, n) { \
[360] Fix | Delete
__u8 bLength; \
[361] Fix | Delete
__u8 bDescriptorType; \
[362] Fix | Delete
__u8 bDescriptorSubType; \
[363] Fix | Delete
__u8 bUnitID; \
[364] Fix | Delete
__u8 guidExtensionCode[16]; \
[365] Fix | Delete
__u8 bNumControls; \
[366] Fix | Delete
__u8 bNrInPins; \
[367] Fix | Delete
__u8 baSourceID[p]; \
[368] Fix | Delete
__u8 bControlSize; \
[369] Fix | Delete
__u8 bmControls[n]; \
[370] Fix | Delete
__u8 iExtension; \
[371] Fix | Delete
} __attribute__ ((packed))
[372] Fix | Delete
[373] Fix | Delete
/* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */
[374] Fix | Delete
struct uvc_control_endpoint_descriptor {
[375] Fix | Delete
__u8 bLength;
[376] Fix | Delete
__u8 bDescriptorType;
[377] Fix | Delete
__u8 bDescriptorSubType;
[378] Fix | Delete
__le16 wMaxTransferSize;
[379] Fix | Delete
} __attribute__((__packed__));
[380] Fix | Delete
[381] Fix | Delete
#define UVC_DT_CONTROL_ENDPOINT_SIZE 5
[382] Fix | Delete
[383] Fix | Delete
/* 3.9.2.1. Input Header Descriptor */
[384] Fix | Delete
struct uvc_input_header_descriptor {
[385] Fix | Delete
__u8 bLength;
[386] Fix | Delete
__u8 bDescriptorType;
[387] Fix | Delete
__u8 bDescriptorSubType;
[388] Fix | Delete
__u8 bNumFormats;
[389] Fix | Delete
__le16 wTotalLength;
[390] Fix | Delete
__u8 bEndpointAddress;
[391] Fix | Delete
__u8 bmInfo;
[392] Fix | Delete
__u8 bTerminalLink;
[393] Fix | Delete
__u8 bStillCaptureMethod;
[394] Fix | Delete
__u8 bTriggerSupport;
[395] Fix | Delete
__u8 bTriggerUsage;
[396] Fix | Delete
__u8 bControlSize;
[397] Fix | Delete
__u8 bmaControls[];
[398] Fix | Delete
} __attribute__((__packed__));
[399] Fix | Delete
[400] Fix | Delete
#define UVC_DT_INPUT_HEADER_SIZE(n, p) (13+(n*p))
[401] Fix | Delete
[402] Fix | Delete
#define UVC_INPUT_HEADER_DESCRIPTOR(n, p) \
[403] Fix | Delete
uvc_input_header_descriptor_##n_##p
[404] Fix | Delete
[405] Fix | Delete
#define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p) \
[406] Fix | Delete
struct UVC_INPUT_HEADER_DESCRIPTOR(n, p) { \
[407] Fix | Delete
__u8 bLength; \
[408] Fix | Delete
__u8 bDescriptorType; \
[409] Fix | Delete
__u8 bDescriptorSubType; \
[410] Fix | Delete
__u8 bNumFormats; \
[411] Fix | Delete
__le16 wTotalLength; \
[412] Fix | Delete
__u8 bEndpointAddress; \
[413] Fix | Delete
__u8 bmInfo; \
[414] Fix | Delete
__u8 bTerminalLink; \
[415] Fix | Delete
__u8 bStillCaptureMethod; \
[416] Fix | Delete
__u8 bTriggerSupport; \
[417] Fix | Delete
__u8 bTriggerUsage; \
[418] Fix | Delete
__u8 bControlSize; \
[419] Fix | Delete
__u8 bmaControls[p][n]; \
[420] Fix | Delete
} __attribute__ ((packed))
[421] Fix | Delete
[422] Fix | Delete
/* 3.9.2.2. Output Header Descriptor */
[423] Fix | Delete
struct uvc_output_header_descriptor {
[424] Fix | Delete
__u8 bLength;
[425] Fix | Delete
__u8 bDescriptorType;
[426] Fix | Delete
__u8 bDescriptorSubType;
[427] Fix | Delete
__u8 bNumFormats;
[428] Fix | Delete
__le16 wTotalLength;
[429] Fix | Delete
__u8 bEndpointAddress;
[430] Fix | Delete
__u8 bTerminalLink;
[431] Fix | Delete
__u8 bControlSize;
[432] Fix | Delete
__u8 bmaControls[];
[433] Fix | Delete
} __attribute__((__packed__));
[434] Fix | Delete
[435] Fix | Delete
#define UVC_DT_OUTPUT_HEADER_SIZE(n, p) (9+(n*p))
[436] Fix | Delete
[437] Fix | Delete
#define UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \
[438] Fix | Delete
uvc_output_header_descriptor_##n_##p
[439] Fix | Delete
[440] Fix | Delete
#define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) \
[441] Fix | Delete
struct UVC_OUTPUT_HEADER_DESCRIPTOR(n, p) { \
[442] Fix | Delete
__u8 bLength; \
[443] Fix | Delete
__u8 bDescriptorType; \
[444] Fix | Delete
__u8 bDescriptorSubType; \
[445] Fix | Delete
__u8 bNumFormats; \
[446] Fix | Delete
__le16 wTotalLength; \
[447] Fix | Delete
__u8 bEndpointAddress; \
[448] Fix | Delete
__u8 bTerminalLink; \
[449] Fix | Delete
__u8 bControlSize; \
[450] Fix | Delete
__u8 bmaControls[p][n]; \
[451] Fix | Delete
} __attribute__ ((packed))
[452] Fix | Delete
[453] Fix | Delete
/* 3.9.2.6. Color matching descriptor */
[454] Fix | Delete
struct uvc_color_matching_descriptor {
[455] Fix | Delete
__u8 bLength;
[456] Fix | Delete
__u8 bDescriptorType;
[457] Fix | Delete
__u8 bDescriptorSubType;
[458] Fix | Delete
__u8 bColorPrimaries;
[459] Fix | Delete
__u8 bTransferCharacteristics;
[460] Fix | Delete
__u8 bMatrixCoefficients;
[461] Fix | Delete
} __attribute__((__packed__));
[462] Fix | Delete
[463] Fix | Delete
#define UVC_DT_COLOR_MATCHING_SIZE 6
[464] Fix | Delete
[465] Fix | Delete
/* 4.3.1.1. Video Probe and Commit Controls */
[466] Fix | Delete
struct uvc_streaming_control {
[467] Fix | Delete
__u16 bmHint;
[468] Fix | Delete
__u8 bFormatIndex;
[469] Fix | Delete
__u8 bFrameIndex;
[470] Fix | Delete
__u32 dwFrameInterval;
[471] Fix | Delete
__u16 wKeyFrameRate;
[472] Fix | Delete
__u16 wPFrameRate;
[473] Fix | Delete
__u16 wCompQuality;
[474] Fix | Delete
__u16 wCompWindowSize;
[475] Fix | Delete
__u16 wDelay;
[476] Fix | Delete
__u32 dwMaxVideoFrameSize;
[477] Fix | Delete
__u32 dwMaxPayloadTransferSize;
[478] Fix | Delete
__u32 dwClockFrequency;
[479] Fix | Delete
__u8 bmFramingInfo;
[480] Fix | Delete
__u8 bPreferedVersion;
[481] Fix | Delete
__u8 bMinVersion;
[482] Fix | Delete
__u8 bMaxVersion;
[483] Fix | Delete
} __attribute__((__packed__));
[484] Fix | Delete
[485] Fix | Delete
/* Uncompressed Payload - 3.1.1. Uncompressed Video Format Descriptor */
[486] Fix | Delete
struct uvc_format_uncompressed {
[487] Fix | Delete
__u8 bLength;
[488] Fix | Delete
__u8 bDescriptorType;
[489] Fix | Delete
__u8 bDescriptorSubType;
[490] Fix | Delete
__u8 bFormatIndex;
[491] Fix | Delete
__u8 bNumFrameDescriptors;
[492] Fix | Delete
__u8 guidFormat[16];
[493] Fix | Delete
__u8 bBitsPerPixel;
[494] Fix | Delete
__u8 bDefaultFrameIndex;
[495] Fix | Delete
__u8 bAspectRatioX;
[496] Fix | Delete
__u8 bAspectRatioY;
[497] Fix | Delete
__u8 bmInterfaceFlags;
[498] Fix | Delete
__u8 bCopyProtect;
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function