요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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`.
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.
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 배열을 감싸는 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>` 절을 따릅니다.
권한과 side effect 차이입니다.
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.
요약·해설
fe-get-property.rst:1-75SET은 tuning을 시작하지만 전달값을 실제값으로 갱신하지 않습니다. 실제 매개변수와 통계는 GET으로 별도 조회해야 합니다.