← Documents Documentation/userspace-api/media/v4l/vidioc-enum-dv-timings.rst GitHub 원문 ↗

Linux 6.18.37 · 사용자 공간 API

VIDIOC_ENUM_DV_TIMINGS와 VIDIOC_SUBDEV_ENUM_DV_TIMINGS ioctl

비디오 노드 또는 sub-device pad에서 알려진 DV timing을 index 0부터 EINVAL까지 열거하고 capability 조회와 목록 변화 조건을 함께 설명합니다.

Source pathDocumentation/userspace-api/media/v4l/vidioc-enum-dv-timings.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

vidioc-enum-dv-timings.rst:1-105

비디오 노드 또는 sub-device pad에서 알려진 DV timing을 index 0부터 EINVAL까지 열거하고 capability 조회와 목록 변화 조건을 함께 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: V4L
3
4 .. _VIDIOC_ENUM_DV_TIMINGS:
5
6 ***********************************************************
7 ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS
8 ***********************************************************
9
10 Name
11 ====
12
13 VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings
14
15 Synopsis
16 ========
17
18 .. c:macro:: VIDIOC_ENUM_DV_TIMINGS
19
20 ``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)``
21
22 .. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS
23
24 ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *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:`v4l2_enum_dv_timings`.
34
35 Description
36 ===========
37
38 While some DV receivers or transmitters support a wide range of timings,
39 others support only a limited number of timings. With this ioctl
40 applications can enumerate a list of known supported timings. Call
41 :ref:`VIDIOC_DV_TIMINGS_CAP` to check if it
42 also supports other standards or even custom timings that are not in
43 this list.
44
45 To query the available timings, applications initialize the ``index``
46 field, set the ``pad`` field to 0, zero the reserved array of struct
47 :c:type:`v4l2_enum_dv_timings` and call the
48 ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this
49 structure. Drivers fill the rest of the structure or return an ``EINVAL``
50 error code when the index is out of bounds. To enumerate all supported
51 DV timings, applications shall begin at index zero, incrementing by one
52 until the driver returns ``EINVAL``.
53
54 .. note::
55
56 Drivers may enumerate a different set of DV timings after
57 switching the video input or output.
58
59 When implemented by the driver DV timings of subdevices can be queried
60 by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a
61 subdevice node. The DV timings are specific to inputs (for DV receivers)
62 or outputs (for DV transmitters), applications must specify the desired
63 pad number in the struct
64 :c:type:`v4l2_enum_dv_timings` ``pad`` field.
65 Attempts to enumerate timings on a pad that doesn't support them will
66 return an ``EINVAL`` error code.
67
68 .. c:type:: v4l2_enum_dv_timings
69
70 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|
71
72 .. flat-table:: struct v4l2_enum_dv_timings
73 :header-rows: 0
74 :stub-columns: 0
75 :widths: 1 1 2
76
77 * - __u32
78 - ``index``
79 - Number of the DV timings, set by the application.
80 * - __u32
81 - ``pad``
82 - Pad number as reported by the media controller API. This field is
83 only used when operating on a subdevice node. When operating on a
84 video node applications must set this field to zero.
85 * - __u32
86 - ``reserved``\ [2]
87 - Reserved for future extensions. Drivers and applications must set
88 the array to zero.
89 * - struct :c:type:`v4l2_dv_timings`
90 - ``timings``
91 - The timings.
92
93 Return Value
94 ============
95
96 On success 0 is returned, on error -1 and the ``errno`` variable is set
97 appropriately. The generic error codes are described at the
98 :ref:`Generic Error Codes <gen-errors>` chapter.
99
100 EINVAL
101 The struct :c:type:`v4l2_enum_dv_timings`
102 ``index`` is out of bounds or the ``pad`` number is invalid.
103
104 ENODATA
105 Digital video presets are not supported for this input or output.
106

3. 한국어 전문 번역

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

이름, 호출 형식과 인자

1-34

`VIDIOC_ENUM_DV_TIMINGS`와 `VIDIOC_SUBDEV_ENUM_DV_TIMINGS`는 수신기 또는 송신기가 지원하는 알려진 디지털 비디오 timing을 하나씩 열거합니다. 두 호출 모두 `struct v4l2_enum_dv_timings *argp`를 사용합니다.

`fd`는 `open()`이 반환한 비디오 또는 sub-device 노드 파일 디스크립터이고, `argp`는 응용 프로그램이 index·pad·예약 필드를 초기화하고 드라이버가 timing을 반환하는 구조체입니다.

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

.. _VIDIOC_ENUM_DV_TIMINGS:

***********************************************************
ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS
***********************************************************

Name
====

VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings

Synopsis
========

.. c:macro:: VIDIOC_ENUM_DV_TIMINGS

``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)``

.. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS

``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)``

Arguments
=========

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

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

알려진 타이밍 목록과 열거 절차

35-67

일부 DV 수신기·송신기는 넓은 timing 범위를 지원하지만 다른 장치는 제한된 timing 집합만 지원합니다. 이 ioctl은 드라이버가 알고 있는 지원 목록을 열거합니다. 목록에 없는 다른 표준 또는 custom timing 지원 여부는 `VIDIOC_DV_TIMINGS_CAP`로 별도 확인해야 합니다.

비디오 노드에서는 `index`를 설정하고 `pad`를 0으로 두며 `reserved` 배열을 0으로 초기화한 뒤 `VIDIOC_ENUM_DV_TIMINGS`를 호출합니다. 드라이버는 나머지 필드를 채우고 index가 범위를 벗어나면 `EINVAL`을 반환합니다.

전체 목록은 index 0부터 시작해 하나씩 증가시키다가 `EINVAL`이 나오면 끝납니다. 비디오 입력이나 출력을 전환하면 같은 드라이버가 다른 DV timing 집합을 열거할 수 있으므로 전환 뒤에는 다시 조회해야 합니다.

sub-device 노드에서는 드라이버가 지원할 때 `VIDIOC_SUBDEV_ENUM_DV_TIMINGS`를 호출합니다. DV 수신기는 입력 pad, 송신기는 출력 pad마다 목록이 다를 수 있으므로 media controller의 원하는 pad 번호를 지정합니다. timing 열거를 지원하지 않는 pad는 `EINVAL`입니다.

DV timing 열거
비디오 노드는 pad=0, sub-device는 대상 padindex=0, reserved=0ENUM_DV_TIMINGS 호출timings 기록index 증가EINVAL에서 열거 종료

index 증가와 종료 오류를 포함한 반복 절차입니다.

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

While some DV receivers or transmitters support a wide range of timings,
others support only a limited number of timings. With this ioctl
applications can enumerate a list of known supported timings. Call
:ref:`VIDIOC_DV_TIMINGS_CAP` to check if it
also supports other standards or even custom timings that are not in
this list.

To query the available timings, applications initialize the ``index``
field, set the ``pad`` field to 0, zero the reserved array of struct
:c:type:`v4l2_enum_dv_timings` and call the
``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this
structure. Drivers fill the rest of the structure or return an ``EINVAL``
error code when the index is out of bounds. To enumerate all supported
DV timings, applications shall begin at index zero, incrementing by one
until the driver returns ``EINVAL``.

.. note::

   Drivers may enumerate a different set of DV timings after
   switching the video input or output.

When implemented by the driver DV timings of subdevices can be queried
by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a
subdevice node. The DV timings are specific to inputs (for DV receivers)
or outputs (for DV transmitters), applications must specify the desired
pad number in the struct
:c:type:`v4l2_enum_dv_timings` ``pad`` field.
Attempts to enumerate timings on a pad that doesn't support them will
return an ``EINVAL`` error code.

v4l2_enum_dv_timings 구조체

68-92
struct v4l2_enum_dv_timings
형식필드의미
`__u32``index`응용 프로그램이 설정하는 DV timing 번호
`__u32``pad`sub-device의 media pad 번호; 비디오 노드에서는 0
`__u32[2]``reserved`미래 확장용이며 드라이버와 응용 프로그램 모두 0
`struct v4l2_dv_timings``timings`드라이버가 반환하는 해당 index의 timing

응용 프로그램 입력과 드라이버 반환 필드를 원문 순서대로 정리합니다.

`index`, `pad`, `reserved`는 호출 전에 응용 프로그램이 설정하고, `timings`는 성공한 호출에서 드라이버가 채웁니다. 구조체를 매 반복마다 0으로 초기화하면 예약 필드 요구 사항을 안전하게 지킬 수 있습니다.

.. c:type:: v4l2_enum_dv_timings

.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|

.. flat-table:: struct v4l2_enum_dv_timings
    :header-rows:  0
    :stub-columns: 0
    :widths:       1 1 2

    * - __u32
      - ``index``
      - Number of the DV timings, set by the application.
    * - __u32
      - ``pad``
      - Pad number as reported by the media controller API. This field is
	only used when operating on a subdevice node. When operating on a
	video node applications must set this field to zero.
    * - __u32
      - ``reserved``\ [2]
      - Reserved for future extensions. Drivers and applications must set
	the array to zero.
    * - struct :c:type:`v4l2_dv_timings`
      - ``timings``
      - The timings.

반환값과 오류

93-105

성공하면 0을 반환하고 실패하면 -1과 적절한 `errno`를 반환합니다. 일반 오류 코드는 Generic Error Codes 절을 따릅니다.

DV timing 열거 오류
errno의미
`EINVAL``index`가 범위를 벗어났거나 `pad` 번호가 유효하지 않음
`ENODATA`현재 입력 또는 출력이 디지털 비디오 preset을 지원하지 않음

목록 끝·pad 오류와 기능 미지원 상태를 구분합니다.

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

On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.

EINVAL
    The struct :c:type:`v4l2_enum_dv_timings`
    ``index`` is out of bounds or the ``pad`` number is invalid.

ENODATA
    Digital video presets are not supported for this input or output.