^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) .. _Remote_controllers_Protocols:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *****************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Remote Controller Protocols and Scancodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *****************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) IR is encoded as a series of pulses and spaces, using a protocol. These
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) protocols can encode e.g. an address (which device should respond) and a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) command: what it should do. The values for these are not always consistent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) across different devices for a given protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Therefore out the output of the IR decoder is a scancode; a single u32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) value. Using keymap tables this can be mapped to linux key codes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) Other things can be encoded too. Some IR protocols encode a toggle bit; this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) is to distinguish whether the same button is being held down, or has been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) released and pressed again. If has been released and pressed again, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) toggle bit will invert from one IR message to the next.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Some remotes have a pointer-type device which can used to control the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) mouse; some air conditioning systems can have their target temperature
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) target set in IR.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) The following are the protocols the kernel knows about and also lists
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) how scancodes are encoded for each protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) rc-5 (RC_PROTO_RC5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) This IR protocol uses manchester encoding to encode 14 bits. There is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) detailed description here https://www.sbprojects.net/knowledge/ir/rc5.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) The scancode encoding is *not* consistent with the lirc daemon (lircd) rc5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) protocol, or the manchester BPF decoder.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) .. flat-table:: rc5 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) * - rc-5 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - Start bit, always set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - 6 (inverted)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) - 2nd start bit in rc5, re-used as 6th command bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - Toggle bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) - 8 to 13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) - Address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) * - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) - 0 to 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) - Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) There is a variant of rc5 called either rc5x or extended rc5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) where there the second stop bit is the 6th commmand bit, but inverted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) This is done so it the scancodes and encoding is compatible with existing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) schemes. This bit is stored in bit 6 of the scancode, inverted. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) done to keep it compatible with plain rc-5 where there are two start bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) rc-5-sz (RC_PROTO_RC5_SZ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) This is much like rc-5 but one bit longer. The scancode is encoded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) differently.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) .. flat-table:: rc-5-sz bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) * - rc-5-sz bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) - Start bit, always set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) - 13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) - Address bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) - Toggle bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) * - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) - 6 to 11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) - Address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) * - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) - 0 to 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) - Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) rc-5x-20 (RC_PROTO_RC5X_20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) ---------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) This rc-5 extended to encoded 20 bits. The is a 3555 microseconds space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) after the 8th bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) .. flat-table:: rc-5x-20 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) * - rc-5-sz bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) - Start bit, always set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) - 14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) - Address bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) * - 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) - none
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) - Toggle bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) * - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) - 16 to 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) - Address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) * - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) - 8 to 13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) - Address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) * - 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) - 0 to 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) - Command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) jvc (RC_PROTO_JVC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) The jvc protocol is much like nec, without the inverted values. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) described here https://www.sbprojects.net/knowledge/ir/jvc.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) The scancode is a 16 bits value, where the address is the lower 8 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) and the command the higher 8 bits; this is reversed from IR order.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) sony-12 (RC_PROTO_SONY12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) The sony protocol is a pulse-width encoding. There are three variants,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) which just differ in number of bits and scancode encoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) .. flat-table:: sony-12 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * - sony-12 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) * - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) - 16 to 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) - device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) * - 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) - 0 to 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) - function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) sony-15 (RC_PROTO_SONY15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) The sony protocol is a pulse-width encoding. There are three variants,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) which just differ in number of bits and scancode encoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) .. flat-table:: sony-12 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) * - sony-12 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) * - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) - 16 to 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) - device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) * - 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) - 0 to 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) - function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) sony-20 (RC_PROTO_SONY20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) The sony protocol is a pulse-width encoding. There are three variants,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) which just differ in number of bits and scancode encoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) .. flat-table:: sony-20 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) :widths: 1 1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) * - sony-20 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) - description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) * - 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) - 16 to 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) - device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) * - 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) - 0 to 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) - device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) * - 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) - 8 to 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) - extended bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) nec (RC_PROTO_NEC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) The nec protocol encodes an 8 bit address and an 8 bit command. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) described here https://www.sbprojects.net/knowledge/ir/nec.php. Note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) that the protocol sends least significant bit first.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) As a check, the nec protocol sends the address and command twice; the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) second time it is inverted. This is done for verification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) A plain nec IR message has 16 bits; the high 8 bits are the address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) and the low 8 bits are the command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) nec-x (RC_PROTO_NECX)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) Extended nec has a 16 bit address and a 8 bit command. This is encoded
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) as a 24 bit value as you would expect, with the lower 8 bits the command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) and the upper 16 bits the address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) nec-32 (RC_PROTO_NEC32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) nec-32 does not send an inverted address or an inverted command; the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) entire message, all 32 bits, are used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) For this to be decoded correctly, the second 8 bits must not be the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) inverted value of the first, and also the last 8 bits must not be the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) inverted value of the third 8 bit value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) The scancode has a somewhat unusual encoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) .. flat-table:: nec-32 bits scancode mapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) * - nec-32 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) - scancode bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) * - First 8 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) - 16 to 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) * - Second 8 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) - 24 to 31
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) * - Third 8 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) - 0 to 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) * - Fourth 8 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) - 8 to 15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) sanyo (RC_PROTO_SANYO)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) The sanyo protocol is like the nec protocol, but with 13 bits address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) rather than 8 bits. Both the address and the command are followed by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) their inverted versions, but these are not present in the scancodes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) Bis 8 to 20 of the scancode is the 13 bits address, and the lower 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) bits are the command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) mcir2-kbd (RC_PROTO_MCIR2_KBD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) ------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) This protocol is generated by the Microsoft MCE keyboard for keyboard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) mcir2-mse (RC_PROTO_MCIR2_MSE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) ------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) This protocol is generated by the Microsoft MCE keyboard for pointer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) rc-6-0 (RC_PROTO_RC6_0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) This is the rc-6 in mode 0. rc-6 is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) https://www.sbprojects.net/knowledge/ir/rc6.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) The scancode is the exact 16 bits as in the protocol. There is also a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) toggle bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) rc-6-6a-20 (RC_PROTO_RC6_6A_20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) -------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) This is the rc-6 in mode 6a, 20 bits. rc-6 is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) https://www.sbprojects.net/knowledge/ir/rc6.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) The scancode is the exact 20 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) as in the protocol. There is also a toggle bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) rc-6-6a-24 (RC_PROTO_RC6_6A_24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) -------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) This is the rc-6 in mode 6a, 24 bits. rc-6 is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) https://www.sbprojects.net/knowledge/ir/rc6.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) The scancode is the exact 24 bits
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) as in the protocol. There is also a toggle bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) rc-6-6a-32 (RC_PROTO_RC6_6A_32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) -------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) This is the rc-6 in mode 6a, 32 bits. rc-6 is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) https://www.sbprojects.net/knowledge/ir/rc6.php.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) The upper 16 bits are the vendor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) and the lower 16 bits are the vendor-specific bits. This protocol is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) for the non-Microsoft MCE variant (vendor != 0x800f).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) rc-6-mce (RC_PROTO_RC6_MCE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) ---------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) This is the rc-6 in mode 6a, 32 bits. The upper 16 bits are the vendor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) and the lower 16 bits are the vendor-specific bits. This protocol is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) for the Microsoft MCE variant (vendor = 0x800f). The toggle bit in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) protocol itself is ignored, and the 16th bit should be takes as the toggle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) sharp (RC_PROTO_SHARP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) This is a protocol used by Sharp VCRs, is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) https://www.sbprojects.net/knowledge/ir/sharp.php. There is a very long
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) (40ms) space between the normal and inverted values, and some IR receivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) cannot decode this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) There is a 5 bit address and a 8 bit command. In the scancode the address is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) in bits 8 to 12, and the command in bits 0 to 7.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) xmp (RC_PROTO_XMP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) This protocol has several versions and only version 1 is supported. Refer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) to the decoder (ir-xmp-decoder.c) to see how it is encoded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) cec (RC_PROTO_CEC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) This is not an IR protocol, this is a protocol over CEC. The CEC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) infrastructure uses rc-core for handling CEC commands, so that they
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) can easily be remapped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) imon (RC_PROTO_IMON)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) --------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) This protocol is used by Antec Veris/SoundGraph iMON remotes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) The protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) describes both button presses and pointer movements. The protocol encodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 31 bits, and the scancode is simply the 31 bits with the top bit always 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) rc-mm-12 (RC_PROTO_RCMM12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) The rc-mm protocol is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) the 12 bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) rc-mm-24 (RC_PROTO_RCMM24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) The rc-mm protocol is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) the 24 bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) rc-mm-32 (RC_PROTO_RCMM32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) The rc-mm protocol is described here
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) the 32 bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) xbox-dvd (RC_PROTO_XBOX_DVD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) ----------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) This protocol is used by XBox DVD Remote, which was made for the original
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) XBox. There is no in-kernel decoder or encoder for this protocol. The usb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) device decodes the protocol. There is a BPF decoder available in v4l-utils.