Merge tag 'for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power...
[sfrench/cifs-2.6.git] / Documentation / DocBook / media / v4l / media-types.xml
1 <section id="media-controller-types">
2 <title>Types and flags used to represent the media graph elements</title>
3
4     <table frame="none" pgwide="1" id="media-entity-type">
5       <title>Media entity types</title>
6       <tgroup cols="2">
7         <colspec colname="c1"/>
8         <colspec colname="c2"/>
9         <tbody valign="top">
10           <row>
11             <entry><constant>MEDIA_ENT_F_UNKNOWN</constant> and <constant>MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN</constant></entry>
12             <entry>Unknown entity. That generally indicates that
13             a driver didn't initialize properly the entity, with is a Kernel bug</entry>
14           </row>
15           <row>
16             <entry><constant>MEDIA_ENT_F_IO_V4L</constant></entry>
17             <entry>Data streaming input and/or output entity.</entry>
18           </row>
19           <row>
20             <entry><constant>MEDIA_ENT_F_IO_VBI</constant></entry>
21             <entry>V4L VBI streaming input or output entity</entry>
22           </row>
23           <row>
24             <entry><constant>MEDIA_ENT_F_IO_SWRADIO</constant></entry>
25             <entry>V4L Software Digital Radio (SDR) streaming input or output entity</entry>
26           </row>
27           <row>
28             <entry><constant>MEDIA_ENT_F_IO_DTV</constant></entry>
29             <entry>DVB Digital TV streaming input or output entity</entry>
30           </row>
31           <row>
32             <entry><constant>MEDIA_ENT_F_DTV_DEMOD</constant></entry>
33             <entry>Digital TV demodulator entity.</entry>
34           </row>
35           <row>
36             <entry><constant>MEDIA_ENT_F_TS_DEMUX</constant></entry>
37             <entry>MPEG Transport stream demux entity. Could be implemented on hardware or in Kernelspace by the Linux DVB subsystem.</entry>
38           </row>
39           <row>
40             <entry><constant>MEDIA_ENT_F_DTV_CA</constant></entry>
41             <entry>Digital TV Conditional Access module (CAM) entity</entry>
42           </row>
43           <row>
44             <entry><constant>MEDIA_ENT_F_DTV_NET_DECAP</constant></entry>
45             <entry>Digital TV network ULE/MLE desencapsulation entity. Could be implemented on hardware or in Kernelspace</entry>
46           </row>
47           <row>
48             <entry><constant>MEDIA_ENT_F_CONN_RF</constant></entry>
49             <entry>Connector for a Radio Frequency (RF) signal.</entry>
50           </row>
51           <row>
52             <entry><constant>MEDIA_ENT_F_CONN_SVIDEO</constant></entry>
53             <entry>Connector for a S-Video signal.</entry>
54           </row>
55           <row>
56             <entry><constant>MEDIA_ENT_F_CONN_COMPOSITE</constant></entry>
57             <entry>Connector for a RGB composite signal.</entry>
58           </row>
59           <row>
60             <entry><constant>MEDIA_ENT_F_CAM_SENSOR</constant></entry>
61             <entry>Camera video sensor entity.</entry>
62           </row>
63           <row>
64             <entry><constant>MEDIA_ENT_F_FLASH</constant></entry>
65             <entry>Flash controller entity.</entry>
66           </row>
67           <row>
68             <entry><constant>MEDIA_ENT_F_LENS</constant></entry>
69             <entry>Lens controller entity.</entry>
70           </row>
71           <row>
72             <entry><constant>MEDIA_ENT_F_ATV_DECODER</constant></entry>
73             <entry>Analog video decoder, the basic function of the video decoder
74             is to accept analogue video from a wide variety of sources such as
75             broadcast, DVD players, cameras and video cassette recorders, in
76             either NTSC, PAL, SECAM or HD format, separating the stream
77             into its component parts, luminance and chrominance, and output
78             it in some digital video standard, with appropriate timing
79             signals.</entry>
80           </row>
81           <row>
82             <entry><constant>MEDIA_ENT_F_TUNER</constant></entry>
83             <entry>Digital TV, analog TV, radio and/or software radio tuner,
84                    with consists on a PLL tuning stage that converts radio
85                    frequency (RF) signal into an Intermediate Frequency (IF).
86                    Modern tuners have internally IF-PLL decoders for audio
87                    and video, but older models have those stages implemented
88                    on separate entities.
89             </entry>
90           </row>
91           <row>
92             <entry><constant>MEDIA_ENT_F_IF_VID_DECODER</constant></entry>
93             <entry>IF-PLL video decoder. It receives the IF from a PLL
94                    and decodes the analog TV video signal. This is commonly
95                    found on some very old analog tuners, like Philips MK3
96                    designs. They all contain a tda9887 (or some software
97                    compatible similar chip, like tda9885). Those devices
98                    use a different I2C address than the tuner PLL.
99             </entry>
100           </row>
101           <row>
102             <entry><constant>MEDIA_ENT_F_IF_AUD_DECODER</constant></entry>
103             <entry>IF-PLL sound decoder. It receives the IF from a PLL
104                    and decodes the analog TV audio signal. This is commonly
105                    found on some very old analog hardware, like Micronas
106                    msp3400, Philips tda9840, tda985x, etc. Those devices
107                    use a different I2C address than the tuner PLL and
108                    should be controlled together with the IF-PLL video
109                    decoder.
110             </entry>
111           </row>
112           <row>
113             <entry><constant>MEDIA_ENT_F_AUDIO_CAPTURE</constant></entry>
114             <entry>Audio Capture Function Entity.</entry>
115           </row>
116           <row>
117             <entry><constant>MEDIA_ENT_F_AUDIO_PLAYBACK</constant></entry>
118             <entry>Audio Playback Function Entity.</entry>
119           </row>
120           <row>
121             <entry><constant>MEDIA_ENT_F_AUDIO_MIXER</constant></entry>
122             <entry>Audio Mixer Function Entity.</entry>
123           </row>
124           <row>
125             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_COMPOSER</constant></entry>
126             <entry>Video composer (blender). An entity capable of video
127                    composing must have at least two sink pads and one source
128                    pad, and composes input video frames onto output video
129                    frames. Composition can be performed using alpha blending,
130                    color keying, raster operations (ROP), stitching or any other
131                    means.
132             </entry>
133           </row>
134           <row>
135             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER</constant></entry>
136             <entry>Video pixel formatter. An entity capable of pixel formatting
137                    must have at least one sink pad and one source pad. Read
138                    pixel formatters read pixels from memory and perform a subset
139                    of unpacking, cropping, color keying, alpha multiplication
140                    and pixel encoding conversion. Write pixel formatters perform
141                    a subset of dithering, pixel encoding conversion and packing
142                    and write pixels to memory.
143             </entry>
144           </row>
145           <row>
146             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV</constant></entry>
147             <entry>Video pixel encoding converter. An entity capable of pixel
148                    enconding conversion must have at least one sink pad and one
149                    source pad, and convert the encoding of pixels received on
150                    its sink pad(s) to a different encoding output on its source
151                    pad(s). Pixel encoding conversion includes but isn't limited
152                    to RGB to/from HSV, RGB to/from YUV and CFA (Bayer) to RGB
153                    conversions.
154             </entry>
155           </row>
156           <row>
157             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_LUT</constant></entry>
158             <entry>Video look-up table. An entity capable of video lookup table
159                    processing must have one sink pad and one source pad. It uses
160                    the values of the pixels received on its sink pad to look up
161                    entries in internal tables and output them on its source pad.
162                    The lookup processing can be performed on all components
163                    separately or combine them for multi-dimensional table
164                    lookups.
165             </entry>
166           </row>
167           <row>
168             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_SCALER</constant></entry>
169             <entry>Video scaler. An entity capable of video scaling must have
170                    at least one sink pad and one source pad, and scale the
171                    video frame(s) received on its sink pad(s) to a different
172                    resolution output on its source pad(s). The range of
173                    supported scaling ratios is entity-specific and can differ
174                    between the horizontal and vertical directions (in particular
175                    scaling can be supported in one direction only). Binning and
176                    skipping are considered as scaling.
177             </entry>
178           </row>
179           <row>
180             <entry><constant>MEDIA_ENT_F_PROC_VIDEO_STATISTICS</constant></entry>
181             <entry>Video statistics computation (histogram, 3A, ...). An entity
182                    capable of statistics computation must have one sink pad and
183                    one source pad. It computes statistics over the frames
184                    received on its sink pad and outputs the statistics data on
185                    its source pad.
186             </entry>
187           </row>
188         </tbody>
189       </tgroup>
190     </table>
191
192     <table frame="none" pgwide="1" id="media-entity-flag">
193       <title>Media entity flags</title>
194       <tgroup cols="2">
195         <colspec colname="c1"/>
196         <colspec colname="c2"/>
197         <tbody valign="top">
198           <row>
199             <entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
200             <entry>Default entity for its type. Used to discover the default
201             audio, VBI and video devices, the default camera sensor, ...</entry>
202           </row>
203           <row>
204             <entry><constant>MEDIA_ENT_FL_CONNECTOR</constant></entry>
205             <entry>The entity represents a data conector</entry>
206           </row>
207         </tbody>
208       </tgroup>
209     </table>
210
211     <table frame="none" pgwide="1" id="media-intf-type">
212       <title>Media interface types</title>
213       <tgroup cols="3">
214         <colspec colname="c1"/>
215         <colspec colname="c2"/>
216         <colspec colname="c3"/>
217         <tbody valign="top">
218           <row>
219             <entry><constant>MEDIA_INTF_T_DVB_FE</constant></entry>
220             <entry>Device node interface for the Digital TV frontend</entry>
221             <entry>typically, /dev/dvb/adapter?/frontend?</entry>
222           </row>
223           <row>
224             <entry><constant>MEDIA_INTF_T_DVB_DEMUX</constant></entry>
225             <entry>Device node interface for the Digital TV demux</entry>
226             <entry>typically, /dev/dvb/adapter?/demux?</entry>
227           </row>
228           <row>
229             <entry><constant>MEDIA_INTF_T_DVB_DVR</constant></entry>
230             <entry>Device node interface for the Digital TV DVR</entry>
231             <entry>typically, /dev/dvb/adapter?/dvr?</entry>
232           </row>
233           <row>
234             <entry><constant>MEDIA_INTF_T_DVB_CA</constant></entry>
235             <entry>Device node interface for the Digital TV Conditional Access</entry>
236             <entry>typically, /dev/dvb/adapter?/ca?</entry>
237           </row>
238           <row>
239             <entry><constant>MEDIA_INTF_T_DVB_FE</constant></entry>
240             <entry>Device node interface for the Digital TV network control</entry>
241             <entry>typically, /dev/dvb/adapter?/net?</entry>
242           </row>
243           <row>
244             <entry><constant>MEDIA_INTF_T_V4L_VIDEO</constant></entry>
245             <entry>Device node interface for video (V4L)</entry>
246             <entry>typically, /dev/video?</entry>
247           </row>
248           <row>
249             <entry><constant>MEDIA_INTF_T_V4L_VBI</constant></entry>
250             <entry>Device node interface for VBI (V4L)</entry>
251             <entry>typically, /dev/vbi?</entry>
252           </row>
253           <row>
254             <entry><constant>MEDIA_INTF_T_V4L_RADIO</constant></entry>
255             <entry>Device node interface for radio (V4L)</entry>
256             <entry>typically, /dev/vbi?</entry>
257           </row>
258           <row>
259             <entry><constant>MEDIA_INTF_T_V4L_SUBDEV</constant></entry>
260             <entry>Device node interface for a V4L subdevice</entry>
261             <entry>typically, /dev/v4l-subdev?</entry>
262           </row>
263           <row>
264             <entry><constant>MEDIA_INTF_T_V4L_SWRADIO</constant></entry>
265             <entry>Device node interface for Software Defined Radio (V4L)</entry>
266             <entry>typically, /dev/swradio?</entry>
267           </row>
268           <row>
269             <entry><constant>MEDIA_INTF_T_ALSA_PCM_CAPTURE</constant></entry>
270             <entry>Device node interface for ALSA PCM Capture</entry>
271             <entry>typically, /dev/snd/pcmC?D?c</entry>
272           </row>
273           <row>
274             <entry><constant>MEDIA_INTF_T_ALSA_PCM_PLAYBACK</constant></entry>
275             <entry>Device node interface for ALSA PCM Playback</entry>
276             <entry>typically, /dev/snd/pcmC?D?p</entry>
277           </row>
278           <row>
279             <entry><constant>MEDIA_INTF_T_ALSA_CONTROL</constant></entry>
280             <entry>Device node interface for ALSA Control</entry>
281             <entry>typically, /dev/snd/controlC?</entry>
282           </row>
283           <row>
284             <entry><constant>MEDIA_INTF_T_ALSA_COMPRESS</constant></entry>
285             <entry>Device node interface for ALSA Compress</entry>
286             <entry>typically, /dev/snd/compr?</entry>
287           </row>
288           <row>
289             <entry><constant>MEDIA_INTF_T_ALSA_RAWMIDI</constant></entry>
290             <entry>Device node interface for ALSA Raw MIDI</entry>
291             <entry>typically, /dev/snd/midi?</entry>
292           </row>
293           <row>
294             <entry><constant>MEDIA_INTF_T_ALSA_HWDEP</constant></entry>
295             <entry>Device node interface for ALSA Hardware Dependent</entry>
296             <entry>typically, /dev/snd/hwC?D?</entry>
297           </row>
298           <row>
299             <entry><constant>MEDIA_INTF_T_ALSA_SEQUENCER</constant></entry>
300             <entry>Device node interface for ALSA Sequencer</entry>
301             <entry>typically, /dev/snd/seq</entry>
302           </row>
303           <row>
304             <entry><constant>MEDIA_INTF_T_ALSA_TIMER</constant></entry>
305             <entry>Device node interface for ALSA Timer</entry>
306             <entry>typically, /dev/snd/timer</entry>
307           </row>
308         </tbody>
309       </tgroup>
310     </table>
311
312     <table frame="none" pgwide="1" id="media-pad-flag">
313       <title>Media pad flags</title>
314       <tgroup cols="2">
315         <colspec colname="c1"/>
316         <colspec colname="c2"/>
317         <tbody valign="top">
318           <row>
319             <entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
320             <entry>Input pad, relative to the entity. Input pads sink data and
321             are targets of links.</entry>
322           </row>
323           <row>
324             <entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
325             <entry>Output pad, relative to the entity. Output pads source data
326             and are origins of links.</entry>
327           </row>
328           <row>
329             <entry><constant>MEDIA_PAD_FL_MUST_CONNECT</constant></entry>
330             <entry>If this flag is set and the pad is linked to any other
331             pad, then at least one of those links must be enabled for the
332             entity to be able to stream. There could be temporary reasons
333             (e.g. device configuration dependent) for the pad to need
334             enabled links even when this flag isn't set; the absence of the
335             flag doesn't imply there is none.</entry>
336           </row>
337         </tbody>
338       </tgroup>
339     </table>
340
341     <para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
342     <constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
343
344     <table frame="none" pgwide="1" id="media-link-flag">
345       <title>Media link flags</title>
346       <tgroup cols="2">
347         <colspec colname="c1"/>
348         <colspec colname="c2"/>
349         <tbody valign="top">
350           <row>
351             <entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
352             <entry>The link is enabled and can be used to transfer media data.
353             When two or more links target a sink pad, only one of them can be
354             enabled at a time.</entry>
355           </row>
356           <row>
357             <entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
358             <entry>The link enabled state can't be modified at runtime. An
359             immutable link is always enabled.</entry>
360           </row>
361           <row>
362             <entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
363             <entry>The link enabled state can be modified during streaming. This
364             flag is set by drivers and is read-only for applications.</entry>
365           </row>
366           <row>
367             <entry><constant>MEDIA_LNK_FL_LINK_TYPE</constant></entry>
368             <entry><para>This is a bitmask that defines the type of the link.
369                    Currently, two types of links are supported:</para>
370             <para><constant>MEDIA_LNK_FL_DATA_LINK</constant>
371             if the link is between two pads</para>
372             <para><constant>MEDIA_LNK_FL_INTERFACE_LINK</constant>
373             if the link is between an interface and an entity</para></entry>
374           </row>
375         </tbody>
376       </tgroup>
377     </table>
378
379 </section>