The attached patch implements the same bit banging algorithm (AFAICT) as the hauppauge windows driver. It is against SVN 2736.
This seems to help the issue where the remote stops responding to the LIRC driver. It would be helpful if anyone who has this problem could give it a whirl and let me know if it improves things. If anyone else would like to give it a go it would be useful to know if it breaks other things.
I'm currently using the IR receiver/blaster driver that I wrote, and as part of that I hacked something in to reset the IR chip when i2c transfers fail or return unexpected values. In situations where I was able to get this to happen reasonably frequently beforehand (every 5-10 minutes) I can no longer do so.
The patch adds a module parameter to ivtv: newi2c (default 1). If 0, this will use i2c-algo-bit as before. It also exports ivtv_reset_ir_gpio. That's not necessary for the standard lirc_i2c but the IR blaster driver I wrote binds to it and I haven't bothered to remove it from the patch as yet.
As a bonus, this seems to use about 1/2 the CPU of i2c-algo-bit (observed when polling the PVR-150 IR chip with lirc). I expect that's just due to less udelaying (instead of that, typically the SCL/SDA registers are polled to see when the outputs have actually been set).
The main motivation was that the hauppauge windows (beta - 2.2.23123) driver lists 'I2C fixes (IR blaster)' in its release notes. Comparing the two drivers, there certainly are big differences in the I2C code. The older driver has something much more like i2c-algo-bit, with udelay equivalents whereas the newer one is approximately as attached.
One note: make sure that you unload cx25840 before reloading ivtv. cx25840 assumes that the underlying i2c algorithm is i2c-algo-bit, and tries to change the udelay value when loading firmware. I simply added a line that checks if algo_data is non-NULL, which is enough to distinguish i2c-algo-bit from "i2c-algo-hauppauge". If you miss that, you'll get an Oops with a NULL pointer deference in cx25840.
Mark