← Documents Documentation/userspace-api/media/mediactl/media-types.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / Media Controller

Media graph element type과 flag

Media graph의 entity function, interface type, pad와 link flag 및 link type symbol을 정의합니다.

Source pathDocumentation/userspace-api/media/mediactl/media-types.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

media-types.rst:1-431

이 symbol 집합은 media graph를 탐색하고 설정할 때 해석의 기준이 됩니다. Entity function은 component 역할, interface type은 device node API, pad flag는 data 방향, link flag와 type은 연결 상태와 관계 종류를 나타냅니다. ID나 device node 이름을 hardcode하기보다 topology가 반환한 type과 flag를 기준으로 graph를 구성해야 합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _media-controller-types:
4
5 Types and flags used to represent the media graph elements
6 ==========================================================
7
8 .. tabularcolumns:: |p{8.2cm}|p{9.3cm}|
9
10 .. _media-entity-functions:
11 .. _MEDIA-ENT-F-UNKNOWN:
12 .. _MEDIA-ENT-F-V4L2-SUBDEV-UNKNOWN:
13 .. _MEDIA-ENT-F-IO-V4L:
14 .. _MEDIA-ENT-F-IO-VBI:
15 .. _MEDIA-ENT-F-IO-SWRADIO:
16 .. _MEDIA-ENT-F-IO-DTV:
17 .. _MEDIA-ENT-F-DTV-DEMOD:
18 .. _MEDIA-ENT-F-TS-DEMUX:
19 .. _MEDIA-ENT-F-DTV-CA:
20 .. _MEDIA-ENT-F-DTV-NET-DECAP:
21 .. _MEDIA-ENT-F-CONN-RF:
22 .. _MEDIA-ENT-F-CONN-SVIDEO:
23 .. _MEDIA-ENT-F-CONN-COMPOSITE:
24 .. _MEDIA-ENT-F-CAM-SENSOR:
25 .. _MEDIA-ENT-F-FLASH:
26 .. _MEDIA-ENT-F-LENS:
27 .. _MEDIA-ENT-F-ATV-DECODER:
28 .. _MEDIA-ENT-F-TUNER:
29 .. _MEDIA-ENT-F-IF-VID-DECODER:
30 .. _MEDIA-ENT-F-IF-AUD-DECODER:
31 .. _MEDIA-ENT-F-AUDIO-CAPTURE:
32 .. _MEDIA-ENT-F-AUDIO-PLAYBACK:
33 .. _MEDIA-ENT-F-AUDIO-MIXER:
34 .. _MEDIA-ENT-F-PROC-VIDEO-COMPOSER:
35 .. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-FORMATTER:
36 .. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-ENC-CONV:
37 .. _MEDIA-ENT-F-PROC-VIDEO-LUT:
38 .. _MEDIA-ENT-F-PROC-VIDEO-SCALER:
39 .. _MEDIA-ENT-F-PROC-VIDEO-STATISTICS:
40 .. _MEDIA-ENT-F-PROC-VIDEO-ENCODER:
41 .. _MEDIA-ENT-F-PROC-VIDEO-DECODER:
42 .. _MEDIA-ENT-F-PROC-VIDEO-ISP:
43 .. _MEDIA-ENT-F-VID-MUX:
44 .. _MEDIA-ENT-F-VID-IF-BRIDGE:
45 .. _MEDIA-ENT-F-DV-DECODER:
46 .. _MEDIA-ENT-F-DV-ENCODER:
47
48 .. cssclass:: longtable
49
50 .. flat-table:: Media entity functions
51 :header-rows: 0
52 :stub-columns: 0
53
54 * - ``MEDIA_ENT_F_UNKNOWN`` and
55 ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
56 - Unknown entity. That generally indicates that a driver didn't
57 initialize properly the entity, which is a Kernel bug
58
59 * - ``MEDIA_ENT_F_IO_V4L``
60 - Data streaming input and/or output entity.
61
62 * - ``MEDIA_ENT_F_IO_VBI``
63 - V4L VBI streaming input or output entity
64
65 * - ``MEDIA_ENT_F_IO_SWRADIO``
66 - V4L Software Digital Radio (SDR) streaming input or output entity
67
68 * - ``MEDIA_ENT_F_IO_DTV``
69 - DVB Digital TV streaming input or output entity
70
71 * - ``MEDIA_ENT_F_DTV_DEMOD``
72 - Digital TV demodulator entity.
73
74 * - ``MEDIA_ENT_F_TS_DEMUX``
75 - MPEG Transport stream demux entity. Could be implemented on
76 hardware or in Kernelspace by the Linux DVB subsystem.
77
78 * - ``MEDIA_ENT_F_DTV_CA``
79 - Digital TV Conditional Access module (CAM) entity
80
81 * - ``MEDIA_ENT_F_DTV_NET_DECAP``
82 - Digital TV network ULE/MLE desencapsulation entity. Could be
83 implemented on hardware or in Kernelspace
84
85 * - ``MEDIA_ENT_F_CONN_RF``
86 - Connector for a Radio Frequency (RF) signal.
87
88 * - ``MEDIA_ENT_F_CONN_SVIDEO``
89 - Connector for a S-Video signal.
90
91 * - ``MEDIA_ENT_F_CONN_COMPOSITE``
92 - Connector for a RGB composite signal.
93
94 * - ``MEDIA_ENT_F_CAM_SENSOR``
95 - Camera video sensor entity.
96
97 * - ``MEDIA_ENT_F_FLASH``
98 - Flash controller entity.
99
100 * - ``MEDIA_ENT_F_LENS``
101 - Lens controller entity.
102
103 * - ``MEDIA_ENT_F_ATV_DECODER``
104 - Analog video decoder, the basic function of the video decoder is
105 to accept analogue video from a wide variety of sources such as
106 broadcast, DVD players, cameras and video cassette recorders, in
107 either NTSC, PAL, SECAM or HD format, separating the stream into
108 its component parts, luminance and chrominance, and output it in
109 some digital video standard, with appropriate timing signals.
110
111 * - ``MEDIA_ENT_F_TUNER``
112 - Digital TV, analog TV, radio and/or software radio tuner, with
113 consists on a PLL tuning stage that converts radio frequency (RF)
114 signal into an Intermediate Frequency (IF). Modern tuners have
115 internally IF-PLL decoders for audio and video, but older models
116 have those stages implemented on separate entities.
117
118 * - ``MEDIA_ENT_F_IF_VID_DECODER``
119 - IF-PLL video decoder. It receives the IF from a PLL and decodes
120 the analog TV video signal. This is commonly found on some very
121 old analog tuners, like Philips MK3 designs. They all contain a
122 tda9887 (or some software compatible similar chip, like tda9885).
123 Those devices use a different I2C address than the tuner PLL.
124
125 * - ``MEDIA_ENT_F_IF_AUD_DECODER``
126 - IF-PLL sound decoder. It receives the IF from a PLL and decodes
127 the analog TV audio signal. This is commonly found on some very
128 old analog hardware, like Micronas msp3400, Philips tda9840,
129 tda985x, etc. Those devices use a different I2C address than the
130 tuner PLL and should be controlled together with the IF-PLL video
131 decoder.
132
133 * - ``MEDIA_ENT_F_AUDIO_CAPTURE``
134 - Audio Capture Function Entity.
135
136 * - ``MEDIA_ENT_F_AUDIO_PLAYBACK``
137 - Audio Playback Function Entity.
138
139 * - ``MEDIA_ENT_F_AUDIO_MIXER``
140 - Audio Mixer Function Entity.
141
142 * - ``MEDIA_ENT_F_PROC_VIDEO_COMPOSER``
143 - Video composer (blender). An entity capable of video
144 composing must have at least two sink pads and one source
145 pad, and composes input video frames onto output video
146 frames. Composition can be performed using alpha blending,
147 color keying, raster operations (ROP), stitching or any other
148 means.
149
150 * - ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER``
151 - Video pixel formatter. An entity capable of pixel formatting
152 must have at least one sink pad and one source pad. Read
153 pixel formatters read pixels from memory and perform a subset
154 of unpacking, cropping, color keying, alpha multiplication
155 and pixel encoding conversion. Write pixel formatters perform
156 a subset of dithering, pixel encoding conversion and packing
157 and write pixels to memory.
158
159 * - ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV``
160 - Video pixel encoding converter. An entity capable of pixel
161 encoding conversion must have at least one sink pad and one
162 source pad, and convert the encoding of pixels received on
163 its sink pad(s) to a different encoding output on its source
164 pad(s). Pixel encoding conversion includes but isn't limited
165 to RGB to/from HSV, RGB to/from YUV and CFA (Bayer) to RGB
166 conversions.
167
168 * - ``MEDIA_ENT_F_PROC_VIDEO_LUT``
169 - Video look-up table. An entity capable of video lookup table
170 processing must have one sink pad and one source pad. It uses
171 the values of the pixels received on its sink pad to look up
172 entries in internal tables and output them on its source pad.
173 The lookup processing can be performed on all components
174 separately or combine them for multi-dimensional table
175 lookups.
176
177 * - ``MEDIA_ENT_F_PROC_VIDEO_SCALER``
178 - Video scaler. An entity capable of video scaling must have
179 at least one sink pad and one source pad, and scale the
180 video frame(s) received on its sink pad(s) to a different
181 resolution output on its source pad(s). The range of
182 supported scaling ratios is entity-specific and can differ
183 between the horizontal and vertical directions (in particular
184 scaling can be supported in one direction only). Binning and
185 sub-sampling (occasionally also referred to as skipping) are
186 considered as scaling.
187
188 * - ``MEDIA_ENT_F_PROC_VIDEO_STATISTICS``
189 - Video statistics computation (histogram, 3A, etc.). An entity
190 capable of statistics computation must have one sink pad and
191 one source pad. It computes statistics over the frames
192 received on its sink pad and outputs the statistics data on
193 its source pad.
194
195 * - ``MEDIA_ENT_F_PROC_VIDEO_ENCODER``
196 - Video (MPEG, HEVC, VPx, etc.) encoder. An entity capable of
197 compressing video frames. Must have one sink pad and at least
198 one source pad.
199
200 * - ``MEDIA_ENT_F_PROC_VIDEO_DECODER``
201 - Video (MPEG, HEVC, VPx, etc.) decoder. An entity capable of
202 decompressing a compressed video stream into uncompressed video
203 frames. Must have one sink pad and at least one source pad.
204
205 * - ``MEDIA_ENT_F_PROC_VIDEO_ISP``
206 - An Image Signal Processor (ISP) device. ISPs generally are one of a
207 kind devices that have their specific control interfaces using a
208 combination of custom V4L2 controls and IOCTLs, and parameters
209 supplied in a metadata buffer.
210
211 * - ``MEDIA_ENT_F_VID_MUX``
212 - Video multiplexer. An entity capable of multiplexing must have at
213 least two sink pads and one source pad, and must pass the video
214 frame(s) received from the active sink pad to the source pad.
215
216 * - ``MEDIA_ENT_F_VID_IF_BRIDGE``
217 - Video interface bridge. A video interface bridge entity must have at
218 least one sink pad and at least one source pad. It receives video
219 frames on its sink pad from an input video bus of one type (HDMI, eDP,
220 MIPI CSI-2, etc.), and outputs them on its source pad to an output
221 video bus of another type (eDP, MIPI CSI-2, parallel, etc.).
222
223 * - ``MEDIA_ENT_F_DV_DECODER``
224 - Digital video decoder. The basic function of the video decoder is
225 to accept digital video from a wide variety of sources
226 and output it in some digital video standard, with appropriate
227 timing signals.
228
229 * - ``MEDIA_ENT_F_DV_ENCODER``
230 - Digital video encoder. The basic function of the video encoder is
231 to accept digital video from some digital video standard with
232 appropriate timing signals (usually a parallel video bus with sync
233 signals) and output this to a digital video output connector such
234 as HDMI or DisplayPort.
235
236 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
237
238 .. _media-entity-flag:
239 .. _MEDIA-ENT-FL-DEFAULT:
240 .. _MEDIA-ENT-FL-CONNECTOR:
241
242 .. flat-table:: Media entity flags
243 :header-rows: 0
244 :stub-columns: 0
245
246 * - ``MEDIA_ENT_FL_DEFAULT``
247 - Default entity for its type. Used to discover the default audio,
248 VBI and video devices, the default camera sensor, etc.
249
250 * - ``MEDIA_ENT_FL_CONNECTOR``
251 - The entity represents a connector.
252
253
254 .. tabularcolumns:: |p{6.5cm}|p{6.0cm}|p{4.8cm}|
255
256 .. _media-intf-type:
257 .. _MEDIA-INTF-T-DVB-FE:
258 .. _MEDIA-INTF-T-DVB-DEMUX:
259 .. _MEDIA-INTF-T-DVB-DVR:
260 .. _MEDIA-INTF-T-DVB-CA:
261 .. _MEDIA-INTF-T-DVB-NET:
262 .. _MEDIA-INTF-T-V4L-VIDEO:
263 .. _MEDIA-INTF-T-V4L-VBI:
264 .. _MEDIA-INTF-T-V4L-RADIO:
265 .. _MEDIA-INTF-T-V4L-SUBDEV:
266 .. _MEDIA-INTF-T-V4L-SWRADIO:
267 .. _MEDIA-INTF-T-V4L-TOUCH:
268 .. _MEDIA-INTF-T-ALSA-PCM-CAPTURE:
269 .. _MEDIA-INTF-T-ALSA-PCM-PLAYBACK:
270 .. _MEDIA-INTF-T-ALSA-CONTROL:
271 .. _MEDIA-INTF-T-ALSA-COMPRESS:
272 .. _MEDIA-INTF-T-ALSA-RAWMIDI:
273 .. _MEDIA-INTF-T-ALSA-HWDEP:
274 .. _MEDIA-INTF-T-ALSA-SEQUENCER:
275 .. _MEDIA-INTF-T-ALSA-TIMER:
276
277 .. flat-table:: Media interface types
278 :header-rows: 0
279 :stub-columns: 0
280
281 * - ``MEDIA_INTF_T_DVB_FE``
282 - Device node interface for the Digital TV frontend
283 - typically, /dev/dvb/adapter?/frontend?
284
285 * - ``MEDIA_INTF_T_DVB_DEMUX``
286 - Device node interface for the Digital TV demux
287 - typically, /dev/dvb/adapter?/demux?
288
289 * - ``MEDIA_INTF_T_DVB_DVR``
290 - Device node interface for the Digital TV DVR
291 - typically, /dev/dvb/adapter?/dvr?
292
293 * - ``MEDIA_INTF_T_DVB_CA``
294 - Device node interface for the Digital TV Conditional Access
295 - typically, /dev/dvb/adapter?/ca?
296
297 * - ``MEDIA_INTF_T_DVB_NET``
298 - Device node interface for the Digital TV network control
299 - typically, /dev/dvb/adapter?/net?
300
301 * - ``MEDIA_INTF_T_V4L_VIDEO``
302 - Device node interface for video (V4L)
303 - typically, /dev/video?
304
305 * - ``MEDIA_INTF_T_V4L_VBI``
306 - Device node interface for VBI (V4L)
307 - typically, /dev/vbi?
308
309 * - ``MEDIA_INTF_T_V4L_RADIO``
310 - Device node interface for radio (V4L)
311 - typically, /dev/radio?
312
313 * - ``MEDIA_INTF_T_V4L_SUBDEV``
314 - Device node interface for a V4L subdevice
315 - typically, /dev/v4l-subdev?
316
317 * - ``MEDIA_INTF_T_V4L_SWRADIO``
318 - Device node interface for Software Defined Radio (V4L)
319 - typically, /dev/swradio?
320
321 * - ``MEDIA_INTF_T_V4L_TOUCH``
322 - Device node interface for Touch device (V4L)
323 - typically, /dev/v4l-touch?
324
325 * - ``MEDIA_INTF_T_ALSA_PCM_CAPTURE``
326 - Device node interface for ALSA PCM Capture
327 - typically, /dev/snd/pcmC?D?c
328
329 * - ``MEDIA_INTF_T_ALSA_PCM_PLAYBACK``
330 - Device node interface for ALSA PCM Playback
331 - typically, /dev/snd/pcmC?D?p
332
333 * - ``MEDIA_INTF_T_ALSA_CONTROL``
334 - Device node interface for ALSA Control
335 - typically, /dev/snd/controlC?
336
337 * - ``MEDIA_INTF_T_ALSA_COMPRESS``
338 - Device node interface for ALSA Compress
339 - typically, /dev/snd/compr?
340
341 * - ``MEDIA_INTF_T_ALSA_RAWMIDI``
342 - Device node interface for ALSA Raw MIDI
343 - typically, /dev/snd/midi?
344
345 * - ``MEDIA_INTF_T_ALSA_HWDEP``
346 - Device node interface for ALSA Hardware Dependent
347 - typically, /dev/snd/hwC?D?
348
349 * - ``MEDIA_INTF_T_ALSA_SEQUENCER``
350 - Device node interface for ALSA Sequencer
351 - typically, /dev/snd/seq
352
353 * - ``MEDIA_INTF_T_ALSA_TIMER``
354 - Device node interface for ALSA Timer
355 - typically, /dev/snd/timer
356
357
358 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
359
360 .. _media-pad-flag:
361 .. _MEDIA-PAD-FL-SINK:
362 .. _MEDIA-PAD-FL-SOURCE:
363 .. _MEDIA-PAD-FL-MUST-CONNECT:
364
365 .. flat-table:: Media pad flags
366 :header-rows: 0
367 :stub-columns: 0
368
369 * - ``MEDIA_PAD_FL_SINK``
370 - Input pad, relative to the entity. Input pads sink data and are
371 targets of links.
372
373 * - ``MEDIA_PAD_FL_SOURCE``
374 - Output pad, relative to the entity. Output pads source data and
375 are origins of links.
376
377 * - ``MEDIA_PAD_FL_MUST_CONNECT``
378 - If this flag is set, then for this pad to be able to stream, it must
379 be connected by at least one enabled link. There could be temporary
380 reasons (e.g. device configuration dependent) for the pad to need
381 enabled links even when this flag isn't set; the absence of the flag
382 doesn't imply there is none.
383
384
385 One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
386 must be set for every pad.
387
388 .. tabularcolumns:: |p{5.5cm}|p{12.0cm}|
389
390 .. _media-link-flag:
391 .. _MEDIA-LNK-FL-ENABLED:
392 .. _MEDIA-LNK-FL-IMMUTABLE:
393 .. _MEDIA-LNK-FL-DYNAMIC:
394 .. _MEDIA-LNK-FL-LINK-TYPE:
395
396 .. flat-table:: Media link flags
397 :header-rows: 0
398 :stub-columns: 0
399
400 * - ``MEDIA_LNK_FL_ENABLED``
401 - The link is enabled and can be used to transfer media data. When
402 two or more links target a sink pad, only one of them can be
403 enabled at a time.
404
405 * - ``MEDIA_LNK_FL_IMMUTABLE``
406 - The link enabled state can't be modified at runtime. An immutable
407 link is always enabled.
408
409 * - ``MEDIA_LNK_FL_DYNAMIC``
410 - The link enabled state can be modified during streaming. This flag
411 is set by drivers and is read-only for applications.
412
413 * - ``MEDIA_LNK_FL_LINK_TYPE``
414 - This is a bitmask that defines the type of the link. The following
415 link types are currently supported:
416
417 .. _MEDIA-LNK-FL-DATA-LINK:
418
419 ``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection
420 between two pads.
421
422 .. _MEDIA-LNK-FL-INTERFACE-LINK:
423
424 ``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its
425 interface.
426
427 .. _MEDIA-LNK-FL-ANCILLARY-LINK:
428
429 ``MEDIA_LNK_FL_ANCILLARY_LINK`` for links that represent a physical
430 relationship between two entities. The link may or may not be
431 immutable, so applications must not assume either case.
432

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

범위와 entity function anchor

1-49

이 문서는 Media Controller API가 graph element를 표현할 때 사용하는 entity function, entity flag, interface type, pad flag, link flag와 link type을 정의합니다.

Entity function은 graph 안에서 component가 수행하는 주 역할을 나타냅니다. 같은 물리 장치 안에서도 sensor, tuner, decoder, scaler, interface bridge처럼 역할이 다른 block은 서로 다른 entity와 function으로 표현될 수 있습니다.

Media graph element 분류
Entity: MEDIA_ENT_F_* function과 MEDIA_ENT_FL_* flagInterface: MEDIA_INTF_T_* device node typePad: MEDIA_PAD_FL_SINK 또는 MEDIA_PAD_FL_SOURCE와 연결 요구 flagLink: enable 상태, 변경 가능성, streaming 중 동적 변경 여부Link type: data, interface association, ancillary physical relationship

각 graph object에 적용되는 type과 flag 집합을 구분합니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later

.. _media-controller-types:

Types and flags used to represent the media graph elements
==========================================================

..  tabularcolumns:: |p{8.2cm}|p{9.3cm}|

.. _media-entity-functions:
.. _MEDIA-ENT-F-UNKNOWN:
.. _MEDIA-ENT-F-V4L2-SUBDEV-UNKNOWN:
.. _MEDIA-ENT-F-IO-V4L:
.. _MEDIA-ENT-F-IO-VBI:
.. _MEDIA-ENT-F-IO-SWRADIO:
.. _MEDIA-ENT-F-IO-DTV:
.. _MEDIA-ENT-F-DTV-DEMOD:
.. _MEDIA-ENT-F-TS-DEMUX:
.. _MEDIA-ENT-F-DTV-CA:
.. _MEDIA-ENT-F-DTV-NET-DECAP:
.. _MEDIA-ENT-F-CONN-RF:
.. _MEDIA-ENT-F-CONN-SVIDEO:
.. _MEDIA-ENT-F-CONN-COMPOSITE:
.. _MEDIA-ENT-F-CAM-SENSOR:
.. _MEDIA-ENT-F-FLASH:
.. _MEDIA-ENT-F-LENS:
.. _MEDIA-ENT-F-ATV-DECODER:
.. _MEDIA-ENT-F-TUNER:
.. _MEDIA-ENT-F-IF-VID-DECODER:
.. _MEDIA-ENT-F-IF-AUD-DECODER:
.. _MEDIA-ENT-F-AUDIO-CAPTURE:
.. _MEDIA-ENT-F-AUDIO-PLAYBACK:
.. _MEDIA-ENT-F-AUDIO-MIXER:
.. _MEDIA-ENT-F-PROC-VIDEO-COMPOSER:
.. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-FORMATTER:
.. _MEDIA-ENT-F-PROC-VIDEO-PIXEL-ENC-CONV:
.. _MEDIA-ENT-F-PROC-VIDEO-LUT:
.. _MEDIA-ENT-F-PROC-VIDEO-SCALER:
.. _MEDIA-ENT-F-PROC-VIDEO-STATISTICS:
.. _MEDIA-ENT-F-PROC-VIDEO-ENCODER:
.. _MEDIA-ENT-F-PROC-VIDEO-DECODER:
.. _MEDIA-ENT-F-PROC-VIDEO-ISP:
.. _MEDIA-ENT-F-VID-MUX:
.. _MEDIA-ENT-F-VID-IF-BRIDGE:
.. _MEDIA-ENT-F-DV-DECODER:
.. _MEDIA-ENT-F-DV-ENCODER:

.. cssclass:: longtable

Media entity function: 입출력, broadcast와 analog front end

50-132

첫 번째 function 묶음은 streaming I/O, DTV 처리, connector, camera 주변 장치와 analog tuner front end를 설명합니다.

Media entity functions: I/O와 front end
symbol의미
MEDIA_ENT_F_UNKNOWN / MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN알 수 없는 entity. 일반적으로 driver가 entity를 올바르게 초기화하지 않은 kernel bug를 뜻함
MEDIA_ENT_F_IO_V4LData streaming input 및 output entity
MEDIA_ENT_F_IO_VBIV4L VBI streaming input 또는 output entity
MEDIA_ENT_F_IO_SWRADIOV4L Software Defined Radio(SDR) streaming input 또는 output entity
MEDIA_ENT_F_IO_DTVDVB Digital TV streaming input 또는 output entity
MEDIA_ENT_F_DTV_DEMODDigital TV demodulator entity
MEDIA_ENT_F_TS_DEMUXMPEG Transport Stream demux entity. Hardware 또는 Linux DVB subsystem의 kernelspace에서 구현 가능
MEDIA_ENT_F_DTV_CADigital TV Conditional Access Module(CAM) entity
MEDIA_ENT_F_DTV_NET_DECAPDigital TV network ULE/MLE decapsulation entity. Hardware 또는 kernelspace에서 구현 가능
MEDIA_ENT_F_CONN_RFRadio Frequency(RF) signal connector
MEDIA_ENT_F_CONN_SVIDEOS-Video signal connector
MEDIA_ENT_F_CONN_COMPOSITERGB composite signal connector
MEDIA_ENT_F_CAM_SENSORCamera video sensor entity
MEDIA_ENT_F_FLASHFlash controller entity
MEDIA_ENT_F_LENSLens controller entity
MEDIA_ENT_F_ATV_DECODERAnalog video decoder. Broadcast, DVD player, camera, VCR 등의 NTSC, PAL, SECAM, HD analog video를 받아 luminance와 chrominance 성분으로 분리하고 timing signal을 갖춘 digital video standard로 출력
MEDIA_ENT_F_TUNERDigital TV, analog TV, radio 또는 software radio tuner. PLL tuning stage가 RF signal을 Intermediate Frequency(IF)로 변환. 최신 tuner는 audio/video IF-PLL decoder를 내부에 포함하지만 구형 모델은 별도 entity로 구현
MEDIA_ENT_F_IF_VID_DECODERIF-PLL video decoder. PLL의 IF를 받아 analog TV video를 decode. Philips MK3 같은 구형 tuner의 tda9887, tda9885 계열에서 흔하며 tuner PLL과 다른 I2C address를 사용
MEDIA_ENT_F_IF_AUD_DECODERIF-PLL sound decoder. PLL의 IF를 받아 analog TV audio를 decode. Micronas msp3400, Philips tda9840, tda985x 등에서 사용하며 별도 I2C address를 가지고 IF-PLL video decoder와 함께 제어

Unknown 값은 정상적인 범용 분류가 아니라 driver 초기화 결함을 가리킵니다.

구형 analog 구성에서는 tuner PLL, IF video decoder, IF audio decoder가 서로 다른 I2C address와 entity를 가질 수 있습니다. Application은 하나의 통합 tuner block이라고 가정하지 말고 graph 관계를 따라야 합니다.

.. flat-table:: Media entity functions
    :header-rows:  0
    :stub-columns: 0

    *  -  ``MEDIA_ENT_F_UNKNOWN`` and
	  ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN``
       -  Unknown entity. That generally indicates that a driver didn't
	  initialize properly the entity, which is a Kernel bug

    *  -  ``MEDIA_ENT_F_IO_V4L``
       -  Data streaming input and/or output entity.

    *  -  ``MEDIA_ENT_F_IO_VBI``
       -  V4L VBI streaming input or output entity

    *  -  ``MEDIA_ENT_F_IO_SWRADIO``
       -  V4L Software Digital Radio (SDR) streaming input or output entity

    *  -  ``MEDIA_ENT_F_IO_DTV``
       -  DVB Digital TV streaming input or output entity

    *  -  ``MEDIA_ENT_F_DTV_DEMOD``
       -  Digital TV demodulator entity.

    *  -  ``MEDIA_ENT_F_TS_DEMUX``
       -  MPEG Transport stream demux entity. Could be implemented on
	  hardware or in Kernelspace by the Linux DVB subsystem.

    *  -  ``MEDIA_ENT_F_DTV_CA``
       -  Digital TV Conditional Access module (CAM) entity

    *  -  ``MEDIA_ENT_F_DTV_NET_DECAP``
       -  Digital TV network ULE/MLE desencapsulation entity. Could be
	  implemented on hardware or in Kernelspace

    *  -  ``MEDIA_ENT_F_CONN_RF``
       -  Connector for a Radio Frequency (RF) signal.

    *  -  ``MEDIA_ENT_F_CONN_SVIDEO``
       -  Connector for a S-Video signal.

    *  -  ``MEDIA_ENT_F_CONN_COMPOSITE``
       -  Connector for a RGB composite signal.

    *  -  ``MEDIA_ENT_F_CAM_SENSOR``
       -  Camera video sensor entity.

    *  -  ``MEDIA_ENT_F_FLASH``
       -  Flash controller entity.

    *  -  ``MEDIA_ENT_F_LENS``
       -  Lens controller entity.

    *  -  ``MEDIA_ENT_F_ATV_DECODER``
       -  Analog video decoder, the basic function of the video decoder is
	  to accept analogue video from a wide variety of sources such as
	  broadcast, DVD players, cameras and video cassette recorders, in
	  either NTSC, PAL, SECAM or HD format, separating the stream into
	  its component parts, luminance and chrominance, and output it in
	  some digital video standard, with appropriate timing signals.

    *  -  ``MEDIA_ENT_F_TUNER``
       -  Digital TV, analog TV, radio and/or software radio tuner, with
	  consists on a PLL tuning stage that converts radio frequency (RF)
	  signal into an Intermediate Frequency (IF). Modern tuners have
	  internally IF-PLL decoders for audio and video, but older models
	  have those stages implemented on separate entities.

    *  -  ``MEDIA_ENT_F_IF_VID_DECODER``
       -  IF-PLL video decoder. It receives the IF from a PLL and decodes
	  the analog TV video signal. This is commonly found on some very
	  old analog tuners, like Philips MK3 designs. They all contain a
	  tda9887 (or some software compatible similar chip, like tda9885).
	  Those devices use a different I2C address than the tuner PLL.

    *  -  ``MEDIA_ENT_F_IF_AUD_DECODER``
       -  IF-PLL sound decoder. It receives the IF from a PLL and decodes
	  the analog TV audio signal. This is commonly found on some very
	  old analog hardware, like Micronas msp3400, Philips tda9840,
	  tda985x, etc. Those devices use a different I2C address than the
	  tuner PLL and should be controlled together with the IF-PLL video
	  decoder.

Media entity function: audio와 video processing

133-235

두 번째 function 묶음은 audio endpoint와 video composition, format conversion, scaling, codec, ISP, mux, bus bridge와 digital video encode/decode block을 정의합니다.

Media entity functions: audio와 processing
symbol의미
MEDIA_ENT_F_AUDIO_CAPTUREAudio capture function entity
MEDIA_ENT_F_AUDIO_PLAYBACKAudio playback function entity
MEDIA_ENT_F_AUDIO_MIXERAudio mixer function entity
MEDIA_ENT_F_PROC_VIDEO_COMPOSERVideo composer 또는 blender. 최소 sink pad 2개와 source pad 1개가 필요하며 alpha blending, color keying, raster operation(ROP), stitching 등으로 input frame을 output frame에 합성
MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTERVideo pixel formatter. 최소 sink/source pad 각 1개 필요. Read formatter는 memory에서 pixel을 읽어 unpacking, cropping, color keying, alpha multiplication, pixel encoding conversion의 일부를 수행. Write formatter는 dithering, encoding conversion, packing의 일부를 수행해 memory에 기록
MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONVVideo pixel encoding converter. 최소 sink/source pad 각 1개가 필요하며 sink의 pixel encoding을 다른 source encoding으로 변환. RGB-HSV, RGB-YUV, CFA(Bayer)-RGB 변환 등을 포함
MEDIA_ENT_F_PROC_VIDEO_LUTVideo look-up table. sink/source pad 각 1개가 필요. Input pixel value로 내부 table entry를 찾아 source로 출력하며 component별 또는 결합된 multi-dimensional lookup 가능
MEDIA_ENT_F_PROC_VIDEO_SCALERVideo scaler. 최소 sink/source pad 각 1개가 필요하며 input frame을 다른 resolution으로 변환. Horizontal과 vertical 지원 ratio가 다를 수 있고 한 방향만 지원할 수도 있음. Binning과 sub-sampling 또는 skipping도 scaling에 포함
MEDIA_ENT_F_PROC_VIDEO_STATISTICSHistogram, 3A 등의 video statistics 계산. sink/source pad 각 1개가 필요하며 frame 통계를 계산해 source pad로 statistics data 출력
MEDIA_ENT_F_PROC_VIDEO_ENCODERMPEG, HEVC, VPx 등의 video encoder. Frame을 압축하며 sink pad 1개와 source pad 1개 이상 필요
MEDIA_ENT_F_PROC_VIDEO_DECODERMPEG, HEVC, VPx 등의 video decoder. 압축 stream을 비압축 frame으로 풀며 sink pad 1개와 source pad 1개 이상 필요
MEDIA_ENT_F_PROC_VIDEO_ISPImage Signal Processor(ISP). 보통 device 고유의 V4L2 control, ioctl과 metadata buffer parameter 조합으로 제어하는 특수 장치
MEDIA_ENT_F_VID_MUXVideo multiplexer. sink pad 2개 이상과 source pad 1개가 필요하며 active sink pad에서 받은 frame을 source pad로 전달
MEDIA_ENT_F_VID_IF_BRIDGEVideo interface bridge. sink/source pad 각 1개 이상 필요. HDMI, eDP, MIPI CSI-2 등의 한 종류 input bus에서 frame을 받아 eDP, MIPI CSI-2, parallel 등의 다른 output bus로 전달
MEDIA_ENT_F_DV_DECODERDigital video decoder. 다양한 source의 digital video를 받아 적절한 timing signal과 함께 특정 digital video standard로 출력
MEDIA_ENT_F_DV_ENCODERDigital video encoder. 일반적으로 sync signal을 포함한 parallel video bus 같은 digital standard input을 받아 HDMI 또는 DisplayPort connector로 출력

각 processing function의 최소 sink/source pad 조건과 변환 역할을 보존합니다.

Pad 개수 조건은 function을 식별하는 구조적 요구 사항입니다. 예를 들어 composer와 mux는 여러 sink가 필요하지만 LUT와 statistics block은 정확히 하나의 sink와 하나의 source를 요구합니다.

Pixel formatter는 memory read/write 주변의 packing 작업을 포함하고, pixel encoding converter는 색 공간이나 Bayer 표현처럼 pixel 의미의 encoding을 바꾼다는 점에서 구분됩니다.

    *  -  ``MEDIA_ENT_F_AUDIO_CAPTURE``
       -  Audio Capture Function Entity.

    *  -  ``MEDIA_ENT_F_AUDIO_PLAYBACK``
       -  Audio Playback Function Entity.

    *  -  ``MEDIA_ENT_F_AUDIO_MIXER``
       -  Audio Mixer Function Entity.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_COMPOSER``
       -  Video composer (blender). An entity capable of video
	  composing must have at least two sink pads and one source
	  pad, and composes input video frames onto output video
	  frames. Composition can be performed using alpha blending,
	  color keying, raster operations (ROP), stitching or any other
	  means.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER``
       -  Video pixel formatter. An entity capable of pixel formatting
	  must have at least one sink pad and one source pad. Read
	  pixel formatters read pixels from memory and perform a subset
	  of unpacking, cropping, color keying, alpha multiplication
	  and pixel encoding conversion. Write pixel formatters perform
	  a subset of dithering, pixel encoding conversion and packing
	  and write pixels to memory.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV``
       -  Video pixel encoding converter. An entity capable of pixel
	  encoding conversion must have at least one sink pad and one
	  source pad, and convert the encoding of pixels received on
	  its sink pad(s) to a different encoding output on its source
	  pad(s). Pixel encoding conversion includes but isn't limited
	  to RGB to/from HSV, RGB to/from YUV and CFA (Bayer) to RGB
	  conversions.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_LUT``
       -  Video look-up table. An entity capable of video lookup table
	  processing must have one sink pad and one source pad. It uses
	  the values of the pixels received on its sink pad to look up
	  entries in internal tables and output them on its source pad.
	  The lookup processing can be performed on all components
	  separately or combine them for multi-dimensional table
	  lookups.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_SCALER``
       -  Video scaler. An entity capable of video scaling must have
	  at least one sink pad and one source pad, and scale the
	  video frame(s) received on its sink pad(s) to a different
	  resolution output on its source pad(s). The range of
	  supported scaling ratios is entity-specific and can differ
	  between the horizontal and vertical directions (in particular
	  scaling can be supported in one direction only). Binning and
	  sub-sampling (occasionally also referred to as skipping) are
	  considered as scaling.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_STATISTICS``
       -  Video statistics computation (histogram, 3A, etc.). An entity
	  capable of statistics computation must have one sink pad and
	  one source pad. It computes statistics over the frames
	  received on its sink pad and outputs the statistics data on
	  its source pad.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_ENCODER``
       -  Video (MPEG, HEVC, VPx, etc.) encoder. An entity capable of
          compressing video frames. Must have one sink pad and at least
	  one source pad.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_DECODER``
       -  Video (MPEG, HEVC, VPx, etc.) decoder. An entity capable of
          decompressing a compressed video stream into uncompressed video
	  frames. Must have one sink pad and at least one source pad.

    *  -  ``MEDIA_ENT_F_PROC_VIDEO_ISP``
       -  An Image Signal Processor (ISP) device. ISPs generally are one of a
	  kind devices that have their specific control interfaces using a
	  combination of custom V4L2 controls and IOCTLs, and parameters
	  supplied in a metadata buffer.

    *  -  ``MEDIA_ENT_F_VID_MUX``
       - Video multiplexer. An entity capable of multiplexing must have at
         least two sink pads and one source pad, and must pass the video
         frame(s) received from the active sink pad to the source pad.

    *  -  ``MEDIA_ENT_F_VID_IF_BRIDGE``
       - Video interface bridge. A video interface bridge entity must have at
         least one sink pad and at least one source pad. It receives video
         frames on its sink pad from an input video bus of one type (HDMI, eDP,
         MIPI CSI-2, etc.), and outputs them on its source pad to an output
         video bus of another type (eDP, MIPI CSI-2, parallel, etc.).

    *  -  ``MEDIA_ENT_F_DV_DECODER``
       -  Digital video decoder. The basic function of the video decoder is
	  to accept digital video from a wide variety of sources
	  and output it in some digital video standard, with appropriate
	  timing signals.

    *  -  ``MEDIA_ENT_F_DV_ENCODER``
       -  Digital video encoder. The basic function of the video encoder is
	  to accept digital video from some digital video standard with
	  appropriate timing signals (usually a parallel video bus with sync
	  signals) and output this to a digital video output connector such
	  as HDMI or DisplayPort.

Media entity flag

236-253

Entity flag는 function과 별도로 default 선택과 connector 표현을 표시합니다.

Media entity flags
symbol의미
MEDIA_ENT_FL_DEFAULT해당 type의 default entity. 기본 audio, VBI, video device와 기본 camera sensor 등을 찾는 데 사용
MEDIA_ENT_FL_CONNECTOR이 entity가 connector를 나타냄

Type별 기본 entity와 외부 connector 여부를 나타냅니다.

`MEDIA_ENT_FL_DEFAULT`는 graph에서 유일한 영구 ID를 제공하는 flag가 아니라 특정 type의 기본 선택을 알려주는 metadata입니다.

..  tabularcolumns:: |p{5.5cm}|p{12.0cm}|

.. _media-entity-flag:
.. _MEDIA-ENT-FL-DEFAULT:
.. _MEDIA-ENT-FL-CONNECTOR:

.. flat-table:: Media entity flags
    :header-rows:  0
    :stub-columns: 0

    *  -  ``MEDIA_ENT_FL_DEFAULT``
       -  Default entity for its type. Used to discover the default audio,
	  VBI and video devices, the default camera sensor, etc.

    *  -  ``MEDIA_ENT_FL_CONNECTOR``
       -  The entity represents a connector.

Media interface type과 device node

254-357

Interface type은 entity에 연결된 userspace device node의 API family와 역할을 나타냅니다. 표의 path는 일반적인 이름이며 `?`는 adapter, card, device 번호처럼 system이 정하는 숫자 자리입니다.

Media interface types
symbol의미
MEDIA_INTF_T_DVB_FEDigital TV frontend device node, 일반적으로 /dev/dvb/adapter?/frontend?
MEDIA_INTF_T_DVB_DEMUXDigital TV demux device node, 일반적으로 /dev/dvb/adapter?/demux?
MEDIA_INTF_T_DVB_DVRDigital TV DVR device node, 일반적으로 /dev/dvb/adapter?/dvr?
MEDIA_INTF_T_DVB_CADigital TV Conditional Access device node, 일반적으로 /dev/dvb/adapter?/ca?
MEDIA_INTF_T_DVB_NETDigital TV network control device node, 일반적으로 /dev/dvb/adapter?/net?
MEDIA_INTF_T_V4L_VIDEOV4L video device node, 일반적으로 /dev/video?
MEDIA_INTF_T_V4L_VBIV4L VBI device node, 일반적으로 /dev/vbi?
MEDIA_INTF_T_V4L_RADIOV4L radio device node, 일반적으로 /dev/radio?
MEDIA_INTF_T_V4L_SUBDEVV4L subdevice node, 일반적으로 /dev/v4l-subdev?
MEDIA_INTF_T_V4L_SWRADIOV4L Software Defined Radio node, 일반적으로 /dev/swradio?
MEDIA_INTF_T_V4L_TOUCHV4L touch device node, 일반적으로 /dev/v4l-touch?
MEDIA_INTF_T_ALSA_PCM_CAPTUREALSA PCM capture node, 일반적으로 /dev/snd/pcmC?D?c
MEDIA_INTF_T_ALSA_PCM_PLAYBACKALSA PCM playback node, 일반적으로 /dev/snd/pcmC?D?p
MEDIA_INTF_T_ALSA_CONTROLALSA control node, 일반적으로 /dev/snd/controlC?
MEDIA_INTF_T_ALSA_COMPRESSALSA compress node, 일반적으로 /dev/snd/compr?
MEDIA_INTF_T_ALSA_RAWMIDIALSA Raw MIDI node, 일반적으로 /dev/snd/midi?
MEDIA_INTF_T_ALSA_HWDEPALSA hardware-dependent node, 일반적으로 /dev/snd/hwC?D?
MEDIA_INTF_T_ALSA_SEQUENCERALSA sequencer node, 일반적으로 /dev/snd/seq
MEDIA_INTF_T_ALSA_TIMERALSA timer node, 일반적으로 /dev/snd/timer

DVB, V4L과 ALSA interface type을 일반적인 device node path와 함께 정리합니다.

Device node 이름만 추측해 interface를 분류하지 말고 topology가 제공하는 `MEDIA_INTF_T_*` 값과 `media_v2_intf_devnode`의 major/minor를 기준으로 연결해야 합니다.

..  tabularcolumns:: |p{6.5cm}|p{6.0cm}|p{4.8cm}|

.. _media-intf-type:
.. _MEDIA-INTF-T-DVB-FE:
.. _MEDIA-INTF-T-DVB-DEMUX:
.. _MEDIA-INTF-T-DVB-DVR:
.. _MEDIA-INTF-T-DVB-CA:
.. _MEDIA-INTF-T-DVB-NET:
.. _MEDIA-INTF-T-V4L-VIDEO:
.. _MEDIA-INTF-T-V4L-VBI:
.. _MEDIA-INTF-T-V4L-RADIO:
.. _MEDIA-INTF-T-V4L-SUBDEV:
.. _MEDIA-INTF-T-V4L-SWRADIO:
.. _MEDIA-INTF-T-V4L-TOUCH:
.. _MEDIA-INTF-T-ALSA-PCM-CAPTURE:
.. _MEDIA-INTF-T-ALSA-PCM-PLAYBACK:
.. _MEDIA-INTF-T-ALSA-CONTROL:
.. _MEDIA-INTF-T-ALSA-COMPRESS:
.. _MEDIA-INTF-T-ALSA-RAWMIDI:
.. _MEDIA-INTF-T-ALSA-HWDEP:
.. _MEDIA-INTF-T-ALSA-SEQUENCER:
.. _MEDIA-INTF-T-ALSA-TIMER:

.. flat-table:: Media interface types
    :header-rows:  0
    :stub-columns: 0

    *  -  ``MEDIA_INTF_T_DVB_FE``
       -  Device node interface for the Digital TV frontend
       -  typically, /dev/dvb/adapter?/frontend?

    *  -  ``MEDIA_INTF_T_DVB_DEMUX``
       -  Device node interface for the Digital TV demux
       -  typically, /dev/dvb/adapter?/demux?

    *  -  ``MEDIA_INTF_T_DVB_DVR``
       -  Device node interface for the Digital TV DVR
       -  typically, /dev/dvb/adapter?/dvr?

    *  -  ``MEDIA_INTF_T_DVB_CA``
       -  Device node interface for the Digital TV Conditional Access
       -  typically, /dev/dvb/adapter?/ca?

    *  -  ``MEDIA_INTF_T_DVB_NET``
       -  Device node interface for the Digital TV network control
       -  typically, /dev/dvb/adapter?/net?

    *  -  ``MEDIA_INTF_T_V4L_VIDEO``
       -  Device node interface for video (V4L)
       -  typically, /dev/video?

    *  -  ``MEDIA_INTF_T_V4L_VBI``
       -  Device node interface for VBI (V4L)
       -  typically, /dev/vbi?

    *  -  ``MEDIA_INTF_T_V4L_RADIO``
       -  Device node interface for radio (V4L)
       -  typically, /dev/radio?

    *  -  ``MEDIA_INTF_T_V4L_SUBDEV``
       -  Device node interface for a V4L subdevice
       -  typically, /dev/v4l-subdev?

    *  -  ``MEDIA_INTF_T_V4L_SWRADIO``
       -  Device node interface for Software Defined Radio (V4L)
       -  typically, /dev/swradio?

    *  -  ``MEDIA_INTF_T_V4L_TOUCH``
       -  Device node interface for Touch device (V4L)
       -  typically, /dev/v4l-touch?

    *  -  ``MEDIA_INTF_T_ALSA_PCM_CAPTURE``
       -  Device node interface for ALSA PCM Capture
       -  typically, /dev/snd/pcmC?D?c

    *  -  ``MEDIA_INTF_T_ALSA_PCM_PLAYBACK``
       -  Device node interface for ALSA PCM Playback
       -  typically, /dev/snd/pcmC?D?p

    *  -  ``MEDIA_INTF_T_ALSA_CONTROL``
       -  Device node interface for ALSA Control
       -  typically, /dev/snd/controlC?

    *  -  ``MEDIA_INTF_T_ALSA_COMPRESS``
       -  Device node interface for ALSA Compress
       -  typically, /dev/snd/compr?

    *  -  ``MEDIA_INTF_T_ALSA_RAWMIDI``
       -  Device node interface for ALSA Raw MIDI
       -  typically, /dev/snd/midi?

    *  -  ``MEDIA_INTF_T_ALSA_HWDEP``
       -  Device node interface for ALSA Hardware Dependent
       -  typically, /dev/snd/hwC?D?

    *  -  ``MEDIA_INTF_T_ALSA_SEQUENCER``
       -  Device node interface for ALSA Sequencer
       -  typically, /dev/snd/seq

    *  -  ``MEDIA_INTF_T_ALSA_TIMER``
       -  Device node interface for ALSA Timer
       -  typically, /dev/snd/timer

Media pad flag

358-387

Pad flag는 entity를 기준으로 data가 들어오는 sink인지 나가는 source인지와 streaming을 위한 필수 연결 여부를 나타냅니다.

Media pad flags
symbol의미
MEDIA_PAD_FL_SINKEntity 기준 input pad. Data를 받아들이며 link의 target
MEDIA_PAD_FL_SOURCEEntity 기준 output pad. Data를 내보내며 link의 origin
MEDIA_PAD_FL_MUST_CONNECT이 pad가 streaming하려면 enable된 link가 하나 이상 연결되어야 함

모든 pad는 SINK와 SOURCE 중 정확히 하나만 가져야 합니다.

`MEDIA_PAD_FL_MUST_CONNECT`가 없다고 해서 enable된 link가 절대 필요 없다는 뜻은 아닙니다. Device configuration 같은 일시적 조건 때문에 flag 없이도 연결이 필요할 수 있습니다.

각 pad에는 `MEDIA_PAD_FL_SINK`와 `MEDIA_PAD_FL_SOURCE` 중 하나만 반드시 설정되어야 하며 둘 다 설정하거나 둘 다 비우는 것은 올바른 표현이 아닙니다.

.. tabularcolumns:: |p{5.5cm}|p{12.0cm}|

.. _media-pad-flag:
.. _MEDIA-PAD-FL-SINK:
.. _MEDIA-PAD-FL-SOURCE:
.. _MEDIA-PAD-FL-MUST-CONNECT:

.. flat-table:: Media pad flags
    :header-rows:  0
    :stub-columns: 0

    *  -  ``MEDIA_PAD_FL_SINK``
       -  Input pad, relative to the entity. Input pads sink data and are
	  targets of links.

    *  -  ``MEDIA_PAD_FL_SOURCE``
       -  Output pad, relative to the entity. Output pads source data and
	  are origins of links.

    *  -  ``MEDIA_PAD_FL_MUST_CONNECT``
       -  If this flag is set, then for this pad to be able to stream, it must
	  be connected by at least one enabled link. There could be temporary
	  reasons (e.g. device configuration dependent) for the pad to need
	  enabled links even when this flag isn't set; the absence of the flag
	  doesn't imply there is none.


One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE``
must be set for every pad.