On Fri, 2008-07-11 at 17:57 -0400, Josh Becigneul wrote:
> Greets,
>
> I am wondering if anyone has had any luck getting the IR Blaster on the
> HVR-1600 (cx18) to work with Lirc. I have been able to get the IR Reciever
> to run, but the lirc driver claims:
>
> otherbox ~ # irsend SEND_ONCE blaster 1_731_KEY_POWER
> irsend: command failed: SEND_ONCE blaster 1_731_KEY_POWER
> irsend: hardware does not support sending
>
> I am not a great programmer, so I am not sure where to start, but I'm
> willing to help get it to run.
Josh,
I've actually started working on this, but I have to get my second
system up and running (almost done) to finish up testing changes to the
driver and my changes to the lirc_pvr150 driver (unofficial lirc
module).
First you should read this blog post and learn about the PVR-150 blaster
support in LIRC (the HVR-1600 is/will be extremely similar):
http://www.blushingpenguin.com/mark/blog/?p=24
(The real problem with any decent support is that the interface to the
IR firmware running on the Zilog microcontroller and the library of
control codes is Zilog proprietary. Mark essentially developed a
lirc_pvr150 module that uses a replay of what the Windows driver sent
for IR blaster codes.)
I have made some changes to the cx18 driver in one of my development
repositories to support HVR-1600 IR blaster reset that the lirc_pvr150
module needs:
http://linuxtv.org/hg/~awalls/cx18-i2c/
The specific change set is
http://linuxtv.org/hg/~awalls/cx18-i2c/rev/188c658f8588
I'm not sure what shape it's in relative to the most recent v4l-dvb
changes. (Like I said, I was working on it.)
Anyway, I also have a patch to lirc based on the lirc-0.8.3 form CVS and
the patch at Mark's Braindump blog. The patch is cleaned up to work
with lirc-0.8.3 and a modified cx18 driver. I can't attach it because
it's 4 MB. But the attached small patch is the crux of the change
required to support the HVR-1600.
Again, no testing has been done. It's on my todo list....
Regards,
Andy
> Josh Becigneul
--- lirc/drivers/lirc_pvr150/lirc_pvr150.c.orig 2008-06-22 20:04:23.000000000 -0400
+++ lirc/drivers/lirc_pvr150/lirc_pvr150.c 2008-06-22 20:25:49.000000000 -0400
@@ -67,6 +67,7 @@
/* We need to be able to reset the crappy IR chip by talking to the ivtv driver */
struct ivtv;
void ivtv_reset_ir_gpio(struct ivtv *itv);
+void cx18_reset_ir_gpio(void *data);
struct IR
{
@@ -197,7 +198,12 @@ static int add_to_buf(struct IR *ir)
printk(KERN_ERR "lirc_pvr150: polling the IR receiver "
"chip failed, trying reset\n");
- ivtv_reset_ir_gpio(i2c_get_adapdata(ir->c_rx.adapter));
+ if (strncmp(ir->c_rx.name, "cx18", 4))
+ ivtv_reset_ir_gpio(
+ i2c_get_adapdata(ir->c_rx.adapter));
+ else
+ cx18_reset_ir_gpio(
+ i2c_get_adapdata(ir->c_rx.adapter));
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((100 * HZ + 999) / 1000);
ir->need_boot = 1;
@@ -983,7 +989,12 @@ static ssize_t write(struct file *filep,
up(&ir->lock);
return ret;
}
- ivtv_reset_ir_gpio(i2c_get_adapdata(ir->c_tx.adapter));
+ if (strncmp(ir->c_tx.name, "cx18", 4))
+ ivtv_reset_ir_gpio(
+ i2c_get_adapdata(ir->c_tx.adapter));
+ else
+ cx18_reset_ir_gpio(
+ i2c_get_adapdata(ir->c_tx.adapter));
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((100 * HZ + 999) / 1000);
ir->need_boot = 1;
@@ -1434,6 +1445,7 @@ int init_module(void)
{
init_MUTEX(&tx_data_lock);
request_module("ivtv");
+ request_module("cx18");
request_module("firmware_class");
i2c_add_driver(&driver);
return 0;
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users