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

Linux 6.18.37 · 사용자 공간 API

VIDIOC_DV_TIMINGS_CAP와 VIDIOC_SUBDEV_DV_TIMINGS_CAP ioctl

DV 수신기·송신기의 BT.656/1120 해상도·pixel clock 범위, scan 방식, 표준·custom timing capability를 비디오 노드 또는 sub-device pad별로 조회합니다.

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

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

1. 요약·해설

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

요약·해설

vidioc-dv-timings-cap.rst:1-159

DV 수신기·송신기의 BT.656/1120 해상도·pixel clock 범위, scan 방식, 표준·custom timing capability를 비디오 노드 또는 sub-device pad별로 조회합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: V4L
3
4 .. _VIDIOC_DV_TIMINGS_CAP:
5
6 *********************************************************
7 ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
8 *********************************************************
9
10 Name
11 ====
12
13 VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
14
15 Synopsis
16 ========
17
18 .. c:macro:: VIDIOC_DV_TIMINGS_CAP
19
20 ``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``
21
22 .. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP
23
24 ``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *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_dv_timings_cap`.
34
35 Description
36 ===========
37
38 To query the capabilities of the DV receiver/transmitter applications
39 initialize the ``pad`` field to 0, zero the reserved array of struct
40 :c:type:`v4l2_dv_timings_cap` and call the
41 ``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
42 in the structure.
43
44 .. note::
45
46 Drivers may return different values after
47 switching the video input or output.
48
49 When implemented by the driver DV capabilities of subdevices can be
50 queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
51 on a subdevice node. The capabilities are specific to inputs (for DV
52 receivers) or outputs (for DV transmitters), applications must specify
53 the desired pad number in the struct
54 :c:type:`v4l2_dv_timings_cap` ``pad`` field and
55 zero the ``reserved`` array. Attempts to query capabilities on a pad
56 that doesn't support them will return an ``EINVAL`` error code.
57
58 .. tabularcolumns:: |p{1.2cm}|p{3.2cm}|p{12.9cm}|
59
60 .. c:type:: v4l2_bt_timings_cap
61
62 .. flat-table:: struct v4l2_bt_timings_cap
63 :header-rows: 0
64 :stub-columns: 0
65 :widths: 1 1 2
66
67 * - __u32
68 - ``min_width``
69 - Minimum width of the active video in pixels.
70 * - __u32
71 - ``max_width``
72 - Maximum width of the active video in pixels.
73 * - __u32
74 - ``min_height``
75 - Minimum height of the active video in lines.
76 * - __u32
77 - ``max_height``
78 - Maximum height of the active video in lines.
79 * - __u64
80 - ``min_pixelclock``
81 - Minimum pixelclock frequency in Hz.
82 * - __u64
83 - ``max_pixelclock``
84 - Maximum pixelclock frequency in Hz.
85 * - __u32
86 - ``standards``
87 - The video standard(s) supported by the hardware. See
88 :ref:`dv-bt-standards` for a list of standards.
89 * - __u32
90 - ``capabilities``
91 - Several flags giving more information about the capabilities. See
92 :ref:`dv-bt-cap-capabilities` for a description of the flags.
93 * - __u32
94 - ``reserved``\ [16]
95 - Reserved for future extensions.
96 Drivers must set the array to zero.
97
98
99 .. tabularcolumns:: |p{4.4cm}|p{3.6cm}|p{9.3cm}|
100
101 .. c:type:: v4l2_dv_timings_cap
102
103 .. flat-table:: struct v4l2_dv_timings_cap
104 :header-rows: 0
105 :stub-columns: 0
106 :widths: 1 1 2
107
108 * - __u32
109 - ``type``
110 - Type of DV timings as listed in :ref:`dv-timing-types`.
111 * - __u32
112 - ``pad``
113 - Pad number as reported by the media controller API. This field is
114 only used when operating on a subdevice node. When operating on a
115 video node applications must set this field to zero.
116 * - __u32
117 - ``reserved``\ [2]
118 - Reserved for future extensions.
119
120 Drivers and applications must set the array to zero.
121 * - union {
122 - (anonymous)
123 * - struct :c:type:`v4l2_bt_timings_cap`
124 - ``bt``
125 - BT.656/1120 timings capabilities of the hardware.
126 * - __u32
127 - ``raw_data``\ [32]
128 * - }
129 -
130
131 .. tabularcolumns:: |p{7.2cm}|p{10.3cm}|
132
133 .. _dv-bt-cap-capabilities:
134
135 .. flat-table:: DV BT Timing capabilities
136 :header-rows: 0
137 :stub-columns: 0
138
139 * - Flag
140 - Description
141 * -
142 -
143 * - ``V4L2_DV_BT_CAP_INTERLACED``
144 - Interlaced formats are supported.
145 * - ``V4L2_DV_BT_CAP_PROGRESSIVE``
146 - Progressive formats are supported.
147 * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
148 - CVT/GTF specific: the timings can make use of reduced blanking
149 (CVT) or the 'Secondary GTF' curve (GTF).
150 * - ``V4L2_DV_BT_CAP_CUSTOM``
151 - Can support non-standard timings, i.e. timings not belonging to
152 the standards set in the ``standards`` field.
153
154 Return Value
155 ============
156
157 On success 0 is returned, on error -1 and the ``errno`` variable is set
158 appropriately. The generic error codes are described at the
159 :ref:`Generic Error Codes <gen-errors>` chapter.
160

3. 한국어 전문 번역

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

이름, 호출 형식과 인자

1-34

`VIDIOC_DV_TIMINGS_CAP`와 `VIDIOC_SUBDEV_DV_TIMINGS_CAP`는 디지털 비디오 수신기 또는 송신기가 지원하는 타이밍 범위를 조회합니다. 두 호출 모두 `struct v4l2_dv_timings_cap *argp`를 사용합니다.

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

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

.. _VIDIOC_DV_TIMINGS_CAP:

*********************************************************
ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
*********************************************************

Name
====

VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter

Synopsis
========

.. c:macro:: VIDIOC_DV_TIMINGS_CAP

``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``

.. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP

``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``

Arguments
=========

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

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

비디오 노드와 sub-device 조회

35-57

비디오 노드에서 수신기·송신기 capability를 조회하려면 `pad`를 0으로 설정하고 `reserved` 배열을 0으로 지운 뒤 `VIDIOC_DV_TIMINGS_CAP`를 호출합니다. 입력이나 출력을 전환하면 드라이버가 다른 capability 값을 반환할 수 있습니다.

드라이버가 지원하면 sub-device 노드에 `VIDIOC_SUBDEV_DV_TIMINGS_CAP`를 직접 호출할 수 있습니다. DV 수신기는 입력 pad, 송신기는 출력 pad별로 capability가 다르므로 원하는 media controller pad 번호를 `pad`에 지정하고 `reserved`를 0으로 설정해야 합니다.

해당 capability를 지원하지 않는 pad를 조회하면 `EINVAL`을 반환합니다.

노드별 pad 설정
비디오 노드 -> pad = 0sub-device 노드 -> 입력 또는 출력 pad 번호reserved = 0DV_TIMINGS_CAP ioctltype과 bt capability 확인

같은 구조체를 사용하지만 pad의 의미가 다릅니다.

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

To query the capabilities of the DV receiver/transmitter applications
initialize the ``pad`` field to 0, zero the reserved array of struct
:c:type:`v4l2_dv_timings_cap` and call the
``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
in the structure.

.. note::

   Drivers may return different values after
   switching the video input or output.

When implemented by the driver DV capabilities of subdevices can be
queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
on a subdevice node. The capabilities 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_dv_timings_cap` ``pad`` field and
zero the ``reserved`` array. Attempts to query capabilities on a pad
that doesn't support them will return an ``EINVAL`` error code.

v4l2_bt_timings_cap 범위

58-98

`v4l2_bt_timings_cap`은 하드웨어가 받아들이거나 생성할 수 있는 활성 영상 크기와 pixel clock의 최소·최대값, 지원 표준과 추가 capability 비트를 나타냅니다.

struct v4l2_bt_timings_cap
형식필드의미
`__u32``min_width`활성 영상 최소 너비, 픽셀
`__u32``max_width`활성 영상 최대 너비, 픽셀
`__u32``min_height`활성 영상 최소 높이, 라인
`__u32``max_height`활성 영상 최대 높이, 라인
`__u64``min_pixelclock`최소 pixel clock 주파수, Hz
`__u64``max_pixelclock`최대 pixel clock 주파수, Hz
`__u32``standards`하드웨어가 지원하는 DV BT 표준 비트
`__u32``capabilities`인터레이스·프로그레시브 등 추가 capability 비트
`__u32[16]``reserved`미래 확장용이며 드라이버가 0으로 설정

BT.656/1120 타이밍의 허용 범위를 원문 필드 순서대로 보존합니다.

.. tabularcolumns:: |p{1.2cm}|p{3.2cm}|p{12.9cm}|

.. c:type:: v4l2_bt_timings_cap

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

    * - __u32
      - ``min_width``
      - Minimum width of the active video in pixels.
    * - __u32
      - ``max_width``
      - Maximum width of the active video in pixels.
    * - __u32
      - ``min_height``
      - Minimum height of the active video in lines.
    * - __u32
      - ``max_height``
      - Maximum height of the active video in lines.
    * - __u64
      - ``min_pixelclock``
      - Minimum pixelclock frequency in Hz.
    * - __u64
      - ``max_pixelclock``
      - Maximum pixelclock frequency in Hz.
    * - __u32
      - ``standards``
      - The video standard(s) supported by the hardware. See
	:ref:`dv-bt-standards` for a list of standards.
    * - __u32
      - ``capabilities``
      - Several flags giving more information about the capabilities. See
	:ref:`dv-bt-cap-capabilities` for a description of the flags.
    * - __u32
      - ``reserved``\ [16]
      - Reserved for future extensions.
	Drivers must set the array to zero.

v4l2_dv_timings_cap 구조체

99-130

외부 구조체의 `type`은 DV timing 유형, `pad`는 media controller가 보고한 pad 번호입니다. 비디오 노드에서는 `pad`를 반드시 0으로 두고 sub-device 노드에서만 실제 pad 번호를 사용합니다.

익명 union의 `bt`는 BT.656/1120 capability를 담고 `raw_data[32]`는 유형별 원시 공간입니다. `reserved[2]`는 드라이버와 응용 프로그램 양쪽이 모두 0으로 설정해야 합니다.

struct v4l2_dv_timings_cap
형식필드의미
`__u32``type``dv-timing-types`에 정의된 DV timing 유형
`__u32``pad`sub-device의 pad 번호; 비디오 노드에서는 0
`__u32[2]``reserved`미래 확장용이며 양쪽 모두 0
`v4l2_bt_timings_cap``bt`하드웨어의 BT.656/1120 timing capability
`__u32[32]``raw_data`union의 원시 데이터 공간

조회 대상과 유형별 capability payload입니다.

.. tabularcolumns:: |p{4.4cm}|p{3.6cm}|p{9.3cm}|

.. c:type:: v4l2_dv_timings_cap

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

    * - __u32
      - ``type``
      - Type of DV timings as listed in :ref:`dv-timing-types`.
    * - __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.
    * - union {
      - (anonymous)
    * - struct :c:type:`v4l2_bt_timings_cap`
      - ``bt``
      - BT.656/1120 timings capabilities of the hardware.
    * - __u32
      - ``raw_data``\ [32]
    * - }
      -

DV BT Timing capability 비트

131-153
DV BT Timing capabilities
플래그의미
`V4L2_DV_BT_CAP_INTERLACED`인터레이스 형식 지원
`V4L2_DV_BT_CAP_PROGRESSIVE`프로그레시브 형식 지원
`V4L2_DV_BT_CAP_REDUCED_BLANKING`CVT reduced blanking 또는 GTF Secondary GTF curve 지원
`V4L2_DV_BT_CAP_CUSTOM``standards` 비트에 속하지 않는 비표준 timing 지원 가능

지원하는 scan 방식과 비표준 timing 범위를 나타냅니다.

`standards`는 알려진 표준 집합을 나타내고 `V4L2_DV_BT_CAP_CUSTOM`은 그 밖의 timing도 다룰 수 있음을 별도로 표시합니다. 최소·최대 범위 안이라고 해서 모든 중간 조합이 자동으로 유효한 것은 아니므로 실제 timing 검증 API와 함께 사용해야 합니다.

.. tabularcolumns:: |p{7.2cm}|p{10.3cm}|

.. _dv-bt-cap-capabilities:

.. flat-table:: DV BT Timing capabilities
    :header-rows:  0
    :stub-columns: 0

    * - Flag
      - Description
    * -
      -
    * - ``V4L2_DV_BT_CAP_INTERLACED``
      - Interlaced formats are supported.
    * - ``V4L2_DV_BT_CAP_PROGRESSIVE``
      - Progressive formats are supported.
    * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING``
      - CVT/GTF specific: the timings can make use of reduced blanking
	(CVT) or the 'Secondary GTF' curve (GTF).
    * - ``V4L2_DV_BT_CAP_CUSTOM``
      - Can support non-standard timings, i.e. timings not belonging to
	the standards set in the ``standards`` field.

반환값

154-159

성공하면 0을 반환하고 실패하면 -1과 적절한 `errno`를 반환합니다. 일반 오류 코드는 Generic Error Codes 절을 따르며, capability가 없는 pad에는 앞서 설명한 `EINVAL`이 적용됩니다.

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.