Remote Controller API
+
+
Remote Controllers
+
IntroductionCurrently, most analog and digital devices have a Infrared input for remote controllers. Each
manufacturer has their own type of control. It is not rare for the same manufacturer to ship different
types of controls, depending on the device.
+A Remote Controller interface is mapped as a normal evdev/input interface, just like a keyboard or a mouse.
+So, it uses all ioctls already defined for any other input devices.
+However, remove controllers are more flexible than a normal input device, as the IR
+receiver (and/or transmitter) can be used in conjunction with a wide variety of different IR remotes.
+In order to allow flexibility, the Remote Controller subsystem allows controlling the
+RC-specific attributes via the sysfs class nodes.
+
+
+
+Remote Controller's sysfs nodes
+As defined at Documentation/ABI/testing/sysfs-class-rc, those are the sysfs nodes that control the Remote Controllers:
+
+
+/sys/class/rc/
+The /sys/class/rc/ class sub-directory belongs to the Remote Controller
+core and provides a sysfs interface for configuring infrared remote controller receivers.
+
+
+
+
+/sys/class/rc/rcN/
+A /sys/class/rc/rcN directory is created for each remote
+ control receiver device where N is the number of the receiver.
+
+
+
+/sys/class/rc/rcN/protocols
+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.
+
+
+
+/sys/class/rc/rcN/filter
+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.
+
+
+
+/sys/class/rc/rcN/filter_mask
+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.
+
+
+
+/sys/class/rc/rcN/wakeup_protocols
+Reading this file returns a list of available protocols to use for the
+wakeup filter, something like:
+rc5 rc6 nec jvc [sony]
+The enabled wakeup protocol is shown in [] brackets.
+Writing "+proto" will add a protocol to the list of enabled wakeup
+protocols.
+Writing "-proto" will remove a protocol from the list of enabled wakeup
+protocols.
+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.
+
+
+
+/sys/class/rc/rcN/wakeup_filter
+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.
+
+
+
+/sys/class/rc/rcN/wakeup_filter_mask
+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.
+
+
+
+
+Remote controller tablesUnfortunately, for several years, there was no effort to create uniform IR keycodes for
different devices. This caused the same IR keyname to be mapped completely differently on
different IR devices. This resulted that the same IR keyname to be mapped completely different on
@@ -142,7 +284,7 @@
-It should be noticed that, sometimes, there some fundamental missing keys at some cheaper IR's. Due to that, it is recommended to:
+It should be noted that, sometimes, there some fundamental missing keys at some cheaper IR's. Due to that, it is recommended to: