]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] rc/streamzap: fix reporting response times
authorJarod Wilson <jarod@redhat.com>
Thu, 27 Jan 2011 18:08:35 +0000 (15:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 31 Jan 2011 14:22:13 +0000 (12:22 -0200)
The streamzap driver has relatively low sampling resolution, and any
delays in reporting events seem to cause some minor problems for the
likes of irw when using the lirc bridge driver, resulting in a single
keypress registering as multiple independent ones, rather than as a
single press with repeats. If we call ir_raw_event_handle() more
frequently and reset the rawir kfifo at end-of-signal, the behavior
improves quite a bit.

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

index d9b6b48893c4fb3f5c1b4bcd03dad4f239f10939..e435d94c0776d657403c391f6ca0b9877f100339 100644 (file)
@@ -273,6 +273,7 @@ static void streamzap_callback(struct urb *urb)
                                if (sz->timeout_enabled)
                                        sz_push(sz, rawir);
                                ir_raw_event_handle(sz->rdev);
+                               ir_raw_event_reset(sz->rdev);
                        } else {
                                sz_push_full_space(sz, sz->buf_in[i]);
                        }
@@ -290,6 +291,7 @@ static void streamzap_callback(struct urb *urb)
                }
        }
 
+       ir_raw_event_handle(sz->rdev);
        usb_submit_urb(urb, GFP_ATOMIC);
 
        return;