Re: 2.6.36/2.6.37: broken compatibility with userspace input-utils ?

From: Dmitry Torokhov
Date: Wed Jan 26 2011 - 12:59:31 EST


On Wed, Jan 26, 2011 at 03:41:01PM -0200, Mauro Carvalho Chehab wrote:
> Em 26-01-2011 12:58, Mark Lord escreveu:
> > On 11-01-26 06:26 AM, Mauro Carvalho Chehab wrote:
> > ..
> >> However, as said previously in this thread, input-kbd won't work with any
> >> RC table that uses NEC extended (and there are several devices on the
> >> current Kernels with those tables), since it only reads up to 16 bits.
> >>
> >> ir-keytable works with all RC tables, if you use a kernel equal or upper to
> >> 2.6.36, due to the usage of the new ioctl's.
> >
> > Is there a way to control the key repeat rate for a device
> > controlled by ir-kbd-i2c ?
> >
> > It appears to be limited to a max of between 4 and 5 repeats/sec somewhere,
> > and I'd like to fix that.
>
> It depends on what device do you have. Several I2C chips have the repeat
> logic inside the I2C microcontroller PROM firmware. or at the remote
> controller itself. So, there's nothing we can do to change it.
>
> I have even one device here (I think it is a saa7134-based Kworld device)
> that doesn't send any repeat event at all for most keys (I think it only
> sends repeat events for volume - Can't remember the specific details anymore -
> too many devices!).
>
> The devices that produce repeat events can be adjusted via the normal
> input layer tools like kbdrate.
>

Unfortunately kbdrate affects all connected devices and I am not sure if
there is a utility allowing to set rate on individual devices. But here
is the main part:

static int input_set_rate(int fd,
unsigned int delay, unsigned int period)
{
unsigned int rep[2] = { delay, period };

if (ioctl(fd, EVIOCSREP, rep) < 0) {
perror("evdev ioctl");
return -1;
}
return 0;
}

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/