]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] rc: ir-rc5-decoder: Add encode capability
authorJames Hogan <james@albanarts.com>
Tue, 31 Mar 2015 17:48:08 +0000 (14:48 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 14 May 2015 17:32:04 +0000 (14:32 -0300)
commita0466f15b4654cf1ac9e387d7c1a401eff494b4f
tree694e84eb47bb751ae5c1b749eba1099d3352858b
parent1d971d927efa2e10194c96ed0475b6d6054342d8
[media] rc: ir-rc5-decoder: Add encode capability

Add the capability to encode RC-5, RC-5X and RC-5-SZ scancodes as raw
events. The protocol is chosen based on the specified protocol mask,
and whether all the required bits are set in the scancode mask, and
none of the unused bits are set in the scancode data. For example a
scancode filter with bit 16 set in both data and mask is unambiguously
RC-5X.

The Manchester modulation helper is used, and for RC-5X it is used twice
with two sets of timings, the first with a short trailer space for the
space in the middle, and the second with no leader so that it can
continue the space.

The encoding in RC-5-SZ first inserts a pulse and then simply utilizes
the generic Manchester encoder available in rc-core.

Signed-off-by: James Hogan <james@albanarts.com>
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/ir-rc5-decoder.c