[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)
commit6eae57e9d5b01d0ee4b1932b66102b1b9b6cd93d
tree1fca92c7524d47b62176400976a5f54ffa695b39
parentb590c0bfaee6a3edb6bcaaab68dfe9e2f6db9eb9
[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 "18bc174 [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