[PATCH] IR doesn`t work (lirc_igorplugusb)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-lts-backport-maverick (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lirc
Hi, I have IgorPlug-USB(AVR) receiver, it works on Windows fine with 4-5 transmitters I have tested.
I have installed generic Jaunty (Intrepid, some other custom kernels.. with no luck too).
I have Installed lirc package and chose from the list Igor Cesko USB receiver.
On boot I see that appropriate kernel module loaded without errors:
$ dmesg | grep lirc
[ 21.824130] lirc_dev: IR Remote Control driver registered, major 61
[ 21.868206] lirc_igorplugusb: USB remote driver for LIRC v0.1
[ 21.868218] lirc_igorplugusb: Jan M. Hochstein <email address hidden>
[ 21.944392] lirc_dev: lirc_register_
[ 21.993818] lirc_igorplugus
[ 21.997883] usbcore: registered new interface driver lirc_igorplugusb
So I run irw utility to test the system and press buttons on transmitter, irw gives no output instead of received characters.
$ irw
In dmesg output I see buffer overrun error on each keypress:
$ dmesg | grep lirc
[ 21.824130] lirc_dev: IR Remote Control driver registered, major 61
[ 21.868206] lirc_igorplugusb: USB remote driver for LIRC v0.1
[ 21.868218] lirc_igorplugusb: Jan M. Hochstein <email address hidden>
[ 21.944392] lirc_dev: lirc_register_
[ 21.993818] lirc_igorplugus
[ 21.997883] usbcore: registered new interface driver lirc_igorplugusb
[ 165.356078] lirc_igorplugus
[ 165.700094] lirc_igorplugus
The same story with all transmitters I tested. All of them work in Windows. I think the problem is in lirc_igorplugusb kernel module, almost the same code in all distributions.
I have now skills in IR technology so.. reported this bug to you. Any help will be appreciated.
Thanks, Denis
Changed in lirc (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in lirc (Ubuntu): | |
status: | Triaged → Fix Released |
Hi,
I yesterday debugged this driver. While I cannot fix the actual buffer overrun, I can do the best possible to recover from it. The Igor USB device internally provides a circular buffer of a limited length. In case the buffer overrun happens, the driver would only report back to lirc_dev the data that was not yet overwritten - but not the data that overwrote older data. Fixing this (and adding some sanity checks to make sure not to cause illegal reads) causes as much of the received data to be sent to lirc as had been received in the ring buffer. This is enough to make my Onkyo remote work (though mode2 and my old serial lirc keycodes proved helpful configuring the remote), as the relevant bits are at the end of the sequence.