요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _media-controller-intro:
Introduction
============
Media devices increasingly handle multiple related functions. Many USB
cameras include microphones, video capture hardware can also output
video, or SoC camera interfaces also perform memory-to-memory operations
similar to video codecs.
Independent functions, even when implemented in the same hardware, can
be modelled as separate devices. A USB camera with a microphone will be
presented to userspace applications as V4L2 and ALSA capture devices.
The devices' relationships (when using a webcam, end-users shouldn't
have to manually select the associated USB microphone), while not made
available directly to applications by the drivers, can usually be
retrieved from sysfs.
With more and more advanced SoC devices being introduced, the current
approach will not scale. Device topologies are getting increasingly
complex and can't always be represented by a tree structure. Hardware
blocks are shared between different functions, creating dependencies
between seemingly unrelated devices.
Kernel abstraction APIs such as V4L2 and ALSA provide means for
applications to access hardware parameters. As newer hardware expose an
increasingly high number of those parameters, drivers need to guess what
applications really require based on limited information, thereby
implementing policies that belong to userspace.
The media controller API aims at solving those problems.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
다기능 media device
1-12Media device는 서로 관련된 여러 기능을 점점 더 많이 처리합니다. 많은 USB camera에는 microphone이 들어 있고, video capture hardware가 video를 출력하기도 하며, SoC camera interface가 video codec과 비슷한 memory-to-memory operation도 수행합니다.
하나의 장치가 함께 제공할 수 있는 관련 기능입니다.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _media-controller-intro:
Introduction
============
Media devices increasingly handle multiple related functions. Many USB
cameras include microphones, video capture hardware can also output
video, or SoC camera interfaces also perform memory-to-memory operations
similar to video codecs.
독립 device와 관계 정보
13-20같은 hardware에 구현된 독립 기능도 서로 다른 device로 model할 수 있습니다. Microphone이 있는 USB camera는 userspace application에 V4L2 capture device와 ALSA capture device로 각각 나타납니다.
Webcam을 사용할 때 최종 사용자가 연관된 USB microphone을 직접 고르지 않아도 되어야 하는 것처럼 device 사이의 관계가 필요합니다. Driver가 이 관계를 application에 직접 제공하지 않더라도 보통 sysfs에서 찾아낼 수 있습니다.
Independent functions, even when implemented in the same hardware, can
be modelled as separate devices. A USB camera with a microphone will be
presented to userspace applications as V4L2 and ALSA capture devices.
The devices' relationships (when using a webcam, end-users shouldn't
have to manually select the associated USB microphone), while not made
available directly to applications by the drivers, can usually be
retrieved from sysfs.
복잡한 topology와 userspace policy
21-33더 발전된 SoC device가 늘어나면서 기존 접근법은 확장성을 잃습니다. Device topology는 점점 복잡해져 항상 tree로 표현할 수 없고, 서로 다른 기능이 hardware block을 공유해 겉보기에는 무관한 device 사이에도 dependency가 생깁니다.
V4L2와 ALSA 같은 Kernel abstraction API는 application이 hardware parameter에 접근할 수 있게 합니다. 새 hardware가 노출하는 parameter 수가 늘어나면 driver는 제한된 정보만으로 application이 실제로 요구하는 것을 추측해야 하고, 결과적으로 userspace에 있어야 할 policy를 driver가 구현하게 됩니다.
Media Controller API는 topology, dependency와 policy 배치 문제를 해결하는 것을 목표로 합니다.
복합 device를 개별 node 목록이 아닌 관계 graph로 다루는 이유입니다.
With more and more advanced SoC devices being introduced, the current
approach will not scale. Device topologies are getting increasingly
complex and can't always be represented by a tree structure. Hardware
blocks are shared between different functions, creating dependencies
between seemingly unrelated devices.
Kernel abstraction APIs such as V4L2 and ALSA provide means for
applications to access hardware parameters. As newer hardware expose an
increasingly high number of those parameters, drivers need to guess what
applications really require based on limited information, thereby
implementing policies that belong to userspace.
The media controller API aims at solving those problems.
요약·해설
media-controller-intro.rst:1-33Media Controller API는 device node를 나열하는 데 그치지 않고 서로 다른 기능과 공유 hardware block의 관계를 graph로 노출합니다. 이를 통해 driver가 추측하던 policy를 userspace가 결정할 수 있습니다.