18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _dv-controls:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci*******************************
68c2ecf20Sopenharmony_ciDigital Video Control Reference
78c2ecf20Sopenharmony_ci*******************************
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciThe Digital Video control class is intended to control receivers and
108c2ecf20Sopenharmony_citransmitters for `VGA <http://en.wikipedia.org/wiki/Vga>`__,
118c2ecf20Sopenharmony_ci`DVI <http://en.wikipedia.org/wiki/Digital_Visual_Interface>`__
128c2ecf20Sopenharmony_ci(Digital Visual Interface), HDMI (:ref:`hdmi`) and DisplayPort
138c2ecf20Sopenharmony_ci(:ref:`dp`). These controls are generally expected to be private to
148c2ecf20Sopenharmony_cithe receiver or transmitter subdevice that implements them, so they are
158c2ecf20Sopenharmony_cionly exposed on the ``/dev/v4l-subdev*`` device node.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci.. note::
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci   Note that these devices can have multiple input or output pads which are
208c2ecf20Sopenharmony_ci   hooked up to e.g. HDMI connectors. Even though the subdevice will
218c2ecf20Sopenharmony_ci   receive or transmit video from/to only one of those pads, the other pads
228c2ecf20Sopenharmony_ci   can still be active when it comes to EDID (Extended Display
238c2ecf20Sopenharmony_ci   Identification Data, :ref:`vesaedid`) and HDCP (High-bandwidth Digital
248c2ecf20Sopenharmony_ci   Content Protection System, :ref:`hdcp`) processing, allowing the
258c2ecf20Sopenharmony_ci   device to do the fairly slow EDID/HDCP handling in advance. This allows
268c2ecf20Sopenharmony_ci   for quick switching between connectors.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciThese pads appear in several of the controls in this section as
298c2ecf20Sopenharmony_cibitmasks, one bit for each pad. Bit 0 corresponds to pad 0, bit 1 to pad
308c2ecf20Sopenharmony_ci1, etc. The maximum value of the control is the set of valid pads.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci.. _dv-control-id:
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciDigital Video Control IDs
368c2ecf20Sopenharmony_ci=========================
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci``V4L2_CID_DV_CLASS (class)``
398c2ecf20Sopenharmony_ci    The Digital Video class descriptor.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_HOTPLUG (bitmask)``
428c2ecf20Sopenharmony_ci    Many connectors have a hotplug pin which is high if EDID information
438c2ecf20Sopenharmony_ci    is available from the source. This control shows the state of the
448c2ecf20Sopenharmony_ci    hotplug pin as seen by the transmitter. Each bit corresponds to an
458c2ecf20Sopenharmony_ci    output pad on the transmitter. If an output pad does not have an
468c2ecf20Sopenharmony_ci    associated hotplug pin, then the bit for that pad will be 0. This
478c2ecf20Sopenharmony_ci    read-only control is applicable to DVI-D, HDMI and DisplayPort
488c2ecf20Sopenharmony_ci    connectors.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_RXSENSE (bitmask)``
518c2ecf20Sopenharmony_ci    Rx Sense is the detection of pull-ups on the TMDS clock lines. This
528c2ecf20Sopenharmony_ci    normally means that the sink has left/entered standby (i.e. the
538c2ecf20Sopenharmony_ci    transmitter can sense that the receiver is ready to receive video).
548c2ecf20Sopenharmony_ci    Each bit corresponds to an output pad on the transmitter. If an
558c2ecf20Sopenharmony_ci    output pad does not have an associated Rx Sense, then the bit for
568c2ecf20Sopenharmony_ci    that pad will be 0. This read-only control is applicable to DVI-D
578c2ecf20Sopenharmony_ci    and HDMI devices.
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_EDID_PRESENT (bitmask)``
608c2ecf20Sopenharmony_ci    When the transmitter sees the hotplug signal from the receiver it
618c2ecf20Sopenharmony_ci    will attempt to read the EDID. If set, then the transmitter has read
628c2ecf20Sopenharmony_ci    at least the first block (= 128 bytes). Each bit corresponds to an
638c2ecf20Sopenharmony_ci    output pad on the transmitter. If an output pad does not support
648c2ecf20Sopenharmony_ci    EDIDs, then the bit for that pad will be 0. This read-only control
658c2ecf20Sopenharmony_ci    is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_MODE``
688c2ecf20Sopenharmony_ci    (enum)
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_cienum v4l2_dv_tx_mode -
718c2ecf20Sopenharmony_ci    HDMI transmitters can transmit in DVI-D mode (just video) or in HDMI
728c2ecf20Sopenharmony_ci    mode (video + audio + auxiliary data). This control selects which
738c2ecf20Sopenharmony_ci    mode to use: V4L2_DV_TX_MODE_DVI_D or V4L2_DV_TX_MODE_HDMI.
748c2ecf20Sopenharmony_ci    This control is applicable to HDMI connectors.
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_RGB_RANGE``
778c2ecf20Sopenharmony_ci    (enum)
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_cienum v4l2_dv_rgb_range -
808c2ecf20Sopenharmony_ci    Select the quantization range for RGB output. V4L2_DV_RANGE_AUTO
818c2ecf20Sopenharmony_ci    follows the RGB quantization range specified in the standard for the
828c2ecf20Sopenharmony_ci    video interface (ie. :ref:`cea861` for HDMI).
838c2ecf20Sopenharmony_ci    V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
848c2ecf20Sopenharmony_ci    standard to be compatible with sinks that have not implemented the
858c2ecf20Sopenharmony_ci    standard correctly (unfortunately quite common for HDMI and DVI-D).
868c2ecf20Sopenharmony_ci    Full range allows all possible values to be used whereas limited
878c2ecf20Sopenharmony_ci    range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
888c2ecf20Sopenharmony_ci    the number of bits per component. This control is applicable to VGA,
898c2ecf20Sopenharmony_ci    DVI-A/D, HDMI and DisplayPort connectors.
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci``V4L2_CID_DV_TX_IT_CONTENT_TYPE``
928c2ecf20Sopenharmony_ci    (enum)
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_cienum v4l2_dv_it_content_type -
958c2ecf20Sopenharmony_ci    Configures the IT Content Type of the transmitted video. This
968c2ecf20Sopenharmony_ci    information is sent over HDMI and DisplayPort connectors as part of
978c2ecf20Sopenharmony_ci    the AVI InfoFrame. The term 'IT Content' is used for content that
988c2ecf20Sopenharmony_ci    originates from a computer as opposed to content from a TV broadcast
998c2ecf20Sopenharmony_ci    or an analog source. The enum v4l2_dv_it_content_type defines
1008c2ecf20Sopenharmony_ci    the possible content types:
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci.. tabularcolumns:: |p{7.3cm}|p{10.4cm}|
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci.. flat-table::
1058c2ecf20Sopenharmony_ci    :header-rows:  0
1068c2ecf20Sopenharmony_ci    :stub-columns: 0
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci    * - ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS``
1098c2ecf20Sopenharmony_ci      - Graphics content. Pixel data should be passed unfiltered and
1108c2ecf20Sopenharmony_ci	without analog reconstruction.
1118c2ecf20Sopenharmony_ci    * - ``V4L2_DV_IT_CONTENT_TYPE_PHOTO``
1128c2ecf20Sopenharmony_ci      - Photo content. The content is derived from digital still pictures.
1138c2ecf20Sopenharmony_ci	The content should be passed through with minimal scaling and
1148c2ecf20Sopenharmony_ci	picture enhancements.
1158c2ecf20Sopenharmony_ci    * - ``V4L2_DV_IT_CONTENT_TYPE_CINEMA``
1168c2ecf20Sopenharmony_ci      - Cinema content.
1178c2ecf20Sopenharmony_ci    * - ``V4L2_DV_IT_CONTENT_TYPE_GAME``
1188c2ecf20Sopenharmony_ci      - Game content. Audio and video latency should be minimized.
1198c2ecf20Sopenharmony_ci    * - ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC``
1208c2ecf20Sopenharmony_ci      - No IT Content information is available and the ITC bit in the AVI
1218c2ecf20Sopenharmony_ci	InfoFrame is set to 0.
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci``V4L2_CID_DV_RX_POWER_PRESENT (bitmask)``
1268c2ecf20Sopenharmony_ci    Detects whether the receiver receives power from the source (e.g.
1278c2ecf20Sopenharmony_ci    HDMI carries 5V on one of the pins). This is often used to power an
1288c2ecf20Sopenharmony_ci    eeprom which contains EDID information, such that the source can
1298c2ecf20Sopenharmony_ci    read the EDID even if the sink is in standby/power off. Each bit
1308c2ecf20Sopenharmony_ci    corresponds to an input pad on the receiver. If an input pad
1318c2ecf20Sopenharmony_ci    cannot detect whether power is present, then the bit for that pad
1328c2ecf20Sopenharmony_ci    will be 0. This read-only control is applicable to DVI-D, HDMI and
1338c2ecf20Sopenharmony_ci    DisplayPort connectors.
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci``V4L2_CID_DV_RX_RGB_RANGE``
1368c2ecf20Sopenharmony_ci    (enum)
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_cienum v4l2_dv_rgb_range -
1398c2ecf20Sopenharmony_ci    Select the quantization range for RGB input. V4L2_DV_RANGE_AUTO
1408c2ecf20Sopenharmony_ci    follows the RGB quantization range specified in the standard for the
1418c2ecf20Sopenharmony_ci    video interface (ie. :ref:`cea861` for HDMI).
1428c2ecf20Sopenharmony_ci    V4L2_DV_RANGE_LIMITED and V4L2_DV_RANGE_FULL override the
1438c2ecf20Sopenharmony_ci    standard to be compatible with sources that have not implemented the
1448c2ecf20Sopenharmony_ci    standard correctly (unfortunately quite common for HDMI and DVI-D).
1458c2ecf20Sopenharmony_ci    Full range allows all possible values to be used whereas limited
1468c2ecf20Sopenharmony_ci    range sets the range to (16 << (N-8)) - (235 << (N-8)) where N is
1478c2ecf20Sopenharmony_ci    the number of bits per component. This control is applicable to VGA,
1488c2ecf20Sopenharmony_ci    DVI-A/D, HDMI and DisplayPort connectors.
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci``V4L2_CID_DV_RX_IT_CONTENT_TYPE``
1518c2ecf20Sopenharmony_ci    (enum)
1528c2ecf20Sopenharmony_ci
1538c2ecf20Sopenharmony_cienum v4l2_dv_it_content_type -
1548c2ecf20Sopenharmony_ci    Reads the IT Content Type of the received video. This information is
1558c2ecf20Sopenharmony_ci    sent over HDMI and DisplayPort connectors as part of the AVI
1568c2ecf20Sopenharmony_ci    InfoFrame. The term 'IT Content' is used for content that originates
1578c2ecf20Sopenharmony_ci    from a computer as opposed to content from a TV broadcast or an
1588c2ecf20Sopenharmony_ci    analog source. See ``V4L2_CID_DV_TX_IT_CONTENT_TYPE`` for the
1598c2ecf20Sopenharmony_ci    available content types.
160