[mythtv-users] Re: Homebrew PVR Multi-Circuit

David Huseby david at surreal.com
Wed Jun 23 21:55:45 EDT 2004

-] This is true.  What you're talking about is having two logical
-] "endpoints", one for each device.  There are plenty of USB contollers
-] that support multiple endpoints.

Unfortunately the USB chips for sale on the Jelu site only support a
single "endpoint" but that doesn't matter.  We can hack a driver
together in no time.  We're talking about serial devices (LCD and IR
Tx/Rx) which are stupidly easy to program.  The driver would create two
device nodes in Linux, one for the IR and one for the LCD.  The protocol
to the board would only have to be as simple as:

#define LCD_DEVICE 0x01
#define IR_DEVICE 0x02

struct sLCDIRPacket
	unsigned char bSelector;
	unsigned short bPacketSize;
	unsigned char* pData;

Then when a userland program like LIRC writes to the IR device node you
would fill in the bSelector value with IR_DEVICE, fill in the data size,
and grab the data pointer.  Then just write all of that out to the board
over USB.  On the other side, the firmware just decodes it and blasts
the data out the IR.  Same goes for receiving, the board would just send
a packet from the IR_DEVICE which would cause an interrupt in Linux
which our driver picks up and stores the data and throws the unix IO
signal to the process that has the device node open.  When they come
back to read the data, you just copy the data over to them and away they
go.  Same thing goes for the LCD.  This is all really simple.

I noticed that the USB chips available on the Jelu site allow for the
configuration of the device ID and vendor ID via the USB connection.
There are already linux drivers and a utility from the manufacturer to
do that.  So putting together these board will be as simple as
programming the firmware and running a script to dump the USB device ID,
vendor ID, and configuration bits to the USB EEPROM.  Then package it up
and mail it.  Super simple.


More information about the mythtv-users mailing list