← Documents Documentation/userspace-api/media/cec/cec-intro.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / CEC

CEC 소개

HDMI CEC protocol의 사양, 전송 특성, device node와 v4l-utils 시험 도구를 소개합니다.

Source pathDocumentation/userspace-api/media/cec/cec-intro.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

cec-intro.rst:1-42

CEC는 HDMI의 단일 pin을 사용하는 저속 제어 protocol이며 kernel과 사용자 공간이 message 처리를 나눕니다. `/dev/cecX`와 v4l-utils 도구가 실제 접근·시험 경로입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3 .. _cec-intro:
4
5 Introduction
6 ============
7
8 HDMI connectors provide a single pin for use by the Consumer Electronics
9 Control protocol. This protocol allows different devices connected by an
10 HDMI cable to communicate. The protocol for CEC version 1.4 is defined
11 in supplements 1 (CEC) and 2 (HEAC or HDMI Ethernet and Audio Return
12 Channel) of the HDMI 1.4a (:ref:`hdmi`) specification and the
13 extensions added to CEC version 2.0 are defined in chapter 11 of the
14 HDMI 2.0 (:ref:`hdmi2`) specification.
15
16 The bitrate is very slow (effectively no more than 36 bytes per second)
17 and is based on the ancient AV.link protocol used in old SCART
18 connectors. The protocol closely resembles a crazy Rube Goldberg
19 contraption and is an unholy mix of low and high level messages. Some
20 messages, especially those part of the HEAC protocol layered on top of
21 CEC, need to be handled by the kernel, others can be handled either by
22 the kernel or by userspace.
23
24 In addition, CEC can be implemented in HDMI receivers, transmitters and
25 in USB devices that have an HDMI input and an HDMI output and that
26 control just the CEC pin.
27
28 Drivers that support CEC will create a CEC device node (/dev/cecX) to
29 give userspace access to the CEC adapter. The
30 :ref:`CEC_ADAP_G_CAPS` ioctl will tell userspace what it is allowed to do.
31
32 In order to check the support and test it, it is suggested to download
33 the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ package. It
34 provides three tools to handle CEC:
35
36 - cec-ctl: the Swiss army knife of CEC. Allows you to configure, transmit
37 and monitor CEC messages.
38
39 - cec-compliance: does a CEC compliance test of a remote CEC device to
40 determine how compliant the CEC implementation is.
41
42 - cec-follower: emulates a CEC follower.
43

3. 한국어 전문 번역

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

HDMI CEC protocol

1-13

HDMI connector는 Consumer Electronics Control protocol용 pin 하나를 제공합니다. 이 protocol로 HDMI cable에 연결된 서로 다른 device가 통신합니다.

CEC version 1.4는 HDMI 1.4a specification의 supplement 1(CEC)과 supplement 2(HEAC, HDMI Ethernet and Audio Return Channel)에 정의되어 있습니다. CEC version 2.0 확장은 HDMI 2.0 specification chapter 11에 정의되어 있습니다.

CEC specification
항목설명
CEC 1.4HDMI 1.4a supplement 1
HEACHDMI 1.4a supplement 2
CEC 2.0 확장HDMI 2.0 chapter 11

CEC와 HEAC 정의가 들어 있는 HDMI 문서 위치입니다.

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

.. _cec-intro:

Introduction
============

HDMI connectors provide a single pin for use by the Consumer Electronics
Control protocol. This protocol allows different devices connected by an
HDMI cable to communicate. The protocol for CEC version 1.4 is defined
in supplements 1 (CEC) and 2 (HEAC or HDMI Ethernet and Audio Return
Channel) of the HDMI 1.4a (:ref:`hdmi`) specification and the
extensions added to CEC version 2.0 are defined in chapter 11 of the

Protocol 특성과 처리 위치

14-23

bitrate는 실질적으로 초당 36 byte를 넘지 않을 만큼 매우 느리고, 과거 SCART connector에서 사용하던 AV.link protocol에 기반합니다.

protocol은 오래된 복잡한 장치처럼 구성되어 low-level과 high-level message가 뒤섞여 있습니다. 특히 CEC 위에 놓인 HEAC protocol의 일부 message는 kernel이 처리해야 하고, 다른 message는 kernel 또는 사용자 공간이 처리할 수 있습니다.

CEC 처리 특성
항목설명
실효 bitrate최대 약 36 bytes/s
기반SCART의 AV.link
HEAC 일부 messagekernel 처리 필요
그 밖의 messagekernel 또는 userspace 처리 가능

느린 link와 message별 처리 주체를 구분합니다.

HDMI 2.0 (:ref:`hdmi2`) specification.

The bitrate is very slow (effectively no more than 36 bytes per second)
and is based on the ancient AV.link protocol used in old SCART
connectors. The protocol closely resembles a crazy Rube Goldberg
contraption and is an unholy mix of low and high level messages. Some
messages, especially those part of the HEAC protocol layered on top of
CEC, need to be handled by the kernel, others can be handled either by
the kernel or by userspace.

구현 hardware

24-27

CEC는 HDMI receiver와 transmitter에서 구현할 수 있습니다. HDMI input과 output을 모두 갖고 CEC pin만 제어하는 USB device에서도 구현할 수 있습니다.

In addition, CEC can be implemented in HDMI receivers, transmitters and
in USB devices that have an HDMI input and an HDMI output and that
control just the CEC pin.

CEC device node

28-32

CEC를 지원하는 driver는 사용자 공간이 CEC adapter에 접근할 수 있도록 `/dev/cecX` device node를 만듭니다.

`CEC_ADAP_G_CAPS` ioctl은 사용자 공간이 그 adapter에서 수행할 수 있는 작업을 알려 줍니다.

CEC adapter 접근
CEC 지원 driver 등록/dev/cecX 생성userspace에서 openCEC_ADAP_G_CAPS ioctl지원 기능에 맞춰 제어

driver가 만든 device node를 열고 capability를 조회해 지원 기능을 선택합니다.

Drivers that support CEC will create a CEC device node (/dev/cecX) to
give userspace access to the CEC adapter. The
:ref:`CEC_ADAP_G_CAPS` ioctl will tell userspace what it is allowed to do.

In order to check the support and test it, it is suggested to download

지원 확인과 시험 도구

33-42

지원 여부를 확인하고 시험하려면 v4l-utils package를 내려받는 것이 권장됩니다. 이 package는 CEC를 다루는 세 도구를 제공합니다.

`cec-ctl`은 CEC의 다목적 도구로 adapter 설정, CEC message 전송과 monitoring을 지원합니다.

`cec-compliance`는 remote CEC device에 compliance test를 실행해 구현이 specification을 얼마나 준수하는지 판정합니다.

`cec-follower`는 CEC follower를 emulation합니다.

v4l-utils CEC 도구
항목설명
cec-ctl설정, message 전송, monitoring
cec-complianceremote device 준수 시험
cec-followerCEC follower emulation

설정·검증·emulation 역할을 나눕니다.

the `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_ package. It
provides three tools to handle CEC:

- cec-ctl: the Swiss army knife of CEC. Allows you to configure, transmit
  and monitor CEC messages.

- cec-compliance: does a CEC compliance test of a remote CEC device to
  determine how compliant the CEC implementation is.

- cec-follower: emulates a CEC follower.