[PATCH] Keymap compression and budget-ci IR conversion (update)
- From: Marko Mäkelä <marko.makela (at) hut.fi>
- Date: Sat, 11 Feb 2006 00:28:55 +0200
On Tue, Feb 07, 2006 at 11:38:56PM +0000, Darren Salt wrote:
> I demand that I definitely did write...
>
> > The patch set can be downloaded here:
> > <URL:http://www.youmustbejoking.demon.co.uk/progs/linux/dvb-ir-20060206.patch.tar.gz>
>
> > Reference changeset is 3316.
>
> I've updated that patch set - part of patch 4 was missing.
I have a patch on top of your patch that fixes the auto-repeat for
the Hauppauge Nova-T PCI 90002. I couldn't test it very well, because
the cx88 driver in hg tree e0b2792a1f00 (from two days ago) crashes
my 2.6.15.2 kernel after some time. Furthermore, one of the modules
fails to load because of unresolved symbols.
--- cx88-input.c 2006-02-10 23:43:48.000000000 +0200
+++ cx88-input.c.modified 2006-02-10 23:46:19.000000000 +0200
(at) (at) -285,8 +285,20 (at) (at) int cx88_ir_init(struct cx88_core *core,
cx_write(MO_DDSCFG_IO, 0x5); /* enable */
}
+ input_dev->rep[REP_DELAY] = 1;
+ input_dev->rep[REP_PERIOD] = 1;
/* all done */
- input_register_device(ir->input);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+ ret = input_register_device(input_dev);
+ if (ret) {
+ kfree(ir);
+ input_free_device(input_dev);
+ core->ir = NULL;
+ return ret;
+ }
+#else
+ input_register_device(input_dev);
+#endif
return 0;
}
(at) (at) -395,7 +407,7 (at) (at) void cx88_ir_irq(struct cx88_core *core)
if ((ircode & 0xfffff000) != 0x3000)
break;
ir_input_keydown(ir->input, &ir->ir, ircode & 0x3f, ircode);
- ir->release = jiffies + msecs_to_jiffies(120);
+ ir->release = jiffies + msecs_to_jiffies(280);
break;
}
The above patch doesn't prolong the key-release timeout on other cx88
based cards. In cx88_ir_init(), I tried to add error handling to
input_register_device() similar to what you did to the
ir_input_init() call, but I'm not sure if it's okay to do it in that way.
One thing that should probably be added is something similar to REP_DELAY,
i.e., discard the second RC5 frame received, so that a 0.2-second keypress
will not produce a key-repeat event. Perhaps this delay (amount of frames
to discard) should be configureable from the user space.
FWIW, my updated quick&dirty patch to cx88-input.c and ir-common.c in 2.6.15.2
<http://www.iki.fi/~msmakela/software/vdr/linux-2.6.15.2-cx88_input2.patch>
discards the first repeated RC5 frame, to avoid accidental key-repeat events
being generated from short (<227 ms) button presses.
Marko
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request (at) redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list