요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMAUDOUT:
***********************
ioctl VIDIOC_ENUMAUDOUT
***********************
Name
====
VIDIOC_ENUMAUDOUT - Enumerate audio outputs
Synopsis
========
.. c:macro:: VIDIOC_ENUMAUDOUT
``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)``
Arguments
=========
``fd``
File descriptor returned by :c:func:`open()`.
``argp``
Pointer to struct :c:type:`v4l2_audioout`.
Description
===========
To query the attributes of an audio output applications initialize the
``index`` field and zero out the ``reserved`` array of a struct
:c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT``
ioctl 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 audio outputs applications shall begin at index
zero, incrementing by one until the driver returns ``EINVAL``.
.. note::
Connectors on a TV card to loop back the received audio signal
to a sound card are not audio outputs in this sense.
See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct
:c:type:`v4l2_audioout`.
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 number of the audio output is out of bounds.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
목적, 호출 형식과 인자
1-30`VIDIOC_ENUMAUDOUT`는 비디오 장치의 audio output을 열거하는 ioctl입니다. 호출 형식은 `int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)`입니다.
`fd`는 `open()`이 반환한 파일 디스크립터이고, `argp`는 조회할 출력 순번과 반환 속성을 담는 `struct v4l2_audioout`을 가리킵니다.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMAUDOUT:
***********************
ioctl VIDIOC_ENUMAUDOUT
***********************
Name
====
VIDIOC_ENUMAUDOUT - Enumerate audio outputs
Synopsis
========
.. c:macro:: VIDIOC_ENUMAUDOUT
``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)``
Arguments
=========
``fd``
File descriptor returned by :c:func:`open()`.
``argp``
Pointer to struct :c:type:`v4l2_audioout`.
Audio output 열거
31-49응용 프로그램은 `v4l2_audioout.index`를 설정하고 `reserved` 배열을 0으로 만든 뒤 원문에 표기된 `VIDIOC_G_AUDOUT` ioctl에 구조체 포인터를 전달합니다. 드라이버는 나머지 필드를 채우고 index가 범위를 벗어나면 `EINVAL`을 반환합니다.
모든 audio output은 index 0부터 한 번에 1씩 증가시켜 `EINVAL`까지 열거합니다. `v4l2_audioout` 필드 설명은 `VIDIOC_G_AUDOUT` 문서를 따릅니다.
TV 카드에서 수신한 audio 신호를 sound card로 되돌려 보내는 loop-back connector는 이 API가 말하는 audio output에 해당하지 않습니다.
출력 순번을 증가시키는 반복 호출입니다.
Description
===========
To query the attributes of an audio output applications initialize the
``index`` field and zero out the ``reserved`` array of a struct
:c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT``
ioctl 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 audio outputs applications shall begin at index
zero, incrementing by one until the driver returns ``EINVAL``.
.. note::
Connectors on a TV card to loop back the received audio signal
to a sound card are not audio outputs in this sense.
See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct
:c:type:`v4l2_audioout`.
반환값과 EINVAL
50-58성공하면 0을 반환합니다. 오류가 발생하면 -1과 적절한 `errno`를 반환하며 공통 오류 코드는 Generic Error Codes 장을 따릅니다.
열거 종료를 나타내는 오류 조건입니다.
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 number of the audio output is out of bounds.
요약·해설
vidioc-enumaudioout.rst:1-58V4L2 장치의 audio output을 index 0부터 EINVAL까지 열거하고 loop-back connector 제외 조건을 설명합니다.