1
linux/drivers/media/rc
Jarod Wilson 98c32bcded [media] rc: call input_sync after scancode reports
Due to commit cdda911c34, evdev only
becomes readable when the buffer contains an EV_SYN/SYN_REPORT event. If
we get a repeat or a scancode we don't have a mapping for, we never call
input_sync, and thus those events don't get reported in a timely
fashion.

For example, take an mceusb transceiver with a default rc6 keymap. Press
buttons on an rc5 remote while monitoring with ir-keytable, and you'll
see nothing. Now press a button on the rc6 remote matching the keymap.
You'll suddenly get the rc5 key scancodes, the rc6 scancode and the rc6
key spit out all at the same time.

Pressing and holding a button on a remote we do have a keymap for also
works rather unreliably right now, due to repeat events also happening
without a call to input_sync (we bail from ir_do_keydown before getting
to the point where it calls input_sync).

Easy fix though, just add two strategically placed input_sync calls
right after our input_event calls for EV_MSC, and all is well again.
Technically, we probably should have been doing this all along, its just
that it never caused any functional difference until the referenced
change went into the input layer.

input_sync once per IR signal. There was another hidden bug in the code
where we were calling input_report_key using last_keycode instead of our
just discovered keycode, which manifested with the reordering of calling
input_report_key and setting last_keycode.

Reported-by: Stephan Raue <sraue@openelec.tv>
CC: Stephan Raue <sraue@openelec.tv>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: Jeff Brown <jeffbrown@android.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-01 16:34:45 -03:00
..
keymaps [media] keymaps: fix table for pinnacle pctv hd devices 2011-07-01 16:31:54 -03:00
ene_ir.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ene_ir.h [media] rc: fix up and genericize some time unit conversions 2011-01-19 11:45:52 -02:00
fintek-cir.c [media] fintek-cir: make suspend with active IR more reliable 2011-06-11 09:03:35 -03:00
fintek-cir.h [media] fintek-cir: new driver for Fintek LPC SuperIO CIR function 2011-05-25 20:07:58 -03:00
imon.c [media] imon: allow either proto on unknown 0xffdc 2011-07-01 16:34:01 -03:00
ir-jvc-decoder.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
ir-lirc-codec.c [media] rc/ir-lirc-codec: add back debug spew 2011-01-31 12:19:42 -02:00
ir-nec-decoder.c [media] rc: interim support for 32-bit NEC-ish scancodes 2011-03-22 19:24:23 -03:00
ir-raw.c [media] rc: fix ghost keypresses with certain hw 2011-07-01 16:33:01 -03:00
ir-rc5-decoder.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
ir-rc5-sz-decoder.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
ir-rc6-decoder.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
ir-sony-decoder.c [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
ite-cir.c [media] ite-cir: 8709 needs to use pnp resource 2 2011-07-01 16:31:38 -03:00
ite-cir.h [media] ite-cir: 8709 needs to use pnp resource 2 2011-07-01 16:31:38 -03:00
Kconfig [media] fintek-cir: new driver for Fintek LPC SuperIO CIR function 2011-05-25 20:07:58 -03:00
lirc_dev.c [media] lirc_dev: store cdev in irctl, up maxdevs 2011-06-11 09:03:20 -03:00
Makefile [media] fintek-cir: new driver for Fintek LPC SuperIO CIR function 2011-05-25 20:07:58 -03:00
mceusb.c [media] mceusb: plug memory leak on data transmit 2011-06-11 09:04:04 -03:00
nuvoton-cir.c [media] nuvoton-cir: in_use isn't actually in use, remove it 2011-06-11 09:03:46 -03:00
nuvoton-cir.h [media] nuvoton-cir: in_use isn't actually in use, remove it 2011-06-11 09:03:46 -03:00
rc-core-priv.h [media] rc-core: fix some leftovers from the renaming patches 2010-12-29 08:16:54 -02:00
rc-loopback.c [media] rc-core: add trailing silence in rc-loopback tx 2011-05-20 09:29:53 -03:00
rc-main.c [media] rc: call input_sync after scancode reports 2011-07-01 16:34:45 -03:00
redrat3.c [media] redrat3: new rc-core IR transceiver device driver 2011-05-20 16:25:00 -03:00
streamzap.c [media] rc/streamzap: fix reporting response times 2011-01-31 12:22:13 -02:00
winbond-cir.c [media] rc-core: use ir_raw_event_store_with_filter in winbond-cir 2011-05-20 09:29:54 -03:00