← Documents Documentation/userspace-api/media/dvb/fe-get-property.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / DVB / Frontend

ioctl FE_SET_PROPERTY, FE_GET_PROPERTY

DVBv5 frontend property 설정과 조회의 권한·side effect 차이를 설명합니다.

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

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

1. 요약·해설

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

요약·해설

fe-get-property.rst:1-75

SET은 tuning을 시작하지만 전달값을 실제값으로 갱신하지 않습니다. 실제 매개변수와 통계는 GET으로 별도 조회해야 합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: DTV.fe
3
4 .. _FE_GET_PROPERTY:
5
6 **************************************
7 ioctl FE_SET_PROPERTY, FE_GET_PROPERTY
8 **************************************
9
10 Name
11 ====
12
13 FE_SET_PROPERTY - FE_GET_PROPERTY - FE_SET_PROPERTY sets one or more frontend properties. - FE_GET_PROPERTY returns one or more frontend properties.
14
15 Synopsis
16 ========
17
18 .. c:macro:: FE_GET_PROPERTY
19
20 ``int ioctl(int fd, FE_GET_PROPERTY, struct dtv_properties *argp)``
21
22 .. c:macro:: FE_SET_PROPERTY
23
24 ``int ioctl(int fd, FE_SET_PROPERTY, struct dtv_properties *argp)``
25
26 Arguments
27 =========
28
29 ``fd``
30 File descriptor returned by :c:func:`open()`.
31
32 ``argp``
33 Pointer to struct :c:type:`dtv_properties`.
34
35 Description
36 ===========
37
38 All Digital TV frontend devices support the ``FE_SET_PROPERTY`` and
39 ``FE_GET_PROPERTY`` ioctls. The supported properties and statistics
40 depends on the delivery system and on the device:
41
42 - ``FE_SET_PROPERTY:``
43
44 - This ioctl is used to set one or more frontend properties.
45
46 - This is the basic command to request the frontend to tune into
47 some frequency and to start decoding the digital TV signal.
48
49 - This call requires read/write access to the device.
50
51 .. note::
52
53 At return, the values aren't updated to reflect the actual
54 parameters used. If the actual parameters are needed, an explicit
55 call to ``FE_GET_PROPERTY`` is needed.
56
57 - ``FE_GET_PROPERTY:``
58
59 - This ioctl is used to get properties and statistics from the
60 frontend.
61
62 - No properties are changed, and statistics aren't reset.
63
64 - This call only requires read-only access to the device.
65
66 Return Value
67 ============
68
69 On success 0 is returned.
70
71 On error -1 is returned, and the ``errno`` variable is set
72 appropriately.
73
74 Generic error codes are described at the
75 :ref:`Generic Error Codes <gen-errors>` chapter.
76

3. 한국어 전문 번역

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

Property GET/SET 선언과 공통 인수

1-34

`FE_SET_PROPERTY`는 하나 이상의 frontend property를 설정하고 `FE_GET_PROPERTY`는 하나 이상의 frontend property를 반환합니다.

두 ioctl 모두 `struct dtv_properties *argp`를 사용합니다. 호출 형식은 각각 `int ioctl(int fd, FE_SET_PROPERTY, struct dtv_properties *argp)`와 `int ioctl(int fd, FE_GET_PROPERTY, struct dtv_properties *argp)`입니다.

Property ioctl 공통 인수
인수의미
fdopen()이 반환한 파일 descriptor
argpstruct dtv_properties를 가리키는 포인터

Property 배열을 감싸는 dtv_properties를 전달합니다.

.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: DTV.fe

.. _FE_GET_PROPERTY:

**************************************
ioctl FE_SET_PROPERTY, FE_GET_PROPERTY
**************************************

Name
====

FE_SET_PROPERTY - FE_GET_PROPERTY - FE_SET_PROPERTY sets one or more frontend properties. - FE_GET_PROPERTY returns one or more frontend properties.

Synopsis
========

.. c:macro:: FE_GET_PROPERTY

``int ioctl(int fd, FE_GET_PROPERTY, struct dtv_properties *argp)``

.. c:macro:: FE_SET_PROPERTY

``int ioctl(int fd, FE_SET_PROPERTY, struct dtv_properties *argp)``

Arguments
=========

``fd``
    File descriptor returned by :c:func:`open()`.

``argp``
    Pointer to struct :c:type:`dtv_properties`.

SET tuning과 GET 상태 조회

35-75

모든 Digital TV frontend 장치는 `FE_SET_PROPERTY`와 `FE_GET_PROPERTY`를 지원합니다. 지원되는 property와 통계는 delivery system 및 장치에 따라 달라집니다.

`FE_SET_PROPERTY`는 하나 이상의 property를 설정합니다. 특정 주파수로 tuning하고 Digital TV signal 복호화를 시작하도록 frontend에 요청하는 기본 command이며 장치에 대한 read/write 접근이 필요합니다.

SET 호출이 반환될 때 전달한 값은 실제 사용된 매개변수를 반영하도록 갱신되지 않습니다. 실제 값이 필요하면 `FE_GET_PROPERTY`를 명시적으로 호출해야 합니다.

`FE_GET_PROPERTY`는 frontend의 property와 통계를 가져옵니다. Property를 변경하지 않고 통계도 초기화하지 않으며 read-only 접근만 필요합니다.

두 ioctl 모두 성공 시 0, 오류 시 -1을 반환하고 `errno`를 적절히 설정합니다. 일반 오류는 `Generic Error Codes <gen-errors>` 절을 따릅니다.

FE_SET_PROPERTY와 FE_GET_PROPERTY
ioctl동작
FE_SET_PROPERTYread/write; property 설정, tuning 및 복호화 시작
FE_GET_PROPERTYread-only; property·통계 조회, 값 변경과 통계 reset 없음

권한과 side effect 차이입니다.

실제 tuning 매개변수 확인
dtv_properties에 요청값 구성FE_SET_PROPERTY로 tuning 요청SET 반환 buffer는 실제값으로 갱신되지 않음필요하면 FE_GET_PROPERTY 명시 호출실제 property와 통계 확인

SET 인수는 자동 보정되지 않으므로 GET을 별도로 수행합니다.

Description
===========

All Digital TV frontend devices support the ``FE_SET_PROPERTY`` and
``FE_GET_PROPERTY`` ioctls. The supported properties and statistics
depends on the delivery system and on the device:

-  ``FE_SET_PROPERTY:``

   -  This ioctl is used to set one or more frontend properties.

   -  This is the basic command to request the frontend to tune into
      some frequency and to start decoding the digital TV signal.

   -  This call requires read/write access to the device.

.. note::

   At return, the values aren't updated to reflect the actual
   parameters used. If the actual parameters are needed, an explicit
   call to ``FE_GET_PROPERTY`` is needed.

-  ``FE_GET_PROPERTY:``

   -  This ioctl is used to get properties and statistics from the
      frontend.

   -  No properties are changed, and statistics aren't reset.

   -  This call only requires read-only access to the device.

Return Value
============

On success 0 is returned.

On error -1 is returned, and the ``errno`` variable is set
appropriately.

Generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.