Merge branch 'omap-for-v4.8/soc' into omap-for-v4.8/fixes
[cascardo/linux.git] / Documentation / media / uapi / mediactl / media-types.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _media-controller-types:
4
5 Types and flags used to represent the media graph elements
6 ==========================================================
7
8
9 .. _media-entity-type:
10
11 .. flat-table:: Media entity types
12     :header-rows:  0
13     :stub-columns: 0
14
15
16     -  .. row 1
17
18        ..  _MEDIA-ENT-F-UNKNOWN:
19        .. _MEDIA-ENT-F-V4L2-SUBDEV-UNKNOWN:
20
21        -  ``MEDIA_ENT_F_UNKNOWN`` and ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
22
23        -  Unknown entity. That generally indicates that a driver didn't
24           initialize properly the entity, with is a Kernel bug
25
26     -  .. row 2
27
28        ..  _MEDIA-ENT-F-IO-V4L:
29
30        -  ``MEDIA_ENT_F_IO_V4L``
31
32        -  Data streaming input and/or output entity.
33
34     -  .. row 3
35
36        ..  _MEDIA-ENT-F-IO-VBI:
37
38        -  ``MEDIA_ENT_F_IO_VBI``
39
40        -  V4L VBI streaming input or output entity
41
42     -  .. row 4
43
44        ..  _MEDIA-ENT-F-IO-SWRADIO:
45
46        -  ``MEDIA_ENT_F_IO_SWRADIO``
47
48        -  V4L Software Digital Radio (SDR) streaming input or output entity
49
50     -  .. row 5
51
52        ..  _MEDIA-ENT-F-IO-DTV:
53
54        -  ``MEDIA_ENT_F_IO_DTV``
55
56        -  DVB Digital TV streaming input or output entity
57
58     -  .. row 6
59
60        ..  _MEDIA-ENT-F-DTV-DEMOD:
61
62        -  ``MEDIA_ENT_F_DTV_DEMOD``
63
64        -  Digital TV demodulator entity.
65
66     -  .. row 7
67
68        ..  _MEDIA-ENT-F-TS-DEMUX:
69
70        -  ``MEDIA_ENT_F_TS_DEMUX``
71
72        -  MPEG Transport stream demux entity. Could be implemented on
73           hardware or in Kernelspace by the Linux DVB subsystem.
74
75     -  .. row 8
76
77        ..  _MEDIA-ENT-F-DTV-CA:
78
79        -  ``MEDIA_ENT_F_DTV_CA``
80
81        -  Digital TV Conditional Access module (CAM) entity
82
83     -  .. row 9
84
85        ..  _MEDIA-ENT-F-DTV-NET-DECAP:
86
87        -  ``MEDIA_ENT_F_DTV_NET_DECAP``
88
89        -  Digital TV network ULE/MLE desencapsulation entity. Could be
90           implemented on hardware or in Kernelspace
91
92     -  .. row 10
93
94        ..  _MEDIA-ENT-F-CONN-RF:
95
96        -  ``MEDIA_ENT_F_CONN_RF``
97
98        -  Connector for a Radio Frequency (RF) signal.
99
100     -  .. row 11
101
102        ..  _MEDIA-ENT-F-CONN-SVIDEO:
103
104        -  ``MEDIA_ENT_F_CONN_SVIDEO``
105
106        -  Connector for a S-Video signal.
107
108     -  .. row 12
109
110        ..  _MEDIA-ENT-F-CONN-COMPOSITE:
111
112        -  ``MEDIA_ENT_F_CONN_COMPOSITE``
113
114        -  Connector for a RGB composite signal.
115
116     -  .. row 13
117
118        ..  _MEDIA-ENT-F-CAM-SENSOR:
119
120        -  ``MEDIA_ENT_F_CAM_SENSOR``
121
122        -  Camera video sensor entity.
123
124     -  .. row 14
125
126        ..  _MEDIA-ENT-F-FLASH:
127
128        -  ``MEDIA_ENT_F_FLASH``
129
130        -  Flash controller entity.
131
132     -  .. row 15
133
134        ..  _MEDIA-ENT-F-LENS:
135
136        -  ``MEDIA_ENT_F_LENS``
137
138        -  Lens controller entity.
139
140     -  .. row 16
141
142        ..  _MEDIA-ENT-F-ATV-DECODER:
143
144        -  ``MEDIA_ENT_F_ATV_DECODER``
145
146        -  Analog video decoder, the basic function of the video decoder is
147           to accept analogue video from a wide variety of sources such as
148           broadcast, DVD players, cameras and video cassette recorders, in
149           either NTSC, PAL, SECAM or HD format, separating the stream into
150           its component parts, luminance and chrominance, and output it in
151           some digital video standard, with appropriate timing signals.
152
153     -  .. row 17
154
155        ..  _MEDIA-ENT-F-TUNER:
156
157        -  ``MEDIA_ENT_F_TUNER``
158
159        -  Digital TV, analog TV, radio and/or software radio tuner, with
160           consists on a PLL tuning stage that converts radio frequency (RF)
161           signal into an Intermediate Frequency (IF). Modern tuners have
162           internally IF-PLL decoders for audio and video, but older models
163           have those stages implemented on separate entities.
164
165     -  .. row 18
166
167        ..  _MEDIA-ENT-F-IF-VID-DECODER:
168
169        -  ``MEDIA_ENT_F_IF_VID_DECODER``
170
171        -  IF-PLL video decoder. It receives the IF from a PLL and decodes
172           the analog TV video signal. This is commonly found on some very
173           old analog tuners, like Philips MK3 designs. They all contain a
174           tda9887 (or some software compatible similar chip, like tda9885).
175           Those devices use a different I2C address than the tuner PLL.
176
177     -  .. row 19
178
179        ..  _MEDIA-ENT-F-IF-AUD-DECODER:
180
181        -  ``MEDIA_ENT_F_IF_AUD_DECODER``
182
183        -  IF-PLL sound decoder. It receives the IF from a PLL and decodes
184           the analog TV audio signal. This is commonly found on some very
185           old analog hardware, like Micronas msp3400, Philips tda9840,
186           tda985x, etc. Those devices use a different I2C address than the
187           tuner PLL and should be controlled together with the IF-PLL video
188           decoder.
189
190     -  .. row 20
191
192        ..  _MEDIA-ENT-F-AUDIO-CAPTURE:
193
194        -  ``MEDIA_ENT_F_AUDIO_CAPTURE``
195
196        -  Audio Capture Function Entity.
197
198     -  .. row 21
199
200        ..  _MEDIA-ENT-F-AUDIO-PLAYBACK:
201
202        -  ``MEDIA_ENT_F_AUDIO_PLAYBACK``
203
204        -  Audio Playback Function Entity.
205
206     -  .. row 22
207
208        ..  _MEDIA-ENT-F-AUDIO-MIXER:
209
210        -  ``MEDIA_ENT_F_AUDIO_MIXER``
211
212        -  Audio Mixer Function Entity.
213
214     -  .. row 23
215
216        ..  _MEDIA-ENT-F-PROC-VIDEO-COMPOSER:
217
218        -  ``MEDIA_ENT_F_PROC_VIDEO_COMPOSER``
219
220        -  Video composer (blender). An entity capable of video
221           composing must have at least two sink pads and one source
222           pad, and composes input video frames onto output video
223           frames. Composition can be performed using alpha blending,
224           color keying, raster operations (ROP), stitching or any other
225           means.
226
227     -  ..  row 24
228
229        ..  _MEDIA-ENT-F-PROC-VIDEO-PIXEL-FORMATTER:
230
231        -  ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER``
232
233        -  Video pixel formatter. An entity capable of pixel formatting
234           must have at least one sink pad and one source pad. Read
235           pixel formatters read pixels from memory and perform a subset
236           of unpacking, cropping, color keying, alpha multiplication
237           and pixel encoding conversion. Write pixel formatters perform
238           a subset of dithering, pixel encoding conversion and packing
239           and write pixels to memory.
240
241     -  ..  row 25
242
243        ..  _MEDIA-ENT-F-PROC-VIDEO-PIXEL-ENC-CONV:
244
245        -  ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV``
246
247        -  Video pixel encoding converter. An entity capable of pixel
248           enconding conversion must have at least one sink pad and one
249           source pad, and convert the encoding of pixels received on
250           its sink pad(s) to a different encoding output on its source
251           pad(s). Pixel encoding conversion includes but isn't limited
252           to RGB to/from HSV, RGB to/from YUV and CFA (Bayer) to RGB
253           conversions.
254
255     -  ..  row 26
256
257        ..  _MEDIA-ENT-F-PROC-VIDEO-LUT:
258
259        -  ``MEDIA_ENT_F_PROC_VIDEO_LUT``
260
261        -  Video look-up table. An entity capable of video lookup table
262           processing must have one sink pad and one source pad. It uses
263           the values of the pixels received on its sink pad to look up
264           entries in internal tables and output them on its source pad.
265           The lookup processing can be performed on all components
266           separately or combine them for multi-dimensional table
267           lookups.
268
269     -  ..  row 27
270
271        ..  _MEDIA-ENT-F-PROC-VIDEO-SCALER:
272
273        -  ``MEDIA_ENT_F_PROC_VIDEO_SCALER``
274
275        -  Video scaler. An entity capable of video scaling must have
276           at least one sink pad and one source pad, and scale the
277           video frame(s) received on its sink pad(s) to a different
278           resolution output on its source pad(s). The range of
279           supported scaling ratios is entity-specific and can differ
280           between the horizontal and vertical directions (in particular
281           scaling can be supported in one direction only). Binning and
282           skipping are considered as scaling.
283
284     -  ..  row 28
285
286        ..  _MEDIA-ENT-F-PROC-VIDEO-STATISTICS:
287
288        -  ``MEDIA_ENT_F_PROC_VIDEO_STATISTICS``
289
290        -  Video statistics computation (histogram, 3A, ...). An entity
291           capable of statistics computation must have one sink pad and
292           one source pad. It computes statistics over the frames
293           received on its sink pad and outputs the statistics data on
294           its source pad.
295
296
297 .. _media-entity-flag:
298
299 .. flat-table:: Media entity flags
300     :header-rows:  0
301     :stub-columns: 0
302
303
304     -  .. row 1
305
306        ..  _MEDIA-ENT-FL-DEFAULT:
307
308        -  ``MEDIA_ENT_FL_DEFAULT``
309
310        -  Default entity for its type. Used to discover the default audio,
311           VBI and video devices, the default camera sensor, ...
312
313     -  .. row 2
314
315        ..  _MEDIA-ENT-FL-CONNECTOR:
316
317        -  ``MEDIA_ENT_FL_CONNECTOR``
318
319        -  The entity represents a data conector
320
321
322
323 .. _media-intf-type:
324
325 .. flat-table:: Media interface types
326     :header-rows:  0
327     :stub-columns: 0
328
329
330     -  .. row 1
331
332        ..  _MEDIA-INTF-T-DVB-FE:
333
334        -  ``MEDIA_INTF_T_DVB_FE``
335
336        -  Device node interface for the Digital TV frontend
337
338        -  typically, /dev/dvb/adapter?/frontend?
339
340     -  .. row 2
341
342        ..  _MEDIA-INTF-T-DVB-DEMUX:
343
344        -  ``MEDIA_INTF_T_DVB_DEMUX``
345
346        -  Device node interface for the Digital TV demux
347
348        -  typically, /dev/dvb/adapter?/demux?
349
350     -  .. row 3
351
352        ..  _MEDIA-INTF-T-DVB-DVR:
353
354        -  ``MEDIA_INTF_T_DVB_DVR``
355
356        -  Device node interface for the Digital TV DVR
357
358        -  typically, /dev/dvb/adapter?/dvr?
359
360     -  .. row 4
361
362        ..  _MEDIA-INTF-T-DVB-CA:
363
364        -  ``MEDIA_INTF_T_DVB_CA``
365
366        -  Device node interface for the Digital TV Conditional Access
367
368        -  typically, /dev/dvb/adapter?/ca?
369
370     -  .. row 5
371
372        ..  _MEDIA-INTF-T-DVB-NET:
373
374        -  ``MEDIA_INTF_T_DVB_NET``
375
376        -  Device node interface for the Digital TV network control
377
378        -  typically, /dev/dvb/adapter?/net?
379
380     -  .. row 6
381
382        ..  _MEDIA-INTF-T-V4L-VIDEO:
383
384        -  ``MEDIA_INTF_T_V4L_VIDEO``
385
386        -  Device node interface for video (V4L)
387
388        -  typically, /dev/video?
389
390     -  .. row 7
391
392        ..  _MEDIA-INTF-T-V4L-VBI:
393
394        -  ``MEDIA_INTF_T_V4L_VBI``
395
396        -  Device node interface for VBI (V4L)
397
398        -  typically, /dev/vbi?
399
400     -  .. row 8
401
402        ..  _MEDIA-INTF-T-V4L-RADIO:
403
404        -  ``MEDIA_INTF_T_V4L_RADIO``
405
406        -  Device node interface for radio (V4L)
407
408        -  typically, /dev/vbi?
409
410     -  .. row 9
411
412        ..  _MEDIA-INTF-T-V4L-SUBDEV:
413
414        -  ``MEDIA_INTF_T_V4L_SUBDEV``
415
416        -  Device node interface for a V4L subdevice
417
418        -  typically, /dev/v4l-subdev?
419
420     -  .. row 10
421
422        ..  _MEDIA-INTF-T-V4L-SWRADIO:
423
424        -  ``MEDIA_INTF_T_V4L_SWRADIO``
425
426        -  Device node interface for Software Defined Radio (V4L)
427
428        -  typically, /dev/swradio?
429
430     -  .. row 11
431
432        ..  _MEDIA-INTF-T-ALSA-PCM-CAPTURE:
433
434        -  ``MEDIA_INTF_T_ALSA_PCM_CAPTURE``
435
436        -  Device node interface for ALSA PCM Capture
437
438        -  typically, /dev/snd/pcmC?D?c
439
440     -  .. row 12
441
442        ..  _MEDIA-INTF-T-ALSA-PCM-PLAYBACK:
443
444        -  ``MEDIA_INTF_T_ALSA_PCM_PLAYBACK``
445
446        -  Device node interface for ALSA PCM Playback
447
448        -  typically, /dev/snd/pcmC?D?p
449
450     -  .. row 13
451
452        ..  _MEDIA-INTF-T-ALSA-CONTROL:
453
454        -  ``MEDIA_INTF_T_ALSA_CONTROL``
455
456        -  Device node interface for ALSA Control
457
458        -  typically, /dev/snd/controlC?
459
460     -  .. row 14
461
462        ..  _MEDIA-INTF-T-ALSA-COMPRESS:
463
464        -  ``MEDIA_INTF_T_ALSA_COMPRESS``
465
466        -  Device node interface for ALSA Compress
467
468        -  typically, /dev/snd/compr?
469
470     -  .. row 15
471
472        ..  _MEDIA-INTF-T-ALSA-RAWMIDI:
473
474        -  ``MEDIA_INTF_T_ALSA_RAWMIDI``
475
476        -  Device node interface for ALSA Raw MIDI
477
478        -  typically, /dev/snd/midi?
479
480     -  .. row 16
481
482        ..  _MEDIA-INTF-T-ALSA-HWDEP:
483
484        -  ``MEDIA_INTF_T_ALSA_HWDEP``
485
486        -  Device node interface for ALSA Hardware Dependent
487
488        -  typically, /dev/snd/hwC?D?
489
490     -  .. row 17
491
492        ..  _MEDIA-INTF-T-ALSA-SEQUENCER:
493
494        -  ``MEDIA_INTF_T_ALSA_SEQUENCER``
495
496        -  Device node interface for ALSA Sequencer
497
498        -  typically, /dev/snd/seq
499
500     -  .. row 18
501
502        ..  _MEDIA-INTF-T-ALSA-TIMER:
503
504        -  ``MEDIA_INTF_T_ALSA_TIMER``
505
506        -  Device node interface for ALSA Timer
507
508        -  typically, /dev/snd/timer
509
510
511
512 .. _media-pad-flag:
513
514 .. flat-table:: Media pad flags
515     :header-rows:  0
516     :stub-columns: 0
517
518
519     -  .. row 1
520
521        ..  _MEDIA-PAD-FL-SINK:
522
523        -  ``MEDIA_PAD_FL_SINK``
524
525        -  Input pad, relative to the entity. Input pads sink data and are
526           targets of links.
527
528     -  .. row 2
529
530        ..  _MEDIA-PAD-FL-SOURCE:
531
532        -  ``MEDIA_PAD_FL_SOURCE``
533
534        -  Output pad, relative to the entity. Output pads source data and
535           are origins of links.
536
537     -  .. row 3
538
539        ..  _MEDIA-PAD-FL-MUST-CONNECT:
540
541        -  ``MEDIA_PAD_FL_MUST_CONNECT``
542
543        -  If this flag is set and the pad is linked to any other pad, then
544           at least one of those links must be enabled for the entity to be
545           able to stream. There could be temporary reasons (e.g. device
546           configuration dependent) for the pad to need enabled links even
547           when this flag isn't set; the absence of the flag doesn't imply
548           there is none.
549
550
551 One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
552 must be set for every pad.
553
554
555 .. _media-link-flag:
556
557 .. flat-table:: Media link flags
558     :header-rows:  0
559     :stub-columns: 0
560
561
562     -  .. row 1
563
564        ..  _MEDIA-LNK-FL-ENABLED:
565
566        -  ``MEDIA_LNK_FL_ENABLED``
567
568        -  The link is enabled and can be used to transfer media data. When
569           two or more links target a sink pad, only one of them can be
570           enabled at a time.
571
572     -  .. row 2
573
574        ..  _MEDIA-LNK-FL-IMMUTABLE:
575
576        -  ``MEDIA_LNK_FL_IMMUTABLE``
577
578        -  The link enabled state can't be modified at runtime. An immutable
579           link is always enabled.
580
581     -  .. row 3
582
583        ..  _MEDIA-LNK-FL-DYNAMIC:
584
585        -  ``MEDIA_LNK_FL_DYNAMIC``
586
587        -  The link enabled state can be modified during streaming. This flag
588           is set by drivers and is read-only for applications.
589
590     -  .. row 4
591
592        ..  _MEDIA-LNK-FL-LINK-TYPE:
593
594        -  ``MEDIA_LNK_FL_LINK_TYPE``
595
596        -  This is a bitmask that defines the type of the link. Currently,
597           two types of links are supported:
598
599           .. _MEDIA-LNK-FL-DATA-LINK:
600
601           ``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
602
603           .. _MEDIA-LNK-FL-INTERFACE-LINK:
604
605           ``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
606           interface and an entity