[media] redrat3: improve compat with lirc userspace decode
authorJarod Wilson <jarod@redhat.com>
Wed, 13 Jul 2011 21:26:07 +0000 (18:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:55:59 +0000 (17:55 -0300)
commitc53f9f00e5ddf72046698d6a378384e29fc9795f
tree31504404bb1635a9a4d9616e15ac1d0899ccd292
parent2c594ffae40306ba1a5a5d59186cd3d49dc3ad6a
[media] redrat3: improve compat with lirc userspace decode

This is admittedly a bit of a hack, but if we change our timeout value
to something longer and fudge our synthesized trailing space sample
based on the initial pulse sample, rc-core decode continues to work just
fine with both rc-6 and rc-5, and now lirc userspace decode shows proper
repeats for both of those protocols as well. Also tested NEC
successfully with both decode options.

We do still need a reset timer callback using the hardware's timeout
value to make sure we actually process samples correctly, regardless of
our somewhat hacky timeout and synthesized trailer above.

This also adds a missing del_timer_sync call to the module unload path.

CC: Chris Dodge <chris@redrat.co.uk>
CC: Andrew Vincer <andrew.vincer@redrat.co.uk>
CC: Stephen Cox <scox_nz@yahoo.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/redrat3.c