[ATrpms-users] lirc not working with kernel 2.6.22 and Leadtek Winfast 2000XP

Jeffrey J. Kosowsky atrpms at kosowsky.org
Tue Nov 6 16:52:21 CET 2007


Paulo Cavalcanti wrote at about 13:15:32 -0200 on Tuesday, November 6, 2007:
 > On 11/6/07, Jeffrey J. Kosowsky <atrpms at kosowsky.org> wrote:
 > >
 > > Axel Thimm wrote at about 16:44:46 +0200 on Tuesday, November 6, 2007:
 > > > On Tue, Nov 06, 2007 at 09:37:55AM -0500, Jeffrey J. Kosowsky wrote:
 > > > > Before kernel 2.6.22, I was successfully using lirc 0.8.2 and the
 > > > > lirc_gpio kernel module to run lirc using my Leadtek Winfast 2000XP
 > > > > Deluxe ir controller and remote.
 > > > >
 > > > > Apparently, some change in kernel 2.6.22 broke the lirc_gpio kernel
 > > > > module. Specifically, when I try to load it, I get the error message:
 > > > >
 > > > > FATAL: Error inserting lirc_gpio
 > > > > (/lib/modules/2.6.22.9-61.fc6/updates/drivers/lirc/lirc_gpio.ko):
 > > > > Operation not permitted
 > > > >
 > > > > So, then I tried to use the newer method using the /proc/bus/input
 > > > > drivers.
 > > > >
 > > > > Specifically, I now start lircd using:
 > > > >     lircd -H dev/input -d name="bttv IR (card=34)"
 > > > >
 > > > > So far, everything seems to work in that I get the following syslog
 > > > > messages:
 > > > >      lircd-0.8.3-CVS[17684]: lircd(userspace) ready
 > > > > (note: I upgraded to lirc-0.8.3 too)
 > > > >
 > > > > However, none of the clients I run seem to work now. For example, when
 > > > > I run 'irw', I get no response.
 > > > >
 > > > > Note that according to the syslog, things seem to be working fine
 > > > > since I get the following messages when starting a lirc client
 > > > >      lircd-0.8.3-CVS[17684]: accepted new client on/dev/lircd
 > > > >      lircd-0.8.3-CVS[17684]: initializing'name=bttv IR (card=34)'
 > > > >
 > > > > and when closing the client:
 > > > >      lircd-0.8.3-CVS[17684]: removed client
 > > > >      lircd-0.8.3-CVS[17684]: closing '/dev/input/event3'
 > > > >
 > > > >
 > > > > I also tried running irrecord as follows:
 > > > >   irrecord -H dev/input -d name="bttv IR (card=34)" myfile
 > > > >
 > > > > However, I get the following error message:
 > > > >    irrecord: gap not found, can't continue
 > > > >    irrecord: closing '/dev/input/event3'
 > > > >
 > > > > - Any ideas on what is going wrong and how to fix it?
 > > >
 > > > Yes, you actually gave a good description of the issue: lirc_gpio is
 > > > broken on >= 2.6.22.
 > >
 > > Any idea on why I can't get the /dev/input method to work? i.e., is it
 > > really a hardware limitation specific to my ir controller/remote or is
 > > there a (potential) software or configuration fix?
 > 
 > 
 > 
 > I have been using this method for a couple of years without any problem.
 > But I cannot say if it will work for your remote.
 > 
 > I use two configuration files (you have to change for your pci capture card
 > identification):
 > 
 >  [lua:~/RPMS6/atrpms] more /etc/udev/rules.d/lirc.rules
 > KERNEL=="event*",
 > SYSFS{modalias}=="pci:v00008086d0000244Esv00000000sd00000000bc06sc04i00",
 > SYMLINK+="input/lirc"
 > [lua:~/RPMS6/atrpms] more /etc/sysconfig/lircd

Do I need to do this?
I think the udev device is already set up properly since I have
/dev/lircd and the /dev/input/eventX setup properly. In fact, running
lircd seems to give the right syslog messages.

 > # Options to lircd
 > LIRCD_OPTIONS="-H dev/input -d /dev/input/lirc"
 > 
Instead of using a rule to set up a  symlink, I use the name of the
card to identify it: 
        lircd -H dev/input -d name="bttv IR (card=34)"

 > It is also necessary to recreate your remote codes.
 > 

I thought that this is what 'irrecord' is for but it gives me the
error message
    irrecord: gap not found, can't continue
    irrecord: closing '/dev/input/event3'

Doing some more googling, I found the following suggested patch:
--- bttv-input.c.orig     2006-10-15 18:57:11.000000000 +0300
+++ bttv-input.c          2006-10-15 18:28:08.000000000 +0300
@@ -65,6 +65,8 @@
       (ir->mask_keyup    &&  (0 == (gpio & ir->mask_keyup)))) {
       ir_input_keydown(ir->dev,&ir->ir,data,data);
   } else {
+
+           if (btv->c.type == BTTV_BOARD_WINFAST2000) ir_input_keydown(ir->dev,&ir->ir,data,data);
            ir_input_nokey(ir->dev,&ir->ir);
          }
 
@@ -313,7 +315,7 @@
 
        case BTTV_BOARD_WINFAST2000:
             ir_codes         = ir_codes_winfast;
-            ir->mask_keycode = 0x1f8;
+            ir->mask_keycode =
             0x0f8;
                break;
                case BTTV_BOARD_MAGICTVIEW061:
                case BTTV_BOARD_MAGICTVIEW063:


Is it possible to apply this patch without recompiling the whole
kernel?
i.e. is this a patch to a module that can be recompiled separately
from the kernel.
If so, what do I need to do to recompile the module and make it work?

Thanks



More information about the atrpms-users mailing list