0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 .. _media-controller-types:
0004
0005 Types and flags used to represent the media graph elements
0006 ==========================================================
0007
0008 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
0009
0010 .. _media-entity-functions:
0011 .. _MEDIA-ENT-F-UNKNOWN:
0012 .. _MEDIA-ENT-F-V4L2-SUBDEV-UNKNOWN:
0013 .. _MEDIA-ENT-F-IO-V4L:
0014 .. _MEDIA-ENT-F-IO-VBI:
0015 .. _MEDIA-ENT-F-IO-SWRADIO:
0016 .. _MEDIA-ENT-F-IO-DTV:
0017 .. _MEDIA-ENT-F-DTV-DEMOD:
0018 .. _MEDIA-ENT-F-TS-DEMUX:
0019 .. _MEDIA-ENT-F-DTV-CA:
0020 .. _MEDIA-ENT-F-DTV-NET-DECAP:
0021 .. _MEDIA-ENT-F-CONN-RF:
0022 .. _MEDIA-ENT-F-CONN-SVIDEO:
0023 .. _MEDIA-ENT-F-CONN-COMPOSITE:
0024 .. _MEDIA-ENT-F-CAM-SENSOR:
0025 .. _MEDIA-ENT-F-FLASH:
0026 .. _MEDIA-ENT-F-LENS:
0027 .. _MEDIA-ENT-F-ATV-DECODER:
0028 .. _MEDIA-ENT-F-TUNER:
0029 .. _MEDIA-ENT-F-IF-VID-DECODER:
0030 .. _MEDIA-ENT-F-IF-AUD-DECODER:
0031 .. _MEDIA-ENT-F-AUDIO-CAPTURE:
0032 .. _MEDIA-ENT-F-AUDIO-PLAYBACK:
0033 .. _MEDIA-ENT-F-AUDIO-MIXER:
0034 .. _MEDIA-ENT-F-PROC-VIDEO-COMPOSER:
0035 .. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-FORMATTER:
0036 .. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-ENC-CONV:
0037 .. _MEDIA-ENT-F-PROC-VIDEO-LUT:
0038 .. _MEDIA-ENT-F-PROC-VIDEO-SCALER:
0039 .. _MEDIA-ENT-F-PROC-VIDEO-STATISTICS:
0040 .. _MEDIA-ENT-F-PROC-VIDEO-ENCODER:
0041 .. _MEDIA-ENT-F-PROC-VIDEO-DECODER:
0042 .. _MEDIA-ENT-F-PROC-VIDEO-ISP:
0043 .. _MEDIA-ENT-F-VID-MUX:
0044 .. _MEDIA-ENT-F-VID-IF-BRIDGE:
0045 .. _MEDIA-ENT-F-DV-DECODER:
0046 .. _MEDIA-ENT-F-DV-ENCODER:
0047
0048 .. cssclass:: longtable
0049
0050 .. flat-table:: Media entity functions
0051 :header-rows: 0
0052 :stub-columns: 0
0053
0054 * - ``MEDIA_ENT_F_UNKNOWN`` and
0055 ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
0056 - Unknown entity. That generally indicates that a driver didn't
0057 initialize properly the entity, which is a Kernel bug
0058
0059 * - ``MEDIA_ENT_F_IO_V4L``
0060 - Data streaming input and/or output entity.
0061
0062 * - ``MEDIA_ENT_F_IO_VBI``
0063 - V4L VBI streaming input or output entity
0064
0065 * - ``MEDIA_ENT_F_IO_SWRADIO``
0066 - V4L Software Digital Radio (SDR) streaming input or output entity
0067
0068 * - ``MEDIA_ENT_F_IO_DTV``
0069 - DVB Digital TV streaming input or output entity
0070
0071 * - ``MEDIA_ENT_F_DTV_DEMOD``
0072 - Digital TV demodulator entity.
0073
0074 * - ``MEDIA_ENT_F_TS_DEMUX``
0075 - MPEG Transport stream demux entity. Could be implemented on
0076 hardware or in Kernelspace by the Linux DVB subsystem.
0077
0078 * - ``MEDIA_ENT_F_DTV_CA``
0079 - Digital TV Conditional Access module (CAM) entity
0080
0081 * - ``MEDIA_ENT_F_DTV_NET_DECAP``
0082 - Digital TV network ULE/MLE desencapsulation entity. Could be
0083 implemented on hardware or in Kernelspace
0084
0085 * - ``MEDIA_ENT_F_CONN_RF``
0086 - Connector for a Radio Frequency (RF) signal.
0087
0088 * - ``MEDIA_ENT_F_CONN_SVIDEO``
0089 - Connector for a S-Video signal.
0090
0091 * - ``MEDIA_ENT_F_CONN_COMPOSITE``
0092 - Connector for a RGB composite signal.
0093
0094 * - ``MEDIA_ENT_F_CAM_SENSOR``
0095 - Camera video sensor entity.
0096
0097 * - ``MEDIA_ENT_F_FLASH``
0098 - Flash controller entity.
0099
0100 * - ``MEDIA_ENT_F_LENS``
0101 - Lens controller entity.
0102
0103 * - ``MEDIA_ENT_F_ATV_DECODER``
0104 - Analog video decoder, the basic function of the video decoder is
0105 to accept analogue video from a wide variety of sources such as
0106 broadcast, DVD players, cameras and video cassette recorders, in
0107 either NTSC, PAL, SECAM or HD format, separating the stream into
0108 its component parts, luminance and chrominance, and output it in
0109 some digital video standard, with appropriate timing signals.
0110
0111 * - ``MEDIA_ENT_F_TUNER``
0112 - Digital TV, analog TV, radio and/or software radio tuner, with
0113 consists on a PLL tuning stage that converts radio frequency (RF)
0114 signal into an Intermediate Frequency (IF). Modern tuners have
0115 internally IF-PLL decoders for audio and video, but older models
0116 have those stages implemented on separate entities.
0117
0118 * - ``MEDIA_ENT_F_IF_VID_DECODER``
0119 - IF-PLL video decoder. It receives the IF from a PLL and decodes
0120 the analog TV video signal. This is commonly found on some very
0121 old analog tuners, like Philips MK3 designs. They all contain a
0122 tda9887 (or some software compatible similar chip, like tda9885).
0123 Those devices use a different I2C address than the tuner PLL.
0124
0125 * - ``MEDIA_ENT_F_IF_AUD_DECODER``
0126 - IF-PLL sound decoder. It receives the IF from a PLL and decodes
0127 the analog TV audio signal. This is commonly found on some very
0128 old analog hardware, like Micronas msp3400, Philips tda9840,
0129 tda985x, etc. Those devices use a different I2C address than the
0130 tuner PLL and should be controlled together with the IF-PLL video
0131 decoder.
0132
0133 * - ``MEDIA_ENT_F_AUDIO_CAPTURE``
0134 - Audio Capture Function Entity.
0135
0136 * - ``MEDIA_ENT_F_AUDIO_PLAYBACK``
0137 - Audio Playback Function Entity.
0138
0139 * - ``MEDIA_ENT_F_AUDIO_MIXER``
0140 - Audio Mixer Function Entity.
0141
0142 * - ``MEDIA_ENT_F_PROC_VIDEO_COMPOSER``
0143 - Video composer (blender). An entity capable of video
0144 composing must have at least two sink pads and one source
0145 pad, and composes input video frames onto output video
0146 frames. Composition can be performed using alpha blending,
0147 color keying, raster operations (ROP), stitching or any other
0148 means.
0149
0150 * - ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER``
0151 - Video pixel formatter. An entity capable of pixel formatting
0152 must have at least one sink pad and one source pad. Read
0153 pixel formatters read pixels from memory and perform a subset
0154 of unpacking, cropping, color keying, alpha multiplication
0155 and pixel encoding conversion. Write pixel formatters perform
0156 a subset of dithering, pixel encoding conversion and packing
0157 and write pixels to memory.
0158
0159 * - ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV``
0160 - Video pixel encoding converter. An entity capable of pixel
0161 encoding conversion must have at least one sink pad and one
0162 source pad, and convert the encoding of pixels received on
0163 its sink pad(s) to a different encoding output on its source
0164 pad(s). Pixel encoding conversion includes but isn't limited
0165 to RGB to/from HSV, RGB to/from YUV and CFA (Bayer) to RGB
0166 conversions.
0167
0168 * - ``MEDIA_ENT_F_PROC_VIDEO_LUT``
0169 - Video look-up table. An entity capable of video lookup table
0170 processing must have one sink pad and one source pad. It uses
0171 the values of the pixels received on its sink pad to look up
0172 entries in internal tables and output them on its source pad.
0173 The lookup processing can be performed on all components
0174 separately or combine them for multi-dimensional table
0175 lookups.
0176
0177 * - ``MEDIA_ENT_F_PROC_VIDEO_SCALER``
0178 - Video scaler. An entity capable of video scaling must have
0179 at least one sink pad and one source pad, and scale the
0180 video frame(s) received on its sink pad(s) to a different
0181 resolution output on its source pad(s). The range of
0182 supported scaling ratios is entity-specific and can differ
0183 between the horizontal and vertical directions (in particular
0184 scaling can be supported in one direction only). Binning and
0185 sub-sampling (occasionally also referred to as skipping) are
0186 considered as scaling.
0187
0188 * - ``MEDIA_ENT_F_PROC_VIDEO_STATISTICS``
0189 - Video statistics computation (histogram, 3A, etc.). An entity
0190 capable of statistics computation must have one sink pad and
0191 one source pad. It computes statistics over the frames
0192 received on its sink pad and outputs the statistics data on
0193 its source pad.
0194
0195 * - ``MEDIA_ENT_F_PROC_VIDEO_ENCODER``
0196 - Video (MPEG, HEVC, VPx, etc.) encoder. An entity capable of
0197 compressing video frames. Must have one sink pad and at least
0198 one source pad.
0199
0200 * - ``MEDIA_ENT_F_PROC_VIDEO_DECODER``
0201 - Video (MPEG, HEVC, VPx, etc.) decoder. An entity capable of
0202 decompressing a compressed video stream into uncompressed video
0203 frames. Must have one sink pad and at least one source pad.
0204
0205 * - ``MEDIA_ENT_F_PROC_VIDEO_ISP``
0206 - An Image Signal Processor (ISP) device. ISPs generally are one of a
0207 kind devices that have their specific control interfaces using a
0208 combination of custom V4L2 controls and IOCTLs, and parameters
0209 supplied in a metadata buffer.
0210
0211 * - ``MEDIA_ENT_F_VID_MUX``
0212 - Video multiplexer. An entity capable of multiplexing must have at
0213 least two sink pads and one source pad, and must pass the video
0214 frame(s) received from the active sink pad to the source pad.
0215
0216 * - ``MEDIA_ENT_F_VID_IF_BRIDGE``
0217 - Video interface bridge. A video interface bridge entity must have at
0218 least one sink pad and at least one source pad. It receives video
0219 frames on its sink pad from an input video bus of one type (HDMI, eDP,
0220 MIPI CSI-2, etc.), and outputs them on its source pad to an output
0221 video bus of another type (eDP, MIPI CSI-2, parallel, etc.).
0222
0223 * - ``MEDIA_ENT_F_DV_DECODER``
0224 - Digital video decoder. The basic function of the video decoder is
0225 to accept digital video from a wide variety of sources
0226 and output it in some digital video standard, with appropriate
0227 timing signals.
0228
0229 * - ``MEDIA_ENT_F_DV_ENCODER``
0230 - Digital video encoder. The basic function of the video encoder is
0231 to accept digital video from some digital video standard with
0232 appropriate timing signals (usually a parallel video bus with sync
0233 signals) and output this to a digital video output connector such
0234 as HDMI or DisplayPort.
0235
0236 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
0237
0238 .. _media-entity-flag:
0239 .. _MEDIA-ENT-FL-DEFAULT:
0240 .. _MEDIA-ENT-FL-CONNECTOR:
0241
0242 .. flat-table:: Media entity flags
0243 :header-rows: 0
0244 :stub-columns: 0
0245
0246 * - ``MEDIA_ENT_FL_DEFAULT``
0247 - Default entity for its type. Used to discover the default audio,
0248 VBI and video devices, the default camera sensor, etc.
0249
0250 * - ``MEDIA_ENT_FL_CONNECTOR``
0251 - The entity represents a connector.
0252
0253
0254 .. tabularcolumns:: |p{6.5cm}|p{6.0cm}|p{4.8cm}|
0255
0256 .. _media-intf-type:
0257 .. _MEDIA-INTF-T-DVB-FE:
0258 .. _MEDIA-INTF-T-DVB-DEMUX:
0259 .. _MEDIA-INTF-T-DVB-DVR:
0260 .. _MEDIA-INTF-T-DVB-CA:
0261 .. _MEDIA-INTF-T-DVB-NET:
0262 .. _MEDIA-INTF-T-V4L-VIDEO:
0263 .. _MEDIA-INTF-T-V4L-VBI:
0264 .. _MEDIA-INTF-T-V4L-RADIO:
0265 .. _MEDIA-INTF-T-V4L-SUBDEV:
0266 .. _MEDIA-INTF-T-V4L-SWRADIO:
0267 .. _MEDIA-INTF-T-V4L-TOUCH:
0268 .. _MEDIA-INTF-T-ALSA-PCM-CAPTURE:
0269 .. _MEDIA-INTF-T-ALSA-PCM-PLAYBACK:
0270 .. _MEDIA-INTF-T-ALSA-CONTROL:
0271 .. _MEDIA-INTF-T-ALSA-COMPRESS:
0272 .. _MEDIA-INTF-T-ALSA-RAWMIDI:
0273 .. _MEDIA-INTF-T-ALSA-HWDEP:
0274 .. _MEDIA-INTF-T-ALSA-SEQUENCER:
0275 .. _MEDIA-INTF-T-ALSA-TIMER:
0276
0277 .. flat-table:: Media interface types
0278 :header-rows: 0
0279 :stub-columns: 0
0280
0281 * - ``MEDIA_INTF_T_DVB_FE``
0282 - Device node interface for the Digital TV frontend
0283 - typically, /dev/dvb/adapter?/frontend?
0284
0285 * - ``MEDIA_INTF_T_DVB_DEMUX``
0286 - Device node interface for the Digital TV demux
0287 - typically, /dev/dvb/adapter?/demux?
0288
0289 * - ``MEDIA_INTF_T_DVB_DVR``
0290 - Device node interface for the Digital TV DVR
0291 - typically, /dev/dvb/adapter?/dvr?
0292
0293 * - ``MEDIA_INTF_T_DVB_CA``
0294 - Device node interface for the Digital TV Conditional Access
0295 - typically, /dev/dvb/adapter?/ca?
0296
0297 * - ``MEDIA_INTF_T_DVB_NET``
0298 - Device node interface for the Digital TV network control
0299 - typically, /dev/dvb/adapter?/net?
0300
0301 * - ``MEDIA_INTF_T_V4L_VIDEO``
0302 - Device node interface for video (V4L)
0303 - typically, /dev/video?
0304
0305 * - ``MEDIA_INTF_T_V4L_VBI``
0306 - Device node interface for VBI (V4L)
0307 - typically, /dev/vbi?
0308
0309 * - ``MEDIA_INTF_T_V4L_RADIO``
0310 - Device node interface for radio (V4L)
0311 - typically, /dev/radio?
0312
0313 * - ``MEDIA_INTF_T_V4L_SUBDEV``
0314 - Device node interface for a V4L subdevice
0315 - typically, /dev/v4l-subdev?
0316
0317 * - ``MEDIA_INTF_T_V4L_SWRADIO``
0318 - Device node interface for Software Defined Radio (V4L)
0319 - typically, /dev/swradio?
0320
0321 * - ``MEDIA_INTF_T_V4L_TOUCH``
0322 - Device node interface for Touch device (V4L)
0323 - typically, /dev/v4l-touch?
0324
0325 * - ``MEDIA_INTF_T_ALSA_PCM_CAPTURE``
0326 - Device node interface for ALSA PCM Capture
0327 - typically, /dev/snd/pcmC?D?c
0328
0329 * - ``MEDIA_INTF_T_ALSA_PCM_PLAYBACK``
0330 - Device node interface for ALSA PCM Playback
0331 - typically, /dev/snd/pcmC?D?p
0332
0333 * - ``MEDIA_INTF_T_ALSA_CONTROL``
0334 - Device node interface for ALSA Control
0335 - typically, /dev/snd/controlC?
0336
0337 * - ``MEDIA_INTF_T_ALSA_COMPRESS``
0338 - Device node interface for ALSA Compress
0339 - typically, /dev/snd/compr?
0340
0341 * - ``MEDIA_INTF_T_ALSA_RAWMIDI``
0342 - Device node interface for ALSA Raw MIDI
0343 - typically, /dev/snd/midi?
0344
0345 * - ``MEDIA_INTF_T_ALSA_HWDEP``
0346 - Device node interface for ALSA Hardware Dependent
0347 - typically, /dev/snd/hwC?D?
0348
0349 * - ``MEDIA_INTF_T_ALSA_SEQUENCER``
0350 - Device node interface for ALSA Sequencer
0351 - typically, /dev/snd/seq
0352
0353 * - ``MEDIA_INTF_T_ALSA_TIMER``
0354 - Device node interface for ALSA Timer
0355 - typically, /dev/snd/timer
0356
0357
0358 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
0359
0360 .. _media-pad-flag:
0361 .. _MEDIA-PAD-FL-SINK:
0362 .. _MEDIA-PAD-FL-SOURCE:
0363 .. _MEDIA-PAD-FL-MUST-CONNECT:
0364
0365 .. flat-table:: Media pad flags
0366 :header-rows: 0
0367 :stub-columns: 0
0368
0369 * - ``MEDIA_PAD_FL_SINK``
0370 - Input pad, relative to the entity. Input pads sink data and are
0371 targets of links.
0372
0373 * - ``MEDIA_PAD_FL_SOURCE``
0374 - Output pad, relative to the entity. Output pads source data and
0375 are origins of links.
0376
0377 * - ``MEDIA_PAD_FL_MUST_CONNECT``
0378 - If this flag is set and the pad is linked to any other pad, then
0379 at least one of those links must be enabled for the entity to be
0380 able to stream. There could be temporary reasons (e.g. device
0381 configuration dependent) for the pad to need enabled links even
0382 when this flag isn't set; the absence of the flag doesn't imply
0383 there is none.
0384
0385
0386 One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
0387 must be set for every pad.
0388
0389 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
0390
0391 .. _media-link-flag:
0392 .. _MEDIA-LNK-FL-ENABLED:
0393 .. _MEDIA-LNK-FL-IMMUTABLE:
0394 .. _MEDIA-LNK-FL-DYNAMIC:
0395 .. _MEDIA-LNK-FL-LINK-TYPE:
0396
0397 .. flat-table:: Media link flags
0398 :header-rows: 0
0399 :stub-columns: 0
0400
0401 * - ``MEDIA_LNK_FL_ENABLED``
0402 - The link is enabled and can be used to transfer media data. When
0403 two or more links target a sink pad, only one of them can be
0404 enabled at a time.
0405
0406 * - ``MEDIA_LNK_FL_IMMUTABLE``
0407 - The link enabled state can't be modified at runtime. An immutable
0408 link is always enabled.
0409
0410 * - ``MEDIA_LNK_FL_DYNAMIC``
0411 - The link enabled state can be modified during streaming. This flag
0412 is set by drivers and is read-only for applications.
0413
0414 * - ``MEDIA_LNK_FL_LINK_TYPE``
0415 - This is a bitmask that defines the type of the link. The following
0416 link types are currently supported:
0417
0418 .. _MEDIA-LNK-FL-DATA-LINK:
0419
0420 ``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection
0421 between two pads.
0422
0423 .. _MEDIA-LNK-FL-INTERFACE-LINK:
0424
0425 ``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its
0426 interface.
0427
0428 .. _MEDIA-LNK-FL-ANCILLARY-LINK:
0429
0430 ``MEDIA_LNK_FL_ANCILLARY_LINK`` for links that represent a physical
0431 relationship between two entities. The link may or may not be
0432 immutable, so applications must not assume either case.