]> git.baikalelectronics.ru Git - kernel.git/commit
[media] rc: unify nec32 protocol scancode format
authorSean Young <sean@mess.org>
Thu, 15 Dec 2016 09:37:48 +0000 (07:37 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 30 Jan 2017 14:17:19 +0000 (12:17 -0200)
commitfb463a89615c968f0eed01fe587a4879f76b6204
tree1fca92c7524d47b62176400976a5f54ffa695b39
parent4272493503fadbc934e14e7a6d7ca95d108b13ba
[media] rc: unify nec32 protocol scancode format

There are two different encodings used for nec32:
 - The ir-nec-decoder.c decoder treats it as 32 bit msb first.
 - The img-ir decoder/encoder, winbond wakeup, dib0700, ir-ctl userspace,
   treat nec32 analogous to necx and nec: 4 bytes, each lsb first. So this
   format reverses the 4 bytes.

There are arguments to be had for both formats, but we should not use
different formats in different parts of the kernel. Selecting the second
format introduces the least code churn. It does mean that the TiVo keymap
needs updating.

This change was submitted before as "c9710e4 [media] media: rc: change
32bit NEC scancode format", which was reverted because it was unclear
what scancode rc drivers produce. There are now more examples of drivers
which produce nec32 in lsb format.

The TiVo keymap is verified against the Nero Liquid TiVo remote. The
keymap is not for the Tivo DVR remote, which uses rc-5.

Signed-off-by: Sean Young <sean@mess.org>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/ir-nec-decoder.c
drivers/media/rc/keymaps/rc-tivo.c