← Documents Documentation/userspace-api/media/dvb/intro.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / DVB

Introduction

Digital TV API 사전 지식, 역사, STB 구성, device node와 include를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

intro.rst:1-183

원문 dvbstb.svg를 data flow로 재구성했습니다. 원문의 `여섯 device` 표현과 실제 7개 path 열거 차이는 원문 그대로 보존해 표시했습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _dvb_introduction:
4
5 ************
6 Introduction
7 ************
8
9
10 .. _requisites:
11
12 What you need to know
13 =====================
14
15 The reader of this document is required to have some knowledge in the
16 area of digital video broadcasting (Digital TV) and should be familiar with
17 part I of the MPEG2 specification ISO/IEC 13818 (aka ITU-T H.222), i.e
18 you should know what a program/transport stream (PS/TS) is and what is
19 meant by a packetized elementary stream (PES) or an I-frame.
20
21 Various Digital TV standards documents are available for download at:
22
23 - European standards (DVB): http://www.dvb.org and/or http://www.etsi.org.
24 - American standards (ATSC): https://www.atsc.org/standards/
25 - Japanese standards (ISDB): http://www.dibeg.org/
26
27 It is also necessary to know how to access Linux devices and how to
28 use ioctl calls. This also includes the knowledge of C or C++.
29
30
31 .. _history:
32
33 History
34 =======
35
36 The first API for Digital TV cards we used at Convergence in late 1999 was an
37 extension of the Video4Linux API which was primarily developed for frame
38 grabber cards. As such it was not really well suited to be used for Digital
39 TV cards and their new features like recording MPEG streams and filtering
40 several section and PES data streams at the same time.
41
42 In early 2000, Convergence was approached by Nokia with a proposal for a new
43 standard Linux Digital TV API. As a commitment to the development of terminals
44 based on open standards, Nokia and Convergence made it available to all
45 Linux developers and published it on https://linuxtv.org in September
46 2000. With the Linux driver for the Siemens/Hauppauge DVB PCI card,
47 Convergence provided a first implementation of the Linux Digital TV API.
48 Convergence was the maintainer of the Linux Digital TV API in the early
49 days.
50
51 Now, the API is maintained by the LinuxTV community (i.e. you, the reader
52 of this document). The Linux Digital TV API is constantly reviewed and
53 improved together with the improvements at the subsystem's core at the
54 Kernel.
55
56
57 .. _overview:
58
59 Overview
60 ========
61
62
63 .. _stb_components:
64
65 .. kernel-figure:: dvbstb.svg
66 :alt: dvbstb.svg
67 :align: center
68
69 Components of a Digital TV card/STB
70
71 A Digital TV card or set-top-box (STB) usually consists of the
72 following main hardware components:
73
74 Frontend consisting of tuner and digital TV demodulator
75 Here the raw signal reaches the digital TV hardware from a satellite dish or
76 antenna or directly from cable. The frontend down-converts and
77 demodulates this signal into an MPEG transport stream (TS). In case
78 of a satellite frontend, this includes a facility for satellite
79 equipment control (SEC), which allows control of LNB polarization,
80 multi feed switches or dish rotors.
81
82 Conditional Access (CA) hardware like CI adapters and smartcard slots
83 The complete TS is passed through the CA hardware. Programs to which
84 the user has access (controlled by the smart card) are decoded in
85 real time and re-inserted into the TS.
86
87 .. note::
88
89 Not every digital TV hardware provides conditional access hardware.
90
91 Demultiplexer which filters the incoming Digital TV MPEG-TS stream
92 The demultiplexer splits the TS into its components like audio and
93 video streams. Besides usually several of such audio and video
94 streams it also contains data streams with information about the
95 programs offered in this or other streams of the same provider.
96
97 Audio and video decoder
98 The main targets of the demultiplexer are audio and video
99 decoders. After decoding, they pass on the uncompressed audio and
100 video to the computer screen or to a TV set.
101
102 .. note::
103
104 Modern hardware usually doesn't have a separate decoder hardware, as
105 such functionality can be provided by the main CPU, by the graphics
106 adapter of the system or by a signal processing hardware embedded on
107 a Systems on a Chip (SoC) integrated circuit.
108
109 It may also not be needed for certain usages (e.g. for data-only
110 uses like "internet over satellite").
111
112 :ref:`stb_components` shows a crude schematic of the control and data
113 flow between those components.
114
115
116
117 .. _dvb_devices:
118
119 Linux Digital TV Devices
120 ========================
121
122 The Linux Digital TV API lets you control these hardware components through
123 currently six Unix-style character devices for video, audio, frontend,
124 demux, CA and IP-over-DVB networking. The video and audio devices
125 control the MPEG2 decoder hardware, the frontend device the tuner and
126 the Digital TV demodulator. The demux device gives you control over the PES
127 and section filters of the hardware. If the hardware does not support
128 filtering, these filters can be implemented in software. Finally, the CA
129 device controls all the conditional access capabilities of the hardware.
130 It can depend on the individual security requirements of the platform,
131 if and how many of the CA functions are made available to the
132 application through this device.
133
134 All devices can be found in the ``/dev`` tree under ``/dev/dvb``. The
135 individual devices are called:
136
137 - ``/dev/dvb/adapterN/audioM``,
138
139 - ``/dev/dvb/adapterN/videoM``,
140
141 - ``/dev/dvb/adapterN/frontendM``,
142
143 - ``/dev/dvb/adapterN/netM``,
144
145 - ``/dev/dvb/adapterN/demuxM``,
146
147 - ``/dev/dvb/adapterN/dvrM``,
148
149 - ``/dev/dvb/adapterN/caM``,
150
151 where ``N`` enumerates the Digital TV cards in a system starting from 0, and
152 ``M`` enumerates the devices of each type within each adapter, starting
153 from 0, too. We will omit the "``/dev/dvb/adapterN/``\ " in the further
154 discussion of these devices.
155
156 More details about the data structures and function calls of all the
157 devices are described in the following chapters.
158
159
160 .. _include_files:
161
162 API include files
163 =================
164
165 For each of the Digital TV devices a corresponding include file exists. The
166 Digital TV API include files should be included in application sources with a
167 partial path like:
168
169
170 .. code-block:: c
171
172 #include <linux/dvb/ca.h>
173
174 #include <linux/dvb/dmx.h>
175
176 #include <linux/dvb/frontend.h>
177
178 #include <linux/dvb/net.h>
179
180
181 To enable applications to support different API version, an additional
182 include file ``linux/dvb/version.h`` exists, which defines the constant
183 ``DVB_API_VERSION``. This document describes ``DVB_API_VERSION 5.10``.
184

3. 한국어 전문 번역

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

필요한 사전 지식

1-30

독자는 Digital TV broadcasting의 기본 지식과 MPEG-2 명세 ISO/IEC 13818 Part I, 즉 ITU-T H.222에 익숙해야 합니다.

Program/transport stream(PS/TS), packetized elementary stream(PES), I-frame의 의미를 알아야 합니다.

Digital TV 표준 자료
표준자료 위치
DVB 유럽 표준http://www.dvb.org 및/또는 http://www.etsi.org
ATSC 미국 표준https://www.atsc.org/standards/
ISDB 일본 표준http://www.dibeg.org/

원문이 안내하는 표준별 자료 사이트입니다.

Linux 장치 접근과 ioctl 사용법, 그리고 C 또는 C++ 지식도 필요합니다.

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

.. _dvb_introduction:

************
Introduction
************


.. _requisites:

What you need to know
=====================

The reader of this document is required to have some knowledge in the
area of digital video broadcasting (Digital TV) and should be familiar with
part I of the MPEG2 specification ISO/IEC 13818 (aka ITU-T H.222), i.e
you should know what a program/transport stream (PS/TS) is and what is
meant by a packetized elementary stream (PES) or an I-frame.

Various Digital TV standards documents are available for download at:

- European standards (DVB): http://www.dvb.org and/or http://www.etsi.org.
- American standards (ATSC): https://www.atsc.org/standards/
- Japanese standards (ISDB): http://www.dibeg.org/

It is also necessary to know how to access Linux devices and how to
use ioctl calls. This also includes the knowledge of C or C++.

Linux Digital TV API 역사

31-56

Convergence가 1999년 말 사용한 첫 Digital TV card API는 frame grabber용 Video4Linux API의 확장이었습니다. MPEG stream 녹화나 여러 section/PES stream 동시 filtering 같은 Digital TV 기능에는 적합하지 않았습니다.

2000년 초 Nokia는 Convergence에 새로운 표준 Linux Digital TV API를 제안했습니다. 양사는 open standard 기반 terminal 개발을 위해 모든 Linux 개발자에게 API를 공개하고 2000년 9월 linuxtv.org에 게시했습니다.

Convergence는 Siemens/Hauppauge DVB PCI card driver와 함께 첫 Linux Digital TV API 구현을 제공했고 초기 maintainer 역할을 맡았습니다.

현재 API는 LinuxTV community가 유지하며 kernel subsystem core 개선과 함께 지속적으로 검토·개선됩니다.

API 발전
1999년 말 Video4Linux 확장 사용Digital TV stream·filter 기능 한계 확인2000년 초 Nokia의 새 표준 API 제안2000년 9월 linuxtv.org 공개와 첫 driver 구현현재 LinuxTV community가 지속 유지

Frame grabber 확장에서 community 유지 표준 API로 발전했습니다.

.. _history:

History
=======

The first API for Digital TV cards we used at Convergence in late 1999 was an
extension of the Video4Linux API which was primarily developed for frame
grabber cards. As such it was not really well suited to be used for Digital
TV cards and their new features like recording MPEG streams and filtering
several section and PES data streams at the same time.

In early 2000, Convergence was approached by Nokia with a proposal for a new
standard Linux Digital TV API. As a commitment to the development of terminals
based on open standards, Nokia and Convergence made it available to all
Linux developers and published it on https://linuxtv.org in September
2000. With the Linux driver for the Siemens/Hauppauge DVB PCI card,
Convergence provided a first implementation of the Linux Digital TV API.
Convergence was the maintainer of the Linux Digital TV API in the early
days.

Now, the API is maintained by the LinuxTV community (i.e. you, the reader
of this document). The Linux  Digital TV API is constantly reviewed and
improved together with the improvements at the subsystem's core at the
Kernel.

Digital TV card와 STB 구성요소

57-116

원문 `dvbstb.svg` 그림은 Digital TV card 또는 set-top-box(STB)의 control 및 data flow를 보여 줍니다.

Frontend는 tuner와 Digital TV demodulator로 구성됩니다. 위성 dish, antenna 또는 cable의 raw signal을 받아 down-convert하고 복조해 MPEG transport stream(TS)으로 만듭니다. 위성 frontend의 SEC는 LNB 편파, multi-feed switch, dish rotor를 제어합니다.

CI adapter와 smartcard slot 같은 Conditional Access(CA) 하드웨어에는 전체 TS가 통과합니다. Smart card 권한이 있는 program은 실시간 복호화되어 TS에 다시 삽입되지만 모든 Digital TV 하드웨어가 CA를 제공하지는 않습니다.

Demultiplexer는 입력 MPEG-TS를 audio, video 및 program 정보 data stream으로 분리합니다.

Audio/video decoder는 demultiplexer의 주 대상이며 비압축 audio/video를 monitor나 TV로 보냅니다. 현대 장치는 별도 decoder 대신 CPU, graphics adapter 또는 SoC 내 signal processor를 사용할 수 있고, 위성 internet 같은 data-only 용도에는 decoder가 필요 없을 수 있습니다.

Digital TV card/STB data flow
Dish, antenna 또는 cable의 raw signalFrontend tuner와 demodulator가 MPEG-TS 생성선택적 CA hardware가 허가 program 복호화 후 TS 재삽입Demultiplexer가 audio·video·data stream 분리Decoder 또는 CPU/GPU/SoC가 audio·video 복호화Computer screen 또는 TV로 출력

dvbstb.svg의 핵심 구성과 흐름을 구조화했습니다.

.. _overview:

Overview
========


.. _stb_components:

.. kernel-figure:: dvbstb.svg
    :alt:   dvbstb.svg
    :align: center

    Components of a Digital TV card/STB

A Digital TV card or set-top-box (STB) usually consists of the
following main hardware components:

Frontend consisting of tuner and digital TV demodulator
   Here the raw signal reaches the digital TV hardware from a satellite dish or
   antenna or directly from cable. The frontend down-converts and
   demodulates this signal into an MPEG transport stream (TS). In case
   of a satellite frontend, this includes a facility for satellite
   equipment control (SEC), which allows control of LNB polarization,
   multi feed switches or dish rotors.

Conditional Access (CA) hardware like CI adapters and smartcard slots
   The complete TS is passed through the CA hardware. Programs to which
   the user has access (controlled by the smart card) are decoded in
   real time and re-inserted into the TS.

   .. note::

      Not every digital TV hardware provides conditional access hardware.

Demultiplexer which filters the incoming Digital TV MPEG-TS stream
   The demultiplexer splits the TS into its components like audio and
   video streams. Besides usually several of such audio and video
   streams it also contains data streams with information about the
   programs offered in this or other streams of the same provider.

Audio and video decoder
   The main targets of the demultiplexer are audio and video
   decoders. After decoding, they pass on the uncompressed audio and
   video to the computer screen or to a TV set.

   .. note::

      Modern hardware usually doesn't have a separate decoder hardware, as
      such functionality can be provided by the main CPU, by the graphics
      adapter of the system or by a signal processing hardware embedded on
      a Systems on a Chip (SoC) integrated circuit.

      It may also not be needed for certain usages (e.g. for data-only
      uses like "internet over satellite").

:ref:`stb_components` shows a crude schematic of the control and data
flow between those components.


Linux Digital TV device node

117-159

Linux Digital TV API는 video, audio, frontend, demux, CA, IP-over-DVB networking용 Unix-style character device로 하드웨어 구성요소를 제어합니다.

Video/audio device는 MPEG-2 decoder, frontend device는 tuner와 demodulator, demux device는 PES 및 section filter를 제어합니다. 하드웨어 filtering이 없으면 software로 구현할 수 있습니다. CA device가 노출하는 기능 범위는 platform 보안 요구사항에 따라 달라집니다.

원문은 `현재 여섯` character device라고 표현하지만 아래에는 7종 path를 열거합니다. 이 수치 차이는 자동 수정하지 않고 원문 상태로 보존합니다.

/dev/dvb device path
Device path역할
/dev/dvb/adapterN/audioMAudio decoder
/dev/dvb/adapterN/videoMVideo decoder
/dev/dvb/adapterN/frontendMTuner와 demodulator
/dev/dvb/adapterN/netMIP-over-DVB networking
/dev/dvb/adapterN/demuxMPES와 section filter
/dev/dvb/adapterN/dvrMDVR stream
/dev/dvb/adapterN/caMConditional Access

N은 0부터 card를, M은 adapter 안의 같은 형식 장치를 0부터 셉니다.

이후 설명에서는 `/dev/dvb/adapterN/` prefix를 생략합니다. 각 장치의 data structure와 function call은 뒤 절에서 설명합니다.

.. _dvb_devices:

Linux Digital TV Devices
========================

The Linux Digital TV API lets you control these hardware components through
currently six Unix-style character devices for video, audio, frontend,
demux, CA and IP-over-DVB networking. The video and audio devices
control the MPEG2 decoder hardware, the frontend device the tuner and
the Digital TV demodulator. The demux device gives you control over the PES
and section filters of the hardware. If the hardware does not support
filtering, these filters can be implemented in software. Finally, the CA
device controls all the conditional access capabilities of the hardware.
It can depend on the individual security requirements of the platform,
if and how many of the CA functions are made available to the
application through this device.

All devices can be found in the ``/dev`` tree under ``/dev/dvb``. The
individual devices are called:

-  ``/dev/dvb/adapterN/audioM``,

-  ``/dev/dvb/adapterN/videoM``,

-  ``/dev/dvb/adapterN/frontendM``,

-  ``/dev/dvb/adapterN/netM``,

-  ``/dev/dvb/adapterN/demuxM``,

-  ``/dev/dvb/adapterN/dvrM``,

-  ``/dev/dvb/adapterN/caM``,

where ``N`` enumerates the Digital TV cards in a system starting from 0, and
``M`` enumerates the devices of each type within each adapter, starting
from 0, too. We will omit the "``/dev/dvb/adapterN/``\ " in the further
discussion of these devices.

More details about the data structures and function calls of all the
devices are described in the following chapters.

API include file과 version

160-183

각 Digital TV device에 대응하는 include file이 있습니다. 응용 프로그램 source에서는 다음처럼 부분 path로 포함합니다.

Digital TV API include
Include영역
#include <linux/dvb/ca.h>Conditional Access API
#include <linux/dvb/dmx.h>Demux API
#include <linux/dvb/frontend.h>Frontend API
#include <linux/dvb/net.h>DVB network API

원문 C code block의 header를 보존합니다.

서로 다른 API version을 지원하도록 `linux/dvb/version.h`가 추가로 제공되며 `DVB_API_VERSION` 상수를 정의합니다. 이 원문 문서는 `DVB_API_VERSION 5.10`을 설명합니다.

.. _include_files:

API include files
=================

For each of the Digital TV devices a corresponding include file exists. The
Digital TV API include files should be included in application sources with a
partial path like:


.. code-block:: c

	#include <linux/dvb/ca.h>

	#include <linux/dvb/dmx.h>

	#include <linux/dvb/frontend.h>

	#include <linux/dvb/net.h>


To enable applications to support different API version, an additional
include file ``linux/dvb/version.h`` exists, which defines the constant
``DVB_API_VERSION``. This document describes ``DVB_API_VERSION 5.10``.