Which infrared chip is on the HD-5500, more importantly which chip should I tell LIRC to configure it's self for?

Posted: Tue Jun 20, 2006 7:11 pm

pcHDTV_tech

Joined: 16 Dec 2004

Posts: 295

I don't know anything about LIRC or configuring it for the HD5500, but pcHDTV says it's on their list of things to get working. Didn't get a proposed date...

Rusty

Infrared

Posted: Sat Jul 08, 2006 5:18 pm

nybbler

Joined: 06 Jul 2006

Posts: 125

It's a pretty standard infrared demodulator attached to GPIO:16 on the CX23883. Apparently the -39 version on the 5500 can sample this pin; nothing about it in my old datasheet which I think is for the -17.

Anyway, if you look at the cx88-input driver in the sources, you can see two places where there's a

case CX88_BOARD_HAUPPAUGE_HVR1100:

If you insert directly below this (in both places)

case CX88_BOARD_PCHDTV_HD5500:

then a make and a make install and then do a

sudo modprobe cx88xx ir_debug=1
sudo modprobe cx8800

you should be able to see (in the dmesg log) it decoding RC5 (phillips style) remote control messages. Assuming you point such a control at it of course. I haven't gotten the info out to userspace yet but I assume it's not all that hard. If you want to decode Panasonic-style (pulse-distance) or Sony style (pulse-width) you'll have to do more work.

Posted: Sun Jul 09, 2006 7:22 am

nybbler

Joined: 06 Jul 2006

Posts: 125

OK, doing as I described above makes it send keys using the dev/input driver. The mapping of IR codes to keys is handled inside the driver (yuk), and is probably set up for the remote which comes with the Hauppage cards.

There are some big disadvantages to doing it this way, namely
1) The codes are inside the kernel and hard to change for different remotes
2) The "address" portion of the code is not respected, so if you have another RC5 device, you'll get spurious codes (double yuk).

This could be fixed either by setting up ioctls to change the mapping in the kernel and define an allowable device address, or changing the driver to be an LIRC plug-in instead of a dev/input client, or even making another class of event for IR codes. But at this point we're probably outside the scope of the forum.

Also unfortunate is the lack of an internal connector for IR, though it's probably possible to glue-and-white-wire one. The IR-in pin on the connector is the middle one on the left column looking at the back of the board. The one on the right column one pin down is probably IR power.

remote

Posted: Tue Jul 11, 2006 12:19 pm

azcowboy13

Joined: 11 Jul 2006

Posts: 2

I'm new to all of this so sorry if this is a dumb question, but does the HD5500 come with a remote?

Posted: Tue Jul 11, 2006 1:59 pm

nybbler

Joined: 06 Jul 2006

Posts: 125

It does not come with a remote, but it does come with an IR receiver which, while currently unsupported, appears that it can be fairly easily (for a programmer) made to work with common JP5 (Phillips/Magnavox and others) remotes.

If you're like me you have a pile of remotes laying around anyway. I've been using an old universal remote.

Posted: Wed Jul 12, 2006 6:22 am

azcowboy13

Joined: 11 Jul 2006

Posts: 2

thanks nybbler

Posted: Sat Aug 26, 2006 9:16 pm

cayblood

Joined: 26 Aug 2006

Posts: 8

nybbler wrote:

OK, doing as I described above makes it send keys using the dev/input driver. The mapping of IR codes to keys is handled inside the driver (yuk), and is probably set up for the remote which comes with the Hauppage cards.

There are some big disadvantages to doing it this way, namely
1) The codes are inside the kernel and hard to change for different remotes
2) The "address" portion of the code is not respected, so if you have another RC5 device, you'll get spurious codes (double yuk).

This could be fixed either by setting up ioctls to change the mapping in the kernel and define an allowable device address, or changing the driver to be an LIRC plug-in instead of a dev/input client, or even making another class of event for IR codes. But at this point we're probably outside the scope of the forum.

Also unfortunate is the lack of an internal connector for IR, though it's probably possible to glue-and-white-wire one. The IR-in pin on the connector is the middle one on the left column looking at the back of the board. The one on the right column one pin down is probably IR power.

Nybbler, I'd be very interested in hearing if you've done any further research or work into getting the IR receiver to work. I doubt I will have the time to gain the kernel expertise necessary help much, but it sounds like it might not be too hard for someone with linux driver experience. Is there any more information you can give us? Feel free to email me at carl_at_youngbloods_org.

Thanks,
Carl

Posted: Tue Aug 29, 2006 2:05 pm

nybbler

Joined: 06 Jul 2006

Posts: 125

I now have a very useful patch. It will allow you to use any RC5 or NEC protocol remote with the 5500 card, provided you install LIRC with the lirc_dev driver.

It's a bit of a hack as I didn't remove all of the /dev/input stuff, and it makes a mainline kernel driver (cx88) depend on an out-of-tree module (lirc_dev), but it does the job. Despite this, I think it's a better interface than the /dev/input driver as it lets userspace handle the codes, doing only the demodulation in kernel space.

THESE INSTRUCTIONS ARE FOR THE DRIVER nybbler DISCUSSED ON JUL 8, *NOT* THE PATCH FROM AUG 29.

I'm using the gray Hauppauge remote, so the kernel definitions are fine for me for now. I got lirc to work w/ the remote by adding the two lines to cx88-input as you suggested (thanks so much!) and then loading the module and then:

irrecord -H dev/input -d /dev/input/event1 /tmp/irrecord

Follow the instructions. On KnoppMyth, when prompted for the buttons you can use the names from /home/mythtv/.mythtv/lircrc so the names match.

To start lircd now, run:

lircd --driver dev/input --device /dev/input/event1

You can see which device you need (instead of /dev/input/event1) by

cat /proc/bus/input/devices

On KnoppMyth, you can get lircd to start that way by editing /etc/lirc/hardware.conf and putting in the lines:

Code:

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="dev/input"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/input/event1"

Finally, I needed to prevent the remote from sending keypresses to X so I edited /etc/X11/XF86Config-4 and added the line

Code:

Option "isa0060/serio0/input0"

to the section

Code:

Section "InputDevice"
Identifier "Keyboard0"

You will probably have to look in /proc/bus/input/devices to see exactly what device name you should use instead of isa0060/serio0/input0. The downside to this is that when you plug in an additional keyboard it won't work on X, just the one keyboard will.

If anyone knows how to exclude the HD5500 remote from the list of keyboards X recognizes but have X see the rest, let me know.

Posted: Mon Sep 11, 2006 5:43 pm

volfy

Joined: 07 Sep 2006

Posts: 2

Ug.

I got the instructions for preventing X from seeing the remote totally wrong. Create a section like this in your XF86Config-4 file, that replaces the other keyboard section:

This is a patch to LIRC which allows you to put a "repeat_code" parameter in the lircd.conf. This is useful for some NEC-format remotes; for those, put "repeat_code 0" in there, and holding down the button will work properly.

Posted: Fri Jan 26, 2007 5:36 pm

Hobbiticus

Joined: 09 Jan 2007

Posts: 4

Has any more work been done on this? I'm having some trouble setting mine up.

I added the case statements to the driver source, and the IR port is listed in my /proc/bus/input/devices as being on /dev/input/event5. However, if I use irrecord or just cat /dev/input/event5, I get nothing. I don't know what style remotes I have either. I've tried the comcast remote, my samsung tv's remote, the xbox remote, my garmin's remote, and even pointing my pda's IR port at the sensor, and I still get nothing.

Am I missing something or is there something else I can try?

EDIT: Well I completely forgot about another old remote laying around that seems to work with the IR port, but it's a crappy remote for a crappy tv and it has about 20 buttons total (10 are digits, 4 are navigation), which wouldn't be enough to control mythtv with. Is there a way to get this to recognize pulse-width or pulse-distance signals?

LIRC driver for this card

Posted: Wed Mar 07, 2007 5:00 pm

dave

Joined: 07 Mar 2007

Posts: 9

nybbler,

Thanks for your work. I think many people will be interested in getting the IR receiver working.

Do you have any suggestions on which driver to use (ie i2c or gpio) for this card? I'm not sure what I'm doing wrong but I don't ever get a /dev/lirc . I have the lircd and lircm.

I am using ubuntu 6.10. Any additional help will be greatly appreciated.

Dave

Nybbler's cx88-input patch

Posted: Mon Apr 30, 2007 11:08 am

dmattox

Joined: 30 Apr 2007

Posts: 1

Nybbler,

I have downloaded and install your pc5500-remote-patch. Thanks. How do I tell the kernel build process that cx88xx.ko module depends on a module outside of the default kernel? When I try to build the kernel and modules, I get the following error message.

WARNING lirc_register_plugin not found
WARNING lirc_unregister_plugin not found

I know these two functions are in the lirc_dev.ko module. How do I tell the build process.