[pvrusb2] I got 24xxx IR working(!)
Mike Isely
isely at isely.net
Sat Oct 7 17:38:34 CDT 2006
29xxx devices have a dedicated chip for IR reception. This device is
accessible via I2C so the pvrusb2 driver doesn't need to do anything
special to support it. Instead the appropriate lirc I2C chip-level driver
just "sees" it and uses it. (Or ir-kbd-i2c.ko can be loaded which will do
the same thing.)
The problem with 24xxx devices is that the IR receiver chip has been
removed. In its place is (apparently) some glue logic and additional
firmware in the FX2 microcontroller. So IR access on 24xxx devices
doesn't happen over I2C any more, and the protocol to get at the IR data
is now made specific to the PVR USB2 device itself. This in theory
requires additional logic in the pvrusb2 driver to issue the appropriate
commands and whatever else is needed to support a /dev/input style of IR
reception. Doing this lirc style just isn't going to work.
Well in a fit of insanity I came up with a clever idea.
The pvrusb2 driver already has a I2C "filter" mechanism whereby it can
take special actions based on the I2C address being accessed from the
outside. This was implemented last Spring in order to get 24xxx devices
to work at all. Filters are already in place for wm8775 to simulate
auto-detection correctly and cx25840 to keep msp3400 from messing it up
because the real cx25840 module can detect and configure it.
So I added another filter. It is only inserted for 24xxx devices and
answers at the I2C address for where the IR receiver chip would otherwise
respond for 29xxx devices. The filter checks that the expected type of
access is being attempted and then "responds" by merely issuing an IR
receive command to the FX2. It takes that result and then munges it into
the form normally expected from the 29xxx's I2C IR receiver. The net
effect of this is that once again outside logic "sees" an IR receiver chip
when in fact the pvrusb2 driver is emulating it with an FX2 commmand. So
now lirc and ir-kbd-i2c.ko should both work again, unmodified, with 24xxx
hardware.
I've just tested this new filter against ir-kbd-i2c and it works
perfectly! I'm going to test it next against lirc, and if that works
there will be a new pvrusb2 driver snapshot released.
-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