요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Runtime protocol selection
sysfs-class-rc:18-41Available protocol 목록에서 bracket으로 enabled 항목을 표시하고 add, remove, exclusive enable, disable-all 쓰기를 지원합니다.
Runtime scancode filter
sysfs-class-rc:43-73filter expected value와 filter_mask를 결합해 비교할 scancode bit를 정하며 mask 0은 모든 valid scancode를 허용합니다.
Wakeup protocol selection
sysfs-class-rc:75-99Protocol variant별 wakeup encoding을 나열하고 hardware가 지원하는 protocol 하나만 선택하거나 wakeup을 끕니다.
Wakeup scancode filter
sysfs-class-rc:101-137wakeup_filter와 mask가 일치하는 scancode를 suspend-to-RAM 또는 power-off 상태의 system wake event로 사용합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/rc/
Date: Apr 2010
KernelVersion: 2.6.35
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
The rc/ class sub-directory belongs to the Remote Controller
core and provides a sysfs interface for configuring infrared
remote controller receivers.
What: /sys/class/rc/rc<N>/
Date: Apr 2010
KernelVersion: 2.6.35
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
A /sys/class/rc/rcN directory is created for each remote
control receiver device where N is the number of the receiver.
What: /sys/class/rc/rc<N>/protocols
Date: Jun 2010
KernelVersion: 2.6.36
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Reading this file returns a list of available protocols,
something like::
"rc5 [rc6] nec jvc [sony]"
Enabled protocols are shown in [] brackets.
Writing "+proto" will add a protocol to the list of enabled
protocols.
Writing "-proto" will remove a protocol from the list of enabled
protocols.
Writing "proto" will enable only "proto".
Writing "none" will disable all protocols.
Write fails with EINVAL if an invalid protocol combination or
unknown protocol name is used.
What: /sys/class/rc/rc<N>/filter
Date: Jan 2014
KernelVersion: 3.15
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Sets the scancode filter expected value.
Use in combination with /sys/class/rc/rcN/filter_mask to set the
expected value of the bits set in the filter mask.
If the hardware supports it then scancodes which do not match
the filter will be ignored. Otherwise the write will fail with
an error.
This value may be reset to 0 if the current protocol is altered.
What: /sys/class/rc/rc<N>/filter_mask
Date: Jan 2014
KernelVersion: 3.15
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Sets the scancode filter mask of bits to compare.
Use in combination with /sys/class/rc/rcN/filter to set the bits
of the scancode which should be compared against the expected
value. A value of 0 disables the filter to allow all valid
scancodes to be processed.
If the hardware supports it then scancodes which do not match
the filter will be ignored. Otherwise the write will fail with
an error.
This value may be reset to 0 if the current protocol is altered.
What: /sys/class/rc/rc<N>/wakeup_protocols
Date: Feb 2017
KernelVersion: 4.11
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Reading this file returns a list of available protocols to use
for the wakeup filter, something like::
"rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce"
Note that protocol variants are listed, so "nec", "sony",
"rc-5", "rc-6" have their different bit length encodings
listed if available.
The enabled wakeup protocol is shown in [] brackets.
Only one protocol can be selected at a time.
Writing "proto" will use "proto" for wakeup events.
Writing "none" will disable wakeup.
Write fails with EINVAL if an invalid protocol combination or
unknown protocol name is used, or if wakeup is not supported by
the hardware.
What: /sys/class/rc/rc<N>/wakeup_filter
Date: Jan 2014
KernelVersion: 3.15
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Sets the scancode wakeup filter expected value.
Use in combination with /sys/class/rc/rcN/wakeup_filter_mask to
set the expected value of the bits set in the wakeup filter mask
to trigger a system wake event.
If the hardware supports it and wakeup_filter_mask is not 0 then
scancodes which match the filter will wake the system from e.g.
suspend to RAM or power off.
Otherwise the write will fail with an error.
This value may be reset to 0 if the wakeup protocol is altered.
What: /sys/class/rc/rc<N>/wakeup_filter_mask
Date: Jan 2014
KernelVersion: 3.15
Contact: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Description:
Sets the scancode wakeup filter mask of bits to compare.
Use in combination with /sys/class/rc/rcN/wakeup_filter to set
the bits of the scancode which should be compared against the
expected value to trigger a system wake event.
If the hardware supports it and wakeup_filter_mask is not 0 then
scancodes which match the filter will wake the system from e.g.
suspend to RAM or power off.
Otherwise the write will fail with an error.
This value may be reset to 0 if the wakeup protocol is altered.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Remote Controller core class
1-8| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/ |
| Date | 2010년 4월 |
| KernelVersion | 2.6.35 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | rc/ class subdirectory는 Remote Controller core에 속하며 infrared remote controller receiver를 구성하는 sysfs interface를 제공합니다. |
Remote control receiver instance
10-16| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/ |
| Date | 2010년 4월 |
| KernelVersion | 2.6.35 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | 각 remote control receiver device마다 /sys/class/rc/rcN directory를 생성하며 N은 receiver 번호입니다. |
Enabled infrared protocols
18-41| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/protocols |
| Date | 2010년 6월 |
| KernelVersion | 2.6.36 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | 읽으면 available protocol 목록을 반환하고 enabled protocol은 [] bracket 안에 표시합니다. "+proto"를 쓰면 enabled 목록에 protocol을 추가하고, "-proto"는 제거하며, "proto"는 해당 protocol만 enable합니다. "none"은 모든 protocol을 disable합니다. Invalid protocol 조합이나 unknown protocol name이면 write가 EINVAL로 실패합니다. |
"rc5 [rc6] nec jvc [sony]"
protocols attribute에 쓰는 값과 enabled set 변화입니다.
Scancode filter expected value
43-56| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/filter |
| Date | 2014년 1월 |
| KernelVersion | 3.15 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | Scancode filter의 expected value를 설정합니다. /sys/class/rc/rcN/filter_mask와 함께 사용해 mask에서 set된 bit의 expected value를 지정합니다. Hardware가 지원하면 filter와 일치하지 않는 scancode를 무시하고, 지원하지 않으면 write가 error로 실패합니다. Current protocol을 바꾸면 이 값이 0으로 reset될 수 있습니다. |
Scancode filter comparison mask
58-73| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/filter_mask |
| Date | 2014년 1월 |
| KernelVersion | 3.15 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | 비교할 scancode bit의 filter mask를 설정합니다. /sys/class/rc/rcN/filter와 함께 사용해 expected value와 비교할 scancode bit를 정합니다. 0은 filter를 disable하여 모든 valid scancode를 처리하게 합니다. Hardware가 지원하면 일치하지 않는 scancode를 무시하고, 지원하지 않으면 write가 error로 실패합니다. Current protocol을 바꾸면 이 값이 0으로 reset될 수 있습니다. |
filter는 expected value, filter_mask는 실제 비교할 bit를 정합니다.
Wakeup protocol selection
75-99| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/wakeup_protocols |
| Date | 2017년 2월 |
| KernelVersion | 4.11 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | 읽으면 wakeup filter에 사용할 available protocol을 반환합니다. nec, sony, rc-5, rc-6 등의 bit-length encoding variant를 available한 범위에서 따로 나열하고, enabled wakeup protocol은 [] bracket 안에 표시합니다. 한 번에 protocol 하나만 선택할 수 있습니다. "proto"를 쓰면 wakeup event에 해당 protocol을 사용하고 "none"은 wakeup을 disable합니다. Invalid 조합, unknown protocol, 또는 hardware가 wakeup을 지원하지 않으면 write가 EINVAL로 실패합니다. |
"rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce"
Runtime protocols와 달리 wakeup protocol은 하나만 선택합니다.
Wakeup scancode expected value
101-118| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/wakeup_filter |
| Date | 2014년 1월 |
| KernelVersion | 3.15 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | Scancode wakeup filter의 expected value를 설정합니다. /sys/class/rc/rcN/wakeup_filter_mask와 함께 사용해 system wake event를 trigger할 mask bit의 expected value를 지정합니다. Hardware가 지원하고 wakeup_filter_mask가 0이 아니면 filter와 일치하는 scancode가 suspend-to-RAM 또는 power-off 같은 상태에서 system을 깨웁니다. 그 밖에는 write가 error로 실패합니다. Wakeup protocol을 바꾸면 이 값이 0으로 reset될 수 있습니다. |
Wakeup scancode comparison mask
120-137| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/rc/rc<N>/wakeup_filter_mask |
| Date | 2014년 1월 |
| KernelVersion | 3.15 |
| Contact | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
| Description | 비교할 scancode bit의 wakeup filter mask를 설정합니다. /sys/class/rc/rcN/wakeup_filter와 함께 사용해 system wake event를 trigger할 expected value와 비교할 scancode bit를 정합니다. Hardware가 지원하고 wakeup_filter_mask가 0이 아니면 filter와 일치하는 scancode가 suspend-to-RAM 또는 power-off 상태에서 system을 깨웁니다. 그 밖에는 write가 error로 실패합니다. Wakeup protocol을 바꾸면 이 값이 0으로 reset될 수 있습니다. |
선택한 protocol과 nonzero mask에 맞는 scancode만 system wake event가 됩니다.
Remote Controller class and receiver
sysfs-class-rc:1-17Remote Controller core가 각 infrared receiver를 /sys/class/rc/rcN directory로 제공합니다.