V4L/DVB (13930): dib0700: rework IR logic for firmware 1.20
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Mon, 4 Jan 2010 05:43:19 +0000 (02:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:32 +0000 (15:10 -0300)
commit6a2071006b72bf887e38c025c60f98d2998ceacb
tree4abae89a6dbaf42cb312317e521ba53a75245b76
parenteac8f5fa5f5dcaf228694fe23e19b02b98e68879
V4L/DVB (13930): dib0700: rework IR logic for firmware 1.20

When firmware 1.20 was introduced, the dib0700 switched from a polling model
using a USB control message, to the messages being delivered on a USB bulk
pipe.  The code I originally added would do a blocking read on the pipe with a
50ms timeout.  Because the dvb-usb-remote code makes use of the global
workqueue, this resulted in the global workqueue being blocked 50% of the
time.  Also, the synchronous urb_bulk_msg() call would burn excess CPU time
(reflected as an abnormal increase in the system's load average when devices
were connected).

Rework the logic so that we now setup an asynchronous callback on the bulk
pipe, so that we now only handle RC data when it arrives on the pipe.  Note
that we provide a stub function for the RC polling callback so that we can
continue to leverage the shared code in dvb-usb-rc for the setting up of the
input device.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dib0700.h
drivers/media/dvb/dvb-usb/dib0700_core.c
drivers/media/dvb/dvb-usb/dib0700_devices.c