linux/include/uapi/linux/usb/video.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * USB Video Class definitions.
 *
 * Copyright (C) 2009 Laurent Pinchart <[email protected]>
 *
 * This file holds USB constants and structures defined by the USB Device
 * Class Definition for Video Devices. Unless otherwise stated, comments
 * below reference relevant sections of the USB Video Class 1.1 specification
 * available at
 *
 * http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip
 */

#ifndef __LINUX_USB_VIDEO_H
#define __LINUX_USB_VIDEO_H

#include <linux/types.h>

/* --------------------------------------------------------------------------
 * UVC constants
 */

/* A.2. Video Interface Subclass Codes */
#define UVC_SC_UNDEFINED
#define UVC_SC_VIDEOCONTROL
#define UVC_SC_VIDEOSTREAMING
#define UVC_SC_VIDEO_INTERFACE_COLLECTION

/* A.3. Video Interface Protocol Codes */
#define UVC_PC_PROTOCOL_UNDEFINED
#define UVC_PC_PROTOCOL_15

/* A.5. Video Class-Specific VC Interface Descriptor Subtypes */
#define UVC_VC_DESCRIPTOR_UNDEFINED
#define UVC_VC_HEADER
#define UVC_VC_INPUT_TERMINAL
#define UVC_VC_OUTPUT_TERMINAL
#define UVC_VC_SELECTOR_UNIT
#define UVC_VC_PROCESSING_UNIT
#define UVC_VC_EXTENSION_UNIT

/* A.6. Video Class-Specific VS Interface Descriptor Subtypes */
#define UVC_VS_UNDEFINED
#define UVC_VS_INPUT_HEADER
#define UVC_VS_OUTPUT_HEADER
#define UVC_VS_STILL_IMAGE_FRAME
#define UVC_VS_FORMAT_UNCOMPRESSED
#define UVC_VS_FRAME_UNCOMPRESSED
#define UVC_VS_FORMAT_MJPEG
#define UVC_VS_FRAME_MJPEG
#define UVC_VS_FORMAT_MPEG2TS
#define UVC_VS_FORMAT_DV
#define UVC_VS_COLORFORMAT
#define UVC_VS_FORMAT_FRAME_BASED
#define UVC_VS_FRAME_FRAME_BASED
#define UVC_VS_FORMAT_STREAM_BASED

/* A.7. Video Class-Specific Endpoint Descriptor Subtypes */
#define UVC_EP_UNDEFINED
#define UVC_EP_GENERAL
#define UVC_EP_ENDPOINT
#define UVC_EP_INTERRUPT

/* A.8. Video Class-Specific Request Codes */
#define UVC_RC_UNDEFINED
#define UVC_SET_CUR
#define UVC_GET_CUR
#define UVC_GET_MIN
#define UVC_GET_MAX
#define UVC_GET_RES
#define UVC_GET_LEN
#define UVC_GET_INFO
#define UVC_GET_DEF

/* A.9.1. VideoControl Interface Control Selectors */
#define UVC_VC_CONTROL_UNDEFINED
#define UVC_VC_VIDEO_POWER_MODE_CONTROL
#define UVC_VC_REQUEST_ERROR_CODE_CONTROL

/* A.9.2. Terminal Control Selectors */
#define UVC_TE_CONTROL_UNDEFINED

/* A.9.3. Selector Unit Control Selectors */
#define UVC_SU_CONTROL_UNDEFINED
#define UVC_SU_INPUT_SELECT_CONTROL

/* A.9.4. Camera Terminal Control Selectors */
#define UVC_CT_CONTROL_UNDEFINED
#define UVC_CT_SCANNING_MODE_CONTROL
#define UVC_CT_AE_MODE_CONTROL
#define UVC_CT_AE_PRIORITY_CONTROL
#define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL
#define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL
#define UVC_CT_FOCUS_ABSOLUTE_CONTROL
#define UVC_CT_FOCUS_RELATIVE_CONTROL
#define UVC_CT_FOCUS_AUTO_CONTROL
#define UVC_CT_IRIS_ABSOLUTE_CONTROL
#define UVC_CT_IRIS_RELATIVE_CONTROL
#define UVC_CT_ZOOM_ABSOLUTE_CONTROL
#define UVC_CT_ZOOM_RELATIVE_CONTROL
#define UVC_CT_PANTILT_ABSOLUTE_CONTROL
#define UVC_CT_PANTILT_RELATIVE_CONTROL
#define UVC_CT_ROLL_ABSOLUTE_CONTROL
#define UVC_CT_ROLL_RELATIVE_CONTROL
#define UVC_CT_PRIVACY_CONTROL

/* A.9.5. Processing Unit Control Selectors */
#define UVC_PU_CONTROL_UNDEFINED
#define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL
#define UVC_PU_BRIGHTNESS_CONTROL
#define UVC_PU_CONTRAST_CONTROL
#define UVC_PU_GAIN_CONTROL
#define UVC_PU_POWER_LINE_FREQUENCY_CONTROL
#define UVC_PU_HUE_CONTROL
#define UVC_PU_SATURATION_CONTROL
#define UVC_PU_SHARPNESS_CONTROL
#define UVC_PU_GAMMA_CONTROL
#define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL
#define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL
#define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL
#define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL
#define UVC_PU_DIGITAL_MULTIPLIER_CONTROL
#define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL
#define UVC_PU_HUE_AUTO_CONTROL
#define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL
#define UVC_PU_ANALOG_LOCK_STATUS_CONTROL

/* A.9.7. VideoStreaming Interface Control Selectors */
#define UVC_VS_CONTROL_UNDEFINED
#define UVC_VS_PROBE_CONTROL
#define UVC_VS_COMMIT_CONTROL
#define UVC_VS_STILL_PROBE_CONTROL
#define UVC_VS_STILL_COMMIT_CONTROL
#define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL
#define UVC_VS_STREAM_ERROR_CODE_CONTROL
#define UVC_VS_GENERATE_KEY_FRAME_CONTROL
#define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL
#define UVC_VS_SYNC_DELAY_CONTROL

/* B.1. USB Terminal Types */
#define UVC_TT_VENDOR_SPECIFIC
#define UVC_TT_STREAMING

/* B.2. Input Terminal Types */
#define UVC_ITT_VENDOR_SPECIFIC
#define UVC_ITT_CAMERA
#define UVC_ITT_MEDIA_TRANSPORT_INPUT

/* B.3. Output Terminal Types */
#define UVC_OTT_VENDOR_SPECIFIC
#define UVC_OTT_DISPLAY
#define UVC_OTT_MEDIA_TRANSPORT_OUTPUT

/* B.4. External Terminal Types */
#define UVC_EXTERNAL_VENDOR_SPECIFIC
#define UVC_COMPOSITE_CONNECTOR
#define UVC_SVIDEO_CONNECTOR
#define UVC_COMPONENT_CONNECTOR

/* 2.4.2.2. Status Packet Type */
#define UVC_STATUS_TYPE_CONTROL
#define UVC_STATUS_TYPE_STREAMING

/* 2.4.3.3. Payload Header Information */
#define UVC_STREAM_EOH
#define UVC_STREAM_ERR
#define UVC_STREAM_STI
#define UVC_STREAM_RES
#define UVC_STREAM_SCR
#define UVC_STREAM_PTS
#define UVC_STREAM_EOF
#define UVC_STREAM_FID

/* 4.1.2. Control Capabilities */
#define UVC_CONTROL_CAP_GET
#define UVC_CONTROL_CAP_SET
#define UVC_CONTROL_CAP_DISABLED
#define UVC_CONTROL_CAP_AUTOUPDATE
#define UVC_CONTROL_CAP_ASYNCHRONOUS

/* 3.9.2.6 Color Matching Descriptor Values */
enum uvc_color_primaries_values {};

enum uvc_transfer_characteristics_values {};

enum uvc_matrix_coefficients {};

/* ------------------------------------------------------------------------
 * UVC structures
 */

/* All UVC descriptors have these 3 fields at the beginning */
struct uvc_descriptor_header {} __attribute__((packed));

/* 3.7.2. Video Control Interface Header Descriptor */
struct uvc_header_descriptor {} __attribute__((packed));

#define UVC_DT_HEADER_SIZE(n)

#define UVC_HEADER_DESCRIPTOR(n)

#define DECLARE_UVC_HEADER_DESCRIPTOR(n)

/* 3.7.2.1. Input Terminal Descriptor */
struct uvc_input_terminal_descriptor {} __attribute__((packed));

#define UVC_DT_INPUT_TERMINAL_SIZE

/* 3.7.2.2. Output Terminal Descriptor */
struct uvc_output_terminal_descriptor {} __attribute__((packed));

#define UVC_DT_OUTPUT_TERMINAL_SIZE

/* 3.7.2.3. Camera Terminal Descriptor */
struct uvc_camera_terminal_descriptor {} __attribute__((packed));

#define UVC_DT_CAMERA_TERMINAL_SIZE(n)

/* 3.7.2.4. Selector Unit Descriptor */
struct uvc_selector_unit_descriptor {} __attribute__((packed));

#define UVC_DT_SELECTOR_UNIT_SIZE(n)

#define UVC_SELECTOR_UNIT_DESCRIPTOR(n)

#define DECLARE_UVC_SELECTOR_UNIT_DESCRIPTOR(n)

/* 3.7.2.5. Processing Unit Descriptor */
struct uvc_processing_unit_descriptor {} __attribute__((packed));

#define UVC_DT_PROCESSING_UNIT_SIZE(n)

/* 3.7.2.6. Extension Unit Descriptor */
struct uvc_extension_unit_descriptor {} __attribute__((packed));

#define UVC_DT_EXTENSION_UNIT_SIZE(p, n)

#define UVC_EXTENSION_UNIT_DESCRIPTOR(p, n)

#define DECLARE_UVC_EXTENSION_UNIT_DESCRIPTOR(p, n)

/* 3.8.2.2. Video Control Interrupt Endpoint Descriptor */
struct uvc_control_endpoint_descriptor {} __attribute__((packed));

#define UVC_DT_CONTROL_ENDPOINT_SIZE

/* 3.9.2.1. Input Header Descriptor */
struct uvc_input_header_descriptor {} __attribute__((packed));

#define UVC_DT_INPUT_HEADER_SIZE(n, p)

#define UVC_INPUT_HEADER_DESCRIPTOR(n, p)

#define DECLARE_UVC_INPUT_HEADER_DESCRIPTOR(n, p)

/* 3.9.2.2. Output Header Descriptor */
struct uvc_output_header_descriptor {} __attribute__((packed));

#define UVC_DT_OUTPUT_HEADER_SIZE(n, p)

#define UVC_OUTPUT_HEADER_DESCRIPTOR(n, p)

#define DECLARE_UVC_OUTPUT_HEADER_DESCRIPTOR(n, p)

/* 3.9.2.6. Color matching descriptor */
struct uvc_color_matching_descriptor {} __attribute__((packed));

#define UVC_DT_COLOR_MATCHING_SIZE

/* 4.3.1.1. Video Probe and Commit Controls */
struct uvc_streaming_control {} __attribute__((packed));

/* Uncompressed Payload - 3.1.1. Uncompressed Video Format Descriptor */
struct uvc_format_uncompressed {} __attribute__((packed));

#define UVC_DT_FORMAT_UNCOMPRESSED_SIZE

/* Uncompressed Payload - 3.1.2. Uncompressed Video Frame Descriptor */
struct uvc_frame_uncompressed {} __attribute__((packed));

#define UVC_DT_FRAME_UNCOMPRESSED_SIZE(n)

#define UVC_FRAME_UNCOMPRESSED(n)

#define DECLARE_UVC_FRAME_UNCOMPRESSED(n)

/* MJPEG Payload - 3.1.1. MJPEG Video Format Descriptor */
struct uvc_format_mjpeg {} __attribute__((packed));

#define UVC_DT_FORMAT_MJPEG_SIZE

/* MJPEG Payload - 3.1.2. MJPEG Video Frame Descriptor */
struct uvc_frame_mjpeg {} __attribute__((packed));

#define UVC_DT_FRAME_MJPEG_SIZE(n)

#define UVC_FRAME_MJPEG(n)

#define DECLARE_UVC_FRAME_MJPEG(n)

#endif /* __LINUX_USB_VIDEO_H */