Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Announcement: work on "dvb-kernel" finished



Andreas Oberritter wrote:
> On Mon, 2003-03-24 at 01:55, Oliver Endriss wrote:
> > There is a problem with the new input driver implementation in
> > 2.5.x: The keyboard driver listens to all 'EV_KEY' events, i.e.
> > pressing '5' on the remote control will be recognized by the
> > keyboard driver...
>
> It is actually the same with 2.4 kernels. I am using 2.4.20-xfs and
> was able to type some characters in an xterm using the ir remote
> control.
>
> > Any idea how this could be solved?
>
> rmmod keybdev

There is no need to load this module with 2.4 kernels unless you use
an USB keyboard. But this solution doesn't work with 2.5 kernels because
all keyboard input goes through the input driver.

As a temporary solution I suggest the following patch:

--- ../linux-2.5.65.org/drivers/char/keyboard.c	Mon Mar 17 22:44:04 2003
+++ drivers/char/keyboard.c	Tue Mar 25 04:48:20 2003
@@ -1189,7 +1189,8 @@
 
 static struct input_device_id kbd_ids[] = {
 	{
-                .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
+                .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_BUS,
+                .id.bustype = BUS_I8042,
                 .evbit = { BIT(EV_KEY) },
         },
 	

This way the keyboard driver will only accept keystrokes from a
standard AT keyboard.

Because of a small bug in the 2.5.65 input driver you need the 
following patch, too. (I already sent this to Vojtech.)

--- ../linux-2.5.65.org/drivers/input/input.c	Mon Mar 17 22:44:07 2003
+++ drivers/input/input.c	Mon Mar 24 21:51:20 2003
@@ -261,7 +261,7 @@
 			if (id->id.product != dev->id.product)
 				continue;
 		
-		if (id->flags & INPUT_DEVICE_ID_MATCH_BUS)
+		if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION)
 			if (id->id.version != dev->id.version)
 				continue;
 

HTH,

Oliver


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index