요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. _Remote_controllers_Protocols:
*****************************************
Remote Controller Protocols and Scancodes
*****************************************
IR is encoded as a series of pulses and spaces, using a protocol. These
protocols can encode e.g. an address (which device should respond) and a
command: what it should do. The values for these are not always consistent
across different devices for a given protocol.
Therefore out the output of the IR decoder is a scancode; a single u32
value. Using keymap tables this can be mapped to linux key codes.
Other things can be encoded too. Some IR protocols encode a toggle bit; this
is to distinguish whether the same button is being held down, or has been
released and pressed again. If has been released and pressed again, the
toggle bit will invert from one IR message to the next.
Some remotes have a pointer-type device which can used to control the
mouse; some air conditioning systems can have their target temperature
target set in IR.
The following are the protocols the kernel knows about and also lists
how scancodes are encoded for each protocol.
rc-5 (RC_PROTO_RC5)
-------------------
This IR protocol uses manchester encoding to encode 14 bits. There is a
detailed description here https://www.sbprojects.net/knowledge/ir/rc5.php.
The scancode encoding is *not* consistent with the lirc daemon (lircd) rc5
protocol, or the manchester BPF decoder.
.. flat-table:: rc5 bits scancode mapping
:widths: 1 1 2
* - rc-5 bit
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 6 (inverted)
- 2nd start bit in rc5, re-used as 6th command bit
* - 1
- none
- Toggle bit
* - 5
- 8 to 13
- Address
* - 6
- 0 to 5
- Command
There is a variant of rc5 called either rc5x or extended rc5
where there the second stop bit is the 6th command bit, but inverted.
This is done so it the scancodes and encoding is compatible with existing
schemes. This bit is stored in bit 6 of the scancode, inverted. This is
done to keep it compatible with plain rc-5 where there are two start bits.
rc-5-sz (RC_PROTO_RC5_SZ)
-------------------------
This is much like rc-5 but one bit longer. The scancode is encoded
differently.
.. flat-table:: rc-5-sz bits scancode mapping
:widths: 1 1 2
* - rc-5-sz bits
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 13
- Address bit
* - 1
- none
- Toggle bit
* - 6
- 6 to 11
- Address
* - 6
- 0 to 5
- Command
rc-5x-20 (RC_PROTO_RC5X_20)
---------------------------
This rc-5 extended to encoded 20 bits. The is a 3555 microseconds space
after the 8th bit.
.. flat-table:: rc-5x-20 bits scancode mapping
:widths: 1 1 2
* - rc-5-sz bits
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 14
- Address bit
* - 1
- none
- Toggle bit
* - 5
- 16 to 20
- Address
* - 6
- 8 to 13
- Address
* - 6
- 0 to 5
- Command
jvc (RC_PROTO_JVC)
------------------
The jvc protocol is much like nec, without the inverted values. It is
described here https://www.sbprojects.net/knowledge/ir/jvc.php.
The scancode is a 16 bits value, where the address is the lower 8 bits
and the command the higher 8 bits; this is reversed from IR order.
sony-12 (RC_PROTO_SONY12)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-12 bits scancode mapping
:widths: 1 1 2
* - sony-12 bits
- scancode bit
- description
* - 5
- 16 to 20
- device
* - 7
- 0 to 6
- function
sony-15 (RC_PROTO_SONY15)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-12 bits scancode mapping
:widths: 1 1 2
* - sony-12 bits
- scancode bit
- description
* - 8
- 16 to 23
- device
* - 7
- 0 to 6
- function
sony-20 (RC_PROTO_SONY20)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-20 bits scancode mapping
:widths: 1 1 2
* - sony-20 bits
- scancode bit
- description
* - 5
- 16 to 20
- device
* - 7
- 0 to 7
- device
* - 8
- 8 to 15
- extended bits
nec (RC_PROTO_NEC)
------------------
The nec protocol encodes an 8 bit address and an 8 bit command. It is
described here https://www.sbprojects.net/knowledge/ir/nec.php. Note
that the protocol sends least significant bit first.
As a check, the nec protocol sends the address and command twice; the
second time it is inverted. This is done for verification.
A plain nec IR message has 16 bits; the high 8 bits are the address
and the low 8 bits are the command.
nec-x (RC_PROTO_NECX)
---------------------
Extended nec has a 16 bit address and a 8 bit command. This is encoded
as a 24 bit value as you would expect, with the lower 8 bits the command
and the upper 16 bits the address.
nec-32 (RC_PROTO_NEC32)
-----------------------
nec-32 does not send an inverted address or an inverted command; the
entire message, all 32 bits, are used.
For this to be decoded correctly, the second 8 bits must not be the
inverted value of the first, and also the last 8 bits must not be the
inverted value of the third 8 bit value.
The scancode has a somewhat unusual encoding.
.. flat-table:: nec-32 bits scancode mapping
* - nec-32 bits
- scancode bit
* - First 8 bits
- 16 to 23
* - Second 8 bits
- 24 to 31
* - Third 8 bits
- 0 to 7
* - Fourth 8 bits
- 8 to 15
sanyo (RC_PROTO_SANYO)
----------------------
The sanyo protocol is like the nec protocol, but with 13 bits address
rather than 8 bits. Both the address and the command are followed by
their inverted versions, but these are not present in the scancodes.
Bis 8 to 20 of the scancode is the 13 bits address, and the lower 8
bits are the command.
mcir2-kbd (RC_PROTO_MCIR2_KBD)
------------------------------
This protocol is generated by the Microsoft MCE keyboard for keyboard
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
mcir2-mse (RC_PROTO_MCIR2_MSE)
------------------------------
This protocol is generated by the Microsoft MCE keyboard for pointer
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
rc-6-0 (RC_PROTO_RC6_0)
-----------------------
This is the rc-6 in mode 0. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 16 bits as in the protocol. There is also a
toggle bit.
rc-6-6a-20 (RC_PROTO_RC6_6A_20)
-------------------------------
This is the rc-6 in mode 6a, 20 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 20 bits
as in the protocol. There is also a toggle bit.
rc-6-6a-24 (RC_PROTO_RC6_6A_24)
-------------------------------
This is the rc-6 in mode 6a, 24 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 24 bits
as in the protocol. There is also a toggle bit.
rc-6-6a-32 (RC_PROTO_RC6_6A_32)
-------------------------------
This is the rc-6 in mode 6a, 32 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The upper 16 bits are the vendor,
and the lower 16 bits are the vendor-specific bits. This protocol is
for the non-Microsoft MCE variant (vendor != 0x800f).
rc-6-mce (RC_PROTO_RC6_MCE)
---------------------------
This is the rc-6 in mode 6a, 32 bits. The upper 16 bits are the vendor,
and the lower 16 bits are the vendor-specific bits. This protocol is
for the Microsoft MCE variant (vendor = 0x800f). The toggle bit in the
protocol itself is ignored, and the 16th bit should be takes as the toggle
bit.
sharp (RC_PROTO_SHARP)
----------------------
This is a protocol used by Sharp VCRs, is described here
https://www.sbprojects.net/knowledge/ir/sharp.php. There is a very long
(40ms) space between the normal and inverted values, and some IR receivers
cannot decode this.
There is a 5 bit address and a 8 bit command. In the scancode the address is
in bits 8 to 12, and the command in bits 0 to 7.
xmp (RC_PROTO_XMP)
------------------
This protocol has several versions and only version 1 is supported. Refer
to the decoder (ir-xmp-decoder.c) to see how it is encoded.
cec (RC_PROTO_CEC)
------------------
This is not an IR protocol, this is a protocol over CEC. The CEC
infrastructure uses rc-core for handling CEC commands, so that they
can easily be remapped.
imon (RC_PROTO_IMON)
--------------------
This protocol is used by Antec Veris/SoundGraph iMON remotes.
The protocol
describes both button presses and pointer movements. The protocol encodes
31 bits, and the scancode is simply the 31 bits with the top bit always 0.
rc-mm-12 (RC_PROTO_RCMM12)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 12 bits.
rc-mm-24 (RC_PROTO_RCMM24)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 24 bits.
rc-mm-32 (RC_PROTO_RCMM32)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 32 bits.
xbox-dvd (RC_PROTO_XBOX_DVD)
----------------------------
This protocol is used by Xbox DVD Remote, which was made for the original
Xbox. There is no in-kernel decoder or encoder for this protocol. The usb
device decodes the protocol. There is a BPF decoder available in v4l-utils.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
IR message와 scan code mapping
1-28IR은 protocol이 정한 pulse와 space의 연속으로 encode됩니다. Protocol은 어느 장치가 응답할지를 나타내는 address와 수행할 동작인 command 등을 담을 수 있지만, 같은 protocol에서도 장치마다 이 값의 사용 방식이 항상 일치하지는 않습니다.
IR decoder의 출력은 하나의 u32 scan code입니다. Kernel keymap table은 이 scan code를 Linux key code로 변환합니다.
Protocol은 address와 command 외에도 toggle bit 같은 상태를 encode할 수 있습니다. Toggle bit는 button을 계속 누른 상태와 놓았다가 다시 누른 상태를 구분하며, 다시 누르면 연속 IR message 사이에서 값이 반전됩니다.
일부 remote는 mouse를 제어하는 pointer-type device를 포함하고, air conditioner처럼 target temperature 자체를 IR message에 담는 장치도 있습니다. 이어지는 절은 kernel이 아는 protocol과 각 protocol의 scan code bit 배치를 정의합니다.
Protocol bitstream을 공통 input event로 변환합니다.
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. _Remote_controllers_Protocols:
*****************************************
Remote Controller Protocols and Scancodes
*****************************************
IR is encoded as a series of pulses and spaces, using a protocol. These
protocols can encode e.g. an address (which device should respond) and a
command: what it should do. The values for these are not always consistent
across different devices for a given protocol.
Therefore out the output of the IR decoder is a scancode; a single u32
value. Using keymap tables this can be mapped to linux key codes.
Other things can be encoded too. Some IR protocols encode a toggle bit; this
is to distinguish whether the same button is being held down, or has been
released and pressed again. If has been released and pressed again, the
toggle bit will invert from one IR message to the next.
Some remotes have a pointer-type device which can used to control the
mouse; some air conditioning systems can have their target temperature
target set in IR.
The following are the protocols the kernel knows about and also lists
how scancodes are encoded for each protocol.
rc-5 (RC_PROTO_RC5)
29-82rc-5는 Manchester encoding으로 14 bit를 encode합니다. Kernel scan code 배치는 lircd의 rc5 protocol 및 Manchester BPF decoder와 일치하지 않으므로 서로의 숫자를 그대로 교환해서는 안 됩니다.
Start·toggle bit는 scan code에 직접 저장되지 않거나 별도 flag로 처리됩니다.
rc5x 또는 extended rc5 variant에서는 원문이 두 번째 stop bit라고 부르는 bit를 반전된 6번째 command bit로 사용합니다. 기존 scheme 및 일반 rc-5의 두 start bit와 호환되도록 이 값을 scan code bit 6에 반전해 저장합니다.
rc-5 (RC_PROTO_RC5)
-------------------
This IR protocol uses manchester encoding to encode 14 bits. There is a
detailed description here https://www.sbprojects.net/knowledge/ir/rc5.php.
The scancode encoding is *not* consistent with the lirc daemon (lircd) rc5
protocol, or the manchester BPF decoder.
.. flat-table:: rc5 bits scancode mapping
:widths: 1 1 2
* - rc-5 bit
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 6 (inverted)
- 2nd start bit in rc5, re-used as 6th command bit
* - 1
- none
- Toggle bit
* - 5
- 8 to 13
- Address
* - 6
- 0 to 5
- Command
There is a variant of rc5 called either rc5x or extended rc5
where there the second stop bit is the 6th command bit, but inverted.
This is done so it the scancodes and encoding is compatible with existing
schemes. This bit is stored in bit 6 of the scancode, inverted. This is
done to keep it compatible with plain rc-5 where there are two start bits.
rc-5-sz (RC_PROTO_RC5_SZ)
83-126`RC_PROTO_RC5_SZ`로 식별되는 rc-5-sz는 rc-5와 매우 비슷하지만 한 bit 더 길고 scan code encoding도 다릅니다.
Address가 상위 단일 bit와 6-bit field로 나뉩니다.
rc-5-sz (RC_PROTO_RC5_SZ)
-------------------------
This is much like rc-5 but one bit longer. The scancode is encoded
differently.
.. flat-table:: rc-5-sz bits scancode mapping
:widths: 1 1 2
* - rc-5-sz bits
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 13
- Address bit
* - 1
- none
- Toggle bit
* - 6
- 6 to 11
- Address
* - 6
- 0 to 5
- Command
rc-5x-20 (RC_PROTO_RC5X_20)
127-178rc-5x-20은 rc-5를 20 bit로 확장한 protocol입니다. 8번째 bit 뒤에 3555 microsecond space가 들어갑니다.
두 address field와 command field를 떨어진 scan code 영역에 배치합니다.
원문 flat-table의 첫 열 제목은 `rc-5-sz bits`로 적혀 있지만 이 절의 대상과 symbol은 `RC_PROTO_RC5X_20`입니다. 원문 표 자체는 접을 수 있는 원문 영역에 그대로 보존됩니다.
rc-5x-20 (RC_PROTO_RC5X_20)
---------------------------
This rc-5 extended to encoded 20 bits. The is a 3555 microseconds space
after the 8th bit.
.. flat-table:: rc-5x-20 bits scancode mapping
:widths: 1 1 2
* - rc-5-sz bits
- scancode bit
- description
* - 1
- none
- Start bit, always set
* - 1
- 14
- Address bit
* - 1
- none
- Toggle bit
* - 5
- 16 to 20
- Address
* - 6
- 8 to 13
- Address
* - 6
- 0 to 5
- Command
jvc (RC_PROTO_JVC)
179-187JVC protocol은 반전 값을 보내지 않는다는 점을 제외하면 NEC와 매우 비슷합니다. Scan code는 16 bit이며 address가 하위 8 bit, command가 상위 8 bit입니다.
이 scan code 배치는 IR wire order와 반대입니다. Decoder 또는 analyzer의 전송 순서 값을 그대로 scan code로 취급하지 않도록 주의해야 합니다.
16-bit scan code의 byte 배치입니다.
jvc (RC_PROTO_JVC)
------------------
The jvc protocol is much like nec, without the inverted values. It is
described here https://www.sbprojects.net/knowledge/ir/jvc.php.
The scancode is a 16 bits value, where the address is the lower 8 bits
and the command the higher 8 bits; this is reversed from IR order.
sony-12 (RC_PROTO_SONY12)
188-214Sony protocol은 pulse-width encoding이며 12·15·20 bit 세 variant가 있습니다. 차이는 전체 bit 수와 scan code 배치입니다.
5-bit device와 7-bit function을 분리합니다.
sony-12 (RC_PROTO_SONY12)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-12 bits scancode mapping
:widths: 1 1 2
* - sony-12 bits
- scancode bit
- description
* - 5
- 16 to 20
- device
* - 7
- 0 to 6
- function
sony-15 (RC_PROTO_SONY15)
215-241sony-15도 pulse-width encoding을 사용하며 device field가 8 bit로 늘어나고 function field는 7 bit로 유지됩니다.
상위 device field와 하위 function field 배치입니다.
원문 flat-table 제목과 첫 열 header에는 `sony-12`가 적혀 있지만 절과 protocol symbol은 `RC_PROTO_SONY15`입니다. 번역 표는 해당 절의 실제 15-bit variant로 표시합니다.
sony-15 (RC_PROTO_SONY15)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-12 bits scancode mapping
:widths: 1 1 2
* - sony-12 bits
- scancode bit
- description
* - 8
- 16 to 23
- device
* - 7
- 0 to 6
- function
sony-20 (RC_PROTO_SONY20)
242-274sony-20은 20-bit pulse-width variant입니다. 원문이 제시한 field 이름과 bit 범위를 그대로 옮기면 다음과 같습니다.
Device와 extended field가 서로 다른 scan code 영역에 배치됩니다.
두 번째 행은 원문에서 7 bit를 scan code bit 0~7의 device field로 적습니다. 이 apparent width 차이를 임의로 고치지 않고 local v6.18.37 문서 내용을 보존했습니다.
sony-20 (RC_PROTO_SONY20)
-------------------------
The sony protocol is a pulse-width encoding. There are three variants,
which just differ in number of bits and scancode encoding.
.. flat-table:: sony-20 bits scancode mapping
:widths: 1 1 2
* - sony-20 bits
- scancode bit
- description
* - 5
- 16 to 20
- device
* - 7
- 0 to 7
- device
* - 8
- 8 to 15
- extended bits
nec (RC_PROTO_NEC)
275-287NEC protocol은 8-bit address와 8-bit command를 encode하며 least significant bit부터 전송합니다.
검증을 위해 address와 command를 각각 두 번 보내되 두 번째 값은 반전합니다. 일반 NEC IR message의 scan code는 16 bit이며 상위 8 bit가 address, 하위 8 bit가 command입니다.
전송의 LSB-first 특성과 별개인 논리 scan code 배치입니다.
nec (RC_PROTO_NEC)
------------------
The nec protocol encodes an 8 bit address and an 8 bit command. It is
described here https://www.sbprojects.net/knowledge/ir/nec.php. Note
that the protocol sends least significant bit first.
As a check, the nec protocol sends the address and command twice; the
second time it is inverted. This is done for verification.
A plain nec IR message has 16 bits; the high 8 bits are the address
and the low 8 bits are the command.
nec-x (RC_PROTO_NECX)
288-294Extended NEC는 16-bit address와 8-bit command를 사용합니다. 예상할 수 있는 24-bit 값으로 encode하며 하위 8 bit가 command, 상위 16 bit가 address입니다.
24-bit scan code의 field 배치입니다.
nec-x (RC_PROTO_NECX)
---------------------
Extended nec has a 16 bit address and a 8 bit command. This is encoded
as a 24 bit value as you would expect, with the lower 8 bits the command
and the upper 16 bits the address.
nec-32 (RC_PROTO_NEC32)
295-328NEC-32는 반전 address나 반전 command를 보내지 않고 32 bit 전체를 message data로 사용합니다.
올바르게 NEC-32로 decode되려면 두 번째 8-bit 값이 첫 번째 값의 반전이 아니어야 하고, 마지막 8-bit 값도 세 번째 값의 반전이 아니어야 합니다. 반전 관계가 있으면 일반 NEC 계열로 해석될 수 있습니다.
Scan code byte 순서는 전송의 네 8-bit chunk를 직선적으로 놓지 않는 독특한 배치입니다.
전송 순서의 byte를 scan code에서 재배열합니다.
nec-32 (RC_PROTO_NEC32)
-----------------------
nec-32 does not send an inverted address or an inverted command; the
entire message, all 32 bits, are used.
For this to be decoded correctly, the second 8 bits must not be the
inverted value of the first, and also the last 8 bits must not be the
inverted value of the third 8 bit value.
The scancode has a somewhat unusual encoding.
.. flat-table:: nec-32 bits scancode mapping
* - nec-32 bits
- scancode bit
* - First 8 bits
- 16 to 23
* - Second 8 bits
- 24 to 31
* - Third 8 bits
- 0 to 7
* - Fourth 8 bits
- 8 to 15
sanyo (RC_PROTO_SANYO)
329-338Sanyo protocol은 NEC와 비슷하지만 address가 8 bit가 아니라 13 bit입니다. Address와 command 뒤에는 각각 반전 값이 오지만 이 반전 값은 scan code에 포함하지 않습니다.
Scan code bit 8~20에 13-bit address를, 하위 8 bit인 bit 0~7에 command를 저장합니다. 원문의 `Bis` 표기는 문맥상 `Bits`로 해석하되 영어 원문에는 그대로 남습니다.
검증용 반전 값은 제외한 field 배치입니다.
sanyo (RC_PROTO_SANYO)
----------------------
The sanyo protocol is like the nec protocol, but with 13 bits address
rather than 8 bits. Both the address and the command are followed by
their inverted versions, but these are not present in the scancodes.
Bis 8 to 20 of the scancode is the 13 bits address, and the lower 8
bits are the command.
mcir2 keyboard와 pointer protocol
339-350`RC_PROTO_MCIR2_KBD`는 Microsoft MCE keyboard가 keyboard event에 생성하는 protocol입니다. 정확한 encoding은 `ir-mce_kbd-decoder.c` 구현을 참조합니다.
`RC_PROTO_MCIR2_MSE`는 같은 keyboard의 pointer event용 protocol이며 encoding 기준 역시 `ir-mce_kbd-decoder.c`입니다.
동일 장치의 event 종류에 따라 protocol symbol이 다릅니다.
mcir2-kbd (RC_PROTO_MCIR2_KBD)
------------------------------
This protocol is generated by the Microsoft MCE keyboard for keyboard
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
mcir2-mse (RC_PROTO_MCIR2_MSE)
------------------------------
This protocol is generated by the Microsoft MCE keyboard for pointer
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
rc-6-0 (RC_PROTO_RC6_0)
351-358이 protocol은 rc-6 mode 0입니다. Scan code는 protocol의 16 bit를 그대로 사용하며 별도의 toggle bit도 있습니다.
Protocol payload와 scan code가 직접 대응합니다.
rc-6-0 (RC_PROTO_RC6_0)
-----------------------
This is the rc-6 in mode 0. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 16 bits as in the protocol. There is also a
toggle bit.
rc-6-6a-20 (RC_PROTO_RC6_6A_20)
359-366rc-6 mode 6a의 20-bit variant입니다. Scan code는 protocol의 정확한 20 bit이며 toggle bit도 제공합니다.
Payload와 상태 구성입니다.
rc-6-6a-20 (RC_PROTO_RC6_6A_20)
-------------------------------
This is the rc-6 in mode 6a, 20 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 20 bits
as in the protocol. There is also a toggle bit.
rc-6-6a-24 (RC_PROTO_RC6_6A_24)
367-374rc-6 mode 6a의 24-bit variant입니다. Scan code는 protocol의 정확한 24 bit이며 toggle bit도 제공합니다.
Payload와 상태 구성입니다.
rc-6-6a-24 (RC_PROTO_RC6_6A_24)
-------------------------------
This is the rc-6 in mode 6a, 24 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The scancode is the exact 24 bits
as in the protocol. There is also a toggle bit.
rc-6-6a-32 (RC_PROTO_RC6_6A_32)
375-384rc-6 mode 6a의 32-bit non-Microsoft MCE variant입니다. 상위 16 bit는 vendor, 하위 16 bit는 vendor-specific bits입니다.
이 protocol은 vendor가 `0x800f`가 아닌 경우에 사용합니다. Microsoft vendor 값은 별도 `RC_PROTO_RC6_MCE`로 구분합니다.
Vendor 값으로 MCE variant와 구분합니다.
rc-6-6a-32 (RC_PROTO_RC6_6A_32)
-------------------------------
This is the rc-6 in mode 6a, 32 bits. rc-6 is described here
https://www.sbprojects.net/knowledge/ir/rc6.php.
The upper 16 bits are the vendor,
and the lower 16 bits are the vendor-specific bits. This protocol is
for the non-Microsoft MCE variant (vendor != 0x800f).
rc-6-mce (RC_PROTO_RC6_MCE)
385-393Microsoft MCE variant도 rc-6 mode 6a의 32-bit 형식이며 상위 16 bit는 vendor, 하위 16 bit는 vendor-specific bits입니다. Vendor 값은 `0x800f`입니다.
Protocol 자체의 toggle bit는 무시하고 16번째 bit를 toggle bit로 취급해야 합니다.
Vendor와 toggle 해석이 non-MCE variant와 다릅니다.
rc-6-mce (RC_PROTO_RC6_MCE)
---------------------------
This is the rc-6 in mode 6a, 32 bits. The upper 16 bits are the vendor,
and the lower 16 bits are the vendor-specific bits. This protocol is
for the Microsoft MCE variant (vendor = 0x800f). The toggle bit in the
protocol itself is ignored, and the 16th bit should be takes as the toggle
bit.
sharp (RC_PROTO_SHARP)
394-404Sharp VCR이 사용하는 protocol입니다. 정상 값과 반전 값 사이에 40 ms라는 매우 긴 space가 있어 일부 IR receiver는 이를 decode하지 못할 수 있습니다.
5-bit address는 scan code bit 8~12에, 8-bit command는 bit 0~7에 저장합니다.
긴 inter-frame space와 별개인 논리 field 배치입니다.
sharp (RC_PROTO_SHARP)
----------------------
This is a protocol used by Sharp VCRs, is described here
https://www.sbprojects.net/knowledge/ir/sharp.php. There is a very long
(40ms) space between the normal and inverted values, and some IR receivers
cannot decode this.
There is a 5 bit address and a 8 bit command. In the scancode the address is
in bits 8 to 12, and the command in bits 0 to 7.
xmp (RC_PROTO_XMP)
405-411XMP protocol에는 여러 version이 있지만 kernel은 version 1만 지원합니다. Scan code encoding의 상세 기준은 `ir-xmp-decoder.c` 구현입니다.
문서가 명시하는 version과 구현 기준입니다.
xmp (RC_PROTO_XMP)
------------------
This protocol has several versions and only version 1 is supported. Refer
to the decoder (ir-xmp-decoder.c) to see how it is encoded.
cec (RC_PROTO_CEC)
412-418CEC는 IR protocol이 아니라 CEC transport 위의 protocol입니다. CEC infrastructure가 command를 쉽게 remap할 수 있도록 rc-core를 사용하기 때문에 RC protocol 목록에 포함됩니다.
IR receiver 없이도 rc-core mapping을 재사용합니다.
cec (RC_PROTO_CEC)
------------------
This is not an IR protocol, this is a protocol over CEC. The CEC
infrastructure uses rc-core for handling CEC commands, so that they
can easily be remapped.
imon (RC_PROTO_IMON)
419-427Antec Veris/SoundGraph iMON remote가 사용하는 protocol입니다. Button press와 pointer movement를 모두 표현합니다.
Protocol은 31 bit를 encode하며 scan code는 그 31 bit를 그대로 사용하고 최상위 bit는 항상 0입니다.
u32 안에 31-bit protocol 값을 직접 배치합니다.
imon (RC_PROTO_IMON)
--------------------
This protocol is used by Antec Veris/SoundGraph iMON remotes.
The protocol
describes both button presses and pointer movements. The protocol encodes
31 bits, and the scancode is simply the 31 bits with the top bit always 0.
rc-mm 12·24·32 bit variant
428-448rc-mm protocol에는 12·24·32 bit variant가 있으며 각 scan code는 protocol bit를 변형 없이 그대로 사용합니다.
Protocol payload와 scan code 길이가 같습니다.
rc-mm-12 (RC_PROTO_RCMM12)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 12 bits.
rc-mm-24 (RC_PROTO_RCMM24)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 24 bits.
rc-mm-32 (RC_PROTO_RCMM32)
--------------------------
The rc-mm protocol is described here
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
the 32 bits.
xbox-dvd (RC_PROTO_XBOX_DVD)
449-454Original Xbox용 Xbox DVD Remote가 사용하는 protocol입니다. Kernel 안에는 이 protocol의 decoder나 encoder가 없습니다.
USB 장치가 protocol을 직접 decode합니다. Raw IR 환경을 위한 BPF decoder는 `v4l-utils`에서 제공합니다.
Kernel codec 부재와 대체 decode 경로입니다.
xbox-dvd (RC_PROTO_XBOX_DVD)
----------------------------
This protocol is used by Xbox DVD Remote, which was made for the original
Xbox. There is no in-kernel decoder or encoder for this protocol. The usb
device decodes the protocol. There is a BPF decoder available in v4l-utils.
요약·해설
rc-protos.rst:1-454Protocol decoder는 pulse/space message를 protocol별 u32 scan code로 정규화합니다. Address·command field 순서, 반전 byte, toggle bit, vendor 구분과 scan code byte 재배치는 protocol마다 다르므로 이 문서의 mapping을 ABI 기준으로 사용해야 합니다.