video.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*
  2. * USB Video Class definitions.
  3. *
  4. * Copyright (C) 2009 Laurent Pinchart <laurent.pinchart@skynet.be>
  5. *
  6. * This file holds USB constants and structures defined by the USB Device
  7. * Class Definition for Video Devices. Unless otherwise stated, comments
  8. * below reference relevant sections of the USB Video Class 1.1 specification
  9. * available at
  10. *
  11. * http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip
  12. */
  13. #ifndef __LINUX_USB_VIDEO_H
  14. #define __LINUX_USB_VIDEO_H
  15. #include <linux/types.h>
  16. /* --------------------------------------------------------------------------
  17. * UVC constants
  18. */
  19. /* A.2. Video Interface Subclass Codes */
  20. #define UVC_SC_UNDEFINED 0x00
  21. #define UVC_SC_VIDEOCONTROL 0x01
  22. #define UVC_SC_VIDEOSTREAMING 0x02
  23. #define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03
  24. /* A.3. Video Interface Protocol Codes */
  25. #define UVC_PC_PROTOCOL_UNDEFINED 0x00
  26. /* A.5. Video Class-Specific VC Interface Descriptor Subtypes */
  27. #define UVC_VC_DESCRIPTOR_UNDEFINED 0x00
  28. #define UVC_VC_HEADER 0x01
  29. #define UVC_VC_INPUT_TERMINAL 0x02
  30. #define UVC_VC_OUTPUT_TERMINAL 0x03
  31. #define UVC_VC_SELECTOR_UNIT 0x04
  32. #define UVC_VC_PROCESSING_UNIT 0x05
  33. #define UVC_VC_EXTENSION_UNIT 0x06
  34. /* A.6. Video Class-Specific VS Interface Descriptor Subtypes */
  35. #define UVC_VS_UNDEFINED 0x00
  36. #define UVC_VS_INPUT_HEADER 0x01
  37. #define UVC_VS_OUTPUT_HEADER 0x02
  38. #define UVC_VS_STILL_IMAGE_FRAME 0x03
  39. #define UVC_VS_FORMAT_UNCOMPRESSED 0x04
  40. #define UVC_VS_FRAME_UNCOMPRESSED 0x05
  41. #define UVC_VS_FORMAT_MJPEG 0x06
  42. #define UVC_VS_FRAME_MJPEG 0x07
  43. #define UVC_VS_FORMAT_MPEG2TS 0x0a
  44. #define UVC_VS_FORMAT_DV 0x0c
  45. #define UVC_VS_COLORFORMAT 0x0d
  46. #define UVC_VS_FORMAT_FRAME_BASED 0x10
  47. #define UVC_VS_FRAME_FRAME_BASED 0x11
  48. #define UVC_VS_FORMAT_STREAM_BASED 0x12
  49. /* A.7. Video Class-Specific Endpoint Descriptor Subtypes */
  50. #define UVC_EP_UNDEFINED 0x00
  51. #define UVC_EP_GENERAL 0x01
  52. #define UVC_EP_ENDPOINT 0x02
  53. #define UVC_EP_INTERRUPT 0x03
  54. /* A.8. Video Class-Specific Request Codes */
  55. #define UVC_RC_UNDEFINED 0x00
  56. #define UVC_SET_CUR 0x01
  57. #define UVC_GET_CUR 0x81
  58. #define UVC_GET_MIN 0x82
  59. #define UVC_GET_MAX 0x83
  60. #define UVC_GET_RES 0x84
  61. #define UVC_GET_LEN 0x85
  62. #define UVC_GET_INFO 0x86
  63. #define UVC_GET_DEF 0x87
  64. /* A.9.1. VideoControl Interface Control Selectors */
  65. #define UVC_VC_CONTROL_UNDEFINED 0x00
  66. #define UVC_VC_VIDEO_POWER_MODE_CONTROL 0x01
  67. #define UVC_VC_REQUEST_ERROR_CODE_CONTROL 0x02
  68. /* A.9.2. Terminal Control Selectors */
  69. #define UVC_TE_CONTROL_UNDEFINED 0x00
  70. /* A.9.3. Selector Unit Control Selectors */
  71. #define UVC_SU_CONTROL_UNDEFINED 0x00
  72. #define UVC_SU_INPUT_SELECT_CONTROL 0x01
  73. /* A.9.4. Camera Terminal Control Selectors */
  74. #define UVC_CT_CONTROL_UNDEFINED 0x00
  75. #define UVC_CT_SCANNING_MODE_CONTROL 0x01
  76. #define UVC_CT_AE_MODE_CONTROL 0x02
  77. #define UVC_CT_AE_PRIORITY_CONTROL 0x03
  78. #define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04
  79. #define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05
  80. #define UVC_CT_FOCUS_ABSOLUTE_CONTROL 0x06
  81. #define UVC_CT_FOCUS_RELATIVE_CONTROL 0x07
  82. #define UVC_CT_FOCUS_AUTO_CONTROL 0x08
  83. #define UVC_CT_IRIS_ABSOLUTE_CONTROL 0x09
  84. #define UVC_CT_IRIS_RELATIVE_CONTROL 0x0a
  85. #define UVC_CT_ZOOM_ABSOLUTE_CONTROL 0x0b
  86. #define UVC_CT_ZOOM_RELATIVE_CONTROL 0x0c
  87. #define UVC_CT_PANTILT_ABSOLUTE_CONTROL 0x0d
  88. #define UVC_CT_PANTILT_RELATIVE_CONTROL 0x0e
  89. #define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f
  90. #define UVC_CT_ROLL_RELATIVE_CONTROL 0x10
  91. #define UVC_CT_PRIVACY_CONTROL 0x11
  92. /* A.9.5. Processing Unit Control Selectors */
  93. #define UVC_PU_CONTROL_UNDEFINED 0x00
  94. #define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 0x01
  95. #define UVC_PU_BRIGHTNESS_CONTROL 0x02
  96. #define UVC_PU_CONTRAST_CONTROL 0x03
  97. #define UVC_PU_GAIN_CONTROL 0x04
  98. #define UVC_PU_POWER_LINE_FREQUENCY_CONTROL 0x05
  99. #define UVC_PU_HUE_CONTROL 0x06
  100. #define UVC_PU_SATURATION_CONTROL 0x07
  101. #define UVC_PU_SHARPNESS_CONTROL 0x08
  102. #define UVC_PU_GAMMA_CONTROL 0x09
  103. #define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a
  104. #define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b
  105. #define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c
  106. #define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d
  107. #define UVC_PU_DIGITAL_MULTIPLIER_CONTROL 0x0e
  108. #define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f
  109. #define UVC_PU_HUE_AUTO_CONTROL 0x10
  110. #define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11
  111. #define UVC_PU_ANALOG_LOCK_STATUS_CONTROL 0x12
  112. /* A.9.7. VideoStreaming Interface Control Selectors */
  113. #define UVC_VS_CONTROL_UNDEFINED 0x00
  114. #define UVC_VS_PROBE_CONTROL 0x01
  115. #define UVC_VS_COMMIT_CONTROL 0x02
  116. #define UVC_VS_STILL_PROBE_CONTROL 0x03
  117. #define UVC_VS_STILL_COMMIT_CONTROL 0x04
  118. #define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 0x05
  119. #define UVC_VS_STREAM_ERROR_CODE_CONTROL 0x06
  120. #define UVC_VS_GENERATE_KEY_FRAME_CONTROL 0x07
  121. #define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08
  122. #define UVC_VS_SYNC_DELAY_CONTROL 0x09
  123. /* B.1. USB Terminal Types */
  124. #define UVC_TT_VENDOR_SPECIFIC 0x0100
  125. #define UVC_TT_STREAMING 0x0101
  126. /* B.2. Input Terminal Types */
  127. #define UVC_ITT_VENDOR_SPECIFIC 0x0200
  128. #define UVC_ITT_CAMERA 0x0201
  129. #define UVC_ITT_MEDIA_TRANSPORT_INPUT 0x0202
  130. /* B.3. Output Terminal Types */
  131. #define UVC_OTT_VENDOR_SPECIFIC 0x0300
  132. #define UVC_OTT_DISPLAY 0x0301
  133. #define UVC_OTT_MEDIA_TRANSPORT_OUTPUT 0x0302
  134. /* B.4. External Terminal Types */
  135. #define UVC_EXTERNAL_VENDOR_SPECIFIC 0x0400
  136. #define UVC_COMPOSITE_CONNECTOR 0x0401
  137. #define UVC_SVIDEO_CONNECTOR 0x0402
  138. #define UVC_COMPONENT_CONNECTOR 0x0403
  139. /* 2.4.2.2. Status Packet Type */
  140. #define UVC_STATUS_TYPE_CONTROL 1
  141. #define UVC_STATUS_TYPE_STREAMING 2
  142. #endif /* __LINUX_USB_VIDEO_H */