Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] firedtv: fix remote control with newer Xorg evdev

After a recent update of xf86-input-evdev and xorg-server, I noticed
that X11 applications did not receive keypresses from the FireDTV
infrared remote control anymore. Instead, the Xorg log featured lots of

"FireDTV remote control: dropping event due to full queue!"

exclamations. The Linux console did not have an issue with the
FireDTV's RC though.

The fix is to insert EV_SYN events after the key-down/-up events.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Stefan Richter and committed by
Mauro Carvalho Chehab
22f37712 3c61be44

+6 -3
+6 -3
drivers/media/dvb/firewire/firedtv-rc.c
··· 172 172 173 173 void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) 174 174 { 175 - u16 *keycode = fdtv->remote_ctrl_dev->keycode; 175 + struct input_dev *idev = fdtv->remote_ctrl_dev; 176 + u16 *keycode = idev->keycode; 176 177 177 178 if (code >= 0x0300 && code <= 0x031f) 178 179 code = keycode[code - 0x0300]; ··· 189 188 return; 190 189 } 191 190 192 - input_report_key(fdtv->remote_ctrl_dev, code, 1); 193 - input_report_key(fdtv->remote_ctrl_dev, code, 0); 191 + input_report_key(idev, code, 1); 192 + input_sync(idev); 193 + input_report_key(idev, code, 0); 194 + input_sync(idev); 194 195 }