ext-ctrls-dv.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. .. _dv-controls:
  4. *******************************
  5. Digital Video Control Reference
  6. *******************************
  7. The Digital Video control class is intended to control receivers and
  8. transmitters for `VGA <http://en.wikipedia.org/wiki/Vga>`__,
  9. `DVI <http://en.wikipedia.org/wiki/Digital_Visual_Interface>`__
  10. (Digital Visual Interface), HDMI (:ref:`hdmi`) and DisplayPort
  11. (:ref:`dp`). These controls are generally expected to be private to
  12. the receiver or transmitter subdevice that implements them, so they are
  13. only exposed on the ``/dev/v4l-subdev*`` device node.
  14. .. note::
  15. Note that these devices can have multiple input or output pads which are
  16. hooked up to e.g. HDMI connectors. Even though the subdevice will
  17. receive or transmit video from/to only one of those pads, the other pads
  18. can still be active when it comes to EDID (Extended Display
  19. Identification Data, :ref:`vesaedid`) and HDCP (High-bandwidth Digital
  20. Content Protection System, :ref:`hdcp`) processing, allowing the
  21. device to do the fairly slow EDID/HDCP handling in advance. This allows
  22. for quick switching between connectors.
  23. These pads appear in several of the controls in this section as
  24. bitmasks, one bit for each pad. Bit 0 corresponds to pad 0, bit 1 to pad
  25. 1, etc. The maximum value of the control is the set of valid pads.
  26. .. _dv-control-id:
  27. Digital Video Control IDs
  28. =========================
  29. ``V4L2_CID_DV_CLASS (class)``
  30. The Digital Video class descriptor.
  31. ``V4L2_CID_DV_TX_HOTPLUG (bitmask)``
  32. Many connectors have a hotplug pin which is high if EDID information
  33. is available from the source. This control shows the state of the
  34. hotplug pin as seen by the transmitter. Each bit corresponds to an
  35. output pad on the transmitter. If an output pad does not have an
  36. associated hotplug pin, then the bit for that pad will be 0. This
  37. read-only control is applicable to DVI-D, HDMI and DisplayPort
  38. connectors.
  39. ``V4L2_CID_DV_TX_RXSENSE (bitmask)``
  40. Rx Sense is the detection of pull-ups on the TMDS clock lines. This
  41. normally means that the sink has left/entered standby (i.e. the
  42. transmitter can sense that the receiver is ready to receive video).
  43. Each bit corresponds to an output pad on the transmitter. If an
  44. output pad does not have an associated Rx Sense, then the bit for
  45. that pad will be 0. This read-only control is applicable to DVI-D
  46. and HDMI devices.
  47. ``V4L2_CID_DV_TX_EDID_PRESENT (bitmask)``
  48. When the transmitter sees the hotplug signal from the receiver it
  49. will attempt to read the EDID. If set, then the transmitter has read
  50. at least the first block (= 128 bytes). Each bit corresponds to an
  51. output pad on the transmitter. If an output pad does not support
  52. EDIDs, then the bit for that pad will be 0. This read-only control
  53. is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors.
  54. ``V4L2_CID_DV_TX_MODE``
  55. (enum)
  56. enum v4l2_dv_tx_mode -
  57. HDMI transmitters can transmit in DVI-D mode (just video) or in HDMI
  58. mode (video + audio + auxiliary data). This control selects which
  59. mode to use: V4L2_DV_TX_MODE_DVI_D or V4L2_DV_TX_MODE_HDMI.
  60. This control is applicable to HDMI connectors.
  61. ``V4L2_CID_DV_TX_RGB_RANGE``
  62. (enum)
  63. enum v4l2_dv_rgb_range -
  64. Select the quantization range for RGB output. V4L2_DV_RANGE_AUTO
  65. follows the RGB quantization range specified in the standard for the
  66. video interface (ie. :ref:`cea861` for HDMI).
  67. V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
  68. standard to be compatible with sinks that have not implemented the
  69. standard correctly (unfortunately quite common for HDMI and DVI-D).
  70. Full range allows all possible values to be used whereas limited
  71. range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
  72. the number of bits per component. This control is applicable to VGA,
  73. DVI-A/D, HDMI and DisplayPort connectors.
  74. ``V4L2_CID_DV_TX_IT_CONTENT_TYPE``
  75. (enum)
  76. enum v4l2_dv_it_content_type -
  77. Configures the IT Content Type of the transmitted video. This
  78. information is sent over HDMI and DisplayPort connectors as part of
  79. the AVI InfoFrame. The term 'IT Content' is used for content that
  80. originates from a computer as opposed to content from a TV broadcast
  81. or an analog source. The enum v4l2_dv_it_content_type defines
  82. the possible content types:
  83. .. tabularcolumns:: |p{7.3cm}|p{10.2cm}|
  84. .. flat-table::
  85. :header-rows: 0
  86. :stub-columns: 0
  87. * - ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS``
  88. - Graphics content. Pixel data should be passed unfiltered and
  89. without analog reconstruction.
  90. * - ``V4L2_DV_IT_CONTENT_TYPE_PHOTO``
  91. - Photo content. The content is derived from digital still pictures.
  92. The content should be passed through with minimal scaling and
  93. picture enhancements.
  94. * - ``V4L2_DV_IT_CONTENT_TYPE_CINEMA``
  95. - Cinema content.
  96. * - ``V4L2_DV_IT_CONTENT_TYPE_GAME``
  97. - Game content. Audio and video latency should be minimized.
  98. * - ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC``
  99. - No IT Content information is available and the ITC bit in the AVI
  100. InfoFrame is set to 0.
  101. ``V4L2_CID_DV_RX_POWER_PRESENT (bitmask)``
  102. Detects whether the receiver receives power from the source (e.g.
  103. HDMI carries 5V on one of the pins). This is often used to power an
  104. eeprom which contains EDID information, such that the source can
  105. read the EDID even if the sink is in standby/power off. Each bit
  106. corresponds to an input pad on the receiver. If an input pad
  107. cannot detect whether power is present, then the bit for that pad
  108. will be 0. This read-only control is applicable to DVI-D, HDMI and
  109. DisplayPort connectors.
  110. ``V4L2_CID_DV_RX_RGB_RANGE``
  111. (enum)
  112. enum v4l2_dv_rgb_range -
  113. Select the quantization range for RGB input. V4L2_DV_RANGE_AUTO
  114. follows the RGB quantization range specified in the standard for the
  115. video interface (ie. :ref:`cea861` for HDMI).
  116. V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
  117. standard to be compatible with sources that have not implemented the
  118. standard correctly (unfortunately quite common for HDMI and DVI-D).
  119. Full range allows all possible values to be used whereas limited
  120. range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
  121. the number of bits per component. This control is applicable to VGA,
  122. DVI-A/D, HDMI and DisplayPort connectors.
  123. ``V4L2_CID_DV_RX_IT_CONTENT_TYPE``
  124. (enum)
  125. enum v4l2_dv_it_content_type -
  126. Reads the IT Content Type of the received video. This information is
  127. sent over HDMI and DisplayPort connectors as part of the AVI
  128. InfoFrame. The term 'IT Content' is used for content that originates
  129. from a computer as opposed to content from a TV broadcast or an
  130. analog source. See ``V4L2_CID_DV_TX_IT_CONTENT_TYPE`` for the
  131. available content types.