[media] hdpvr: use same polling interval as other OS
authorJarod Wilson <jarod@redhat.com>
Fri, 4 Mar 2011 20:31:11 +0000 (17:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 22:24:19 +0000 (19:24 -0300)
The hdpvr's IR part, in short, sucks. As observed with a usb traffic
sniffer, the Windows software for it uses a polling interval of 405ms.
Its still not behaving as well as I'd like even with this change, but
this inches us closer and closer to that point...

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/hdpvr/hdpvr-i2c.c

index de69bae9bac7f2344662baa5d01663804ed6bcb7..2a1ac287591db29fa94d87fdd9fd08b44e0decaf 100644 (file)
@@ -56,6 +56,7 @@ struct i2c_client *hdpvr_register_ir_rx_i2c(struct hdpvr_device *dev)
        init_data->internal_get_key_func = IR_KBD_GET_KEY_HAUP_XVR;
        init_data->type = RC_TYPE_RC5;
        init_data->name = "HD-PVR";
+       init_data->polling_interval = 405; /* ms, duplicated from Windows */
        hdpvr_ir_rx_i2c_board_info.platform_data = init_data;
 
        return i2c_new_device(&dev->i2c_adapter, &hdpvr_ir_rx_i2c_board_info);
@@ -191,7 +192,7 @@ static struct i2c_adapter hdpvr_i2c_adapter_template = {
 
 static int hdpvr_activate_ir(struct hdpvr_device *dev)
 {
-       char buffer[8];
+       char buffer[2];
 
        mutex_lock(&dev->i2c_mutex);