[pvrusb2] PVR USB2 receiving IR keyboard codes

Mike Isely isely at isely.net
Mon Apr 9 12:57:07 CDT 2007


On Mon, 9 Apr 2007, Rod Smith wrote:

> On Sunday 08 April 2007 22:00, Mike Isely wrote:
> >

   [...]

> > So to control what happens here, you need to control which of these
> > kernel modules get loaded and attached to the pvrusb2 driver.  It sounds
> > to me like Rod's issue is that ir-kbd-i2c (the V4L IR driver) is loaded
> > - try unloading it.
> 
> I'd love to but I can't:
> 
> # rmmod ir_kbd_i2c
> ERROR: Module ir_kbd_i2c is in use by saa7134
> 
> The saa7134 module is in turn required by saa7134_dvb, which is required by 
> the AVerMedia AVerTVHD A180 HDTV card I've got installed in the system. The 
> saa7134 module has quite a few options, but the only ones that seem relevant 
> to this issue (i2c_scan and disable_ir) don't seem to have any effect.
> 
> If there's some other workaround for this, I'd love to hear it.
> 

I was afraid you were going to say this :-(

Technically there's nothing the pvrusb2 driver can do to cleanly resolve 
this.  The I2C architecture in Linux is such that each I2C chip level 
driver is free to scan every I2C bus it finds and attach & use whatever 
it finds on each bus.  The pvrusb2 driver makes available an I2C bus - 
it has to in order for the other parts of the driver to work properly.  
But ir_kbd_i2c is coming along and attaching to it.  Removing the module 
is one solution but if you can't remove it then there's not much the 
pvrusb2 driver by itself can do to cleanly fix this.

With that said....

1. I understand there is an architectural change coming in the Linux 
kernel's I2C infrastructure that may help.  I don't know a lot about 
this change but it might make possible the ability to prevent a specific 
chip level driver from attaching to a specific I2C bus.  I would need to 
investigate this, but even if it is possible you'd probably have to move 
up to 2.6.21 or maybe even 2.6.22 (when it appears) in order to use it.

2. An "unclean" thing that I can do is to provide a means in the driver 
to mask the presence of the IR receiver chip on the PVR USB2 device's 
I2C bus.  There is already some filtering of this nature in the driver 
in order to deal with other I2C issues on 24xxx devices; I could in 
theory provide a module option to specifically cause all attempts at 
accessing the IR receiver's I2C address to fail.  I imagine other kernel 
developers might not like this since option (1) above is going to be a 
better solution.  However this strategy could be made to work with older 
kernels as well.

3. Then there's the low-tech option: Go get some black electrical tape.  
Cut a square that's roughly 1cm/side and stick it over the front of the 
PVR US2 device, over where the IR port is located.  Being that the tape 
is black it should be less visisble and thus shouldn't be TOO ugly.  I 
don't have the device in front of me right now and IIRC the IR port's 
location is not obvious.  However this photo might help with the 
guesswork:

http://www.isely.net/gallery2/v/PVR+Hardware/PVRUSB2+2/board.jpg.html

The IR receiver should be the black object in the lower left corner of 
the photo, just to the left of the RCA jacks.

  -Mike


-- 
                        |         Mike Isely          |     PGP fingerprint
     Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC 92
                        |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1 E8
                        |                             |


More information about the pvrusb2 mailing list