This project has moved to https://github.com/mike-bourgeous/myhd




New TL880Spy release:
TL880Spy 1.3
Aug. 11, 2007 16:25:00 MDT
New release:
MyHD 0.2.3
Mar. 28, 2007 02:20:00 MDT
New release:
MyHD 0.2.2
Jan. 23, 2007 00:35:00 MST
New tool release:
TL880Spy 1.2
Jan. 19, 2007 19:30:00 MST




Hosted by:
SourceForge.net Logo
MyHD Linux Driver

How to Help TL880 Driver Development

Right now there are a few things people can do to help development. The first is writing e-mail to the company that makes your card to let them know about this driver, and encourage them to help driver development in any way they can. The second is by running tests on your TL880-based card to allow us to get a survey of the various hardware out there and see what needs to be done to the driver to get the broadest support in the shortest time. The third is running the TL880Spy tool in Windows that allows "playing" with the card's registers. The TL880Spy tool is based on the BtSpy tool from the BtWincap open source bttv driver for Windows. The tool is used to view and modify registers, for the purpose of determining the function of the registers.

The two tests currently available for running are the I2C bus test and the OSD, cursor, sync test. Neither test would have the ability to damage your hardware; in the worst case, you might need to unplug the video passthrough of the HDTV card and plug your monitor directly into your video card. In the command lines given below, # indicates commands to be run as root, and $ indicates commands to be run as either root or a normal user. The $/# symbols should not be typed. These tests can be run from an installed Linux distribution with the TL880 driver compiled.

I2C Bus Test

The I2C bus is the interface used by the TL880 chip to communicate to the other chips on an HDTV tuner card. Each TL880 card seems to use a different I2C communication method. There are several such methods implemented in the driver, at least one of which should show at least one I2C device on any TL880 card. Different cards will show a different number of buses. You will need the kernel source for your kernel to compile the kernel module. You will need the lm_sensors package for the i2c* tools. Your kernel must have been compiled with support for I2C devices in /dev and the I2C bit-shift algorithm (also called "I2C bit-banging interfaces"). Your results will not be identical to those below. They are given as examples only.
$ lynx http://myhd.sourceforge.net/download.php Download the current driver
$ tar -jxvf myhd-version.tar.bz2 Extract the driver tarball
$ cd myhd-version Change to the driver source directory
$ make Compile the kernel module (requires kernel source) and tools
# dmesg -c Clear the kernel message log
# insmod driver/tl880.ko Load the kernel module into the running kernel
# driver/tl880_mkdev Create /dev/tl880/* entries for each card in the system
Note: the i2c bus numbers and i2c device addresses below (i.e. the parameteris given to the i2cdetect and i2cdump tools) will be different if there are other I2C devices present, such as an lm_sensors chip or a TV tuner card, or if your card has a different supporting chipset. The correct bus numbers are output to the kernel message log when the driver is loaded. The correct addresses are output by the i2cdetect tool.
# dmesg Display the kernel messages from the driver
tl880: device found, irq 5
tl880: initializing card number 0
tl880: mem: 0xdc000000(0xe5d4e000), reg: 0xe2000000(0xe9d4f000), unk: 0xe2100000(0xe9e50000)
tl880: Found MIT Inc. MyHD MDP110B
tl880: set vip 0
tl880: set vip 1
i2c-dev.o: Registered 'tl880 0-1' as minor 0
i2c-core.o: adapter tl880 0-1 registered as adapter 0.
i2c-dev.o: Registered 'tl880 0-2' as minor 1
i2c-core.o: adapter tl880 0-2 registered as adapter 1.
i2c-dev.o: Registered 'tl880 0-3' as minor 2
i2c-core.o: adapter tl880 0-3 registered as adapter 2.
Note: if a test doesn't finish quickly (i.e. in less than 30 seconds), press Ctrl-C and move onto the next test.
# time i2cdetect 0 Run the first I2C test
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-0
  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: XX XX XX XX XX XX XX XX XX XX 0a XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

real    0m5.692s
user    0m0.002s
sys     0m0.673s
Note the i2c bus addresses of any active devices in the test above. In this case, the only active device is at address 0x0a.
# time i2cdetect 1 Run the second I2C test
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-1
  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f


real    0m43.394s
user    0m0.000s
sys     0m38.392s
Note the i2c bus addresses of any active devices in the test above. In this case, the I2C bus was locked (the test failed to complete quickly), and there were no active devices found.
# time i2cdetect 2 Run the third I2C test
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-2
  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

real    0m5.679s
user    0m0.001s
sys     0m0.678s
Note the i2c bus addresses of any active devices in the test above. In this case, there were no active devices found.
Now that the I2C buses have been scanned, dump the state of the active devices found using the i2cdump tool.
# i2cdump 0 0x0a Dump the state of device 0x0a on I2C bus 0.
No size specified (using byte-data access)
  WARNING! This program can confuse your I2C bus, cause data loss and worse!
  I will probe file /dev/i2c-0, address 0xa, mode byte
  You have five seconds to reconsider and press CTRL-C!

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 13 00 1b 58 80 00 c0 00 00 00 00 00 00 00 00    .?.?X?.?........
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
20: 00 00 4a 54 60 aa 00 00 00 00 00 06 02 ff ff ff    ..JT`?.....??...
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: 2c 1f 00 00 1f 00 00 04 06 04 00 1e 00 00 00 00    ,?..?..???.?....
50: 00 ff ff ff 00 00 00 18 00 00 00 00 00 00 01 ff    .......?......?.
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: 02 22 04 99 00 00 00 00 00 00 00 00 00 00 00 00    ?"??............
90: 00 aa 55 0f f0 f0 f0 f0 f0 f0 f0 03 f1 ff ff 00    .?U??????????...
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00    ..?.............
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

real    0m6.143s
user    0m0.000s
sys     0m1.138s
# rmmod tl880 Unload the driver from the kernel
# dmesg Display the kernel messages from the driver
tl880: device found, irq 5
tl880: initializing card number 0
tl880: mem: 0xdc000000(0xe5d4e000), reg: 0xe2000000(0xe9d4f000), unk: 0xe2100000(0xe9e50000)
tl880: Found MIT Inc. MyHD MDP110B
tl880: set vip 0
tl880: set vip 1
i2c-dev.o: Registered 'tl880 0-1' as minor 0
i2c-core.o: adapter tl880 0-1 registered as adapter 0.
i2c-dev.o: Registered 'tl880 0-2' as minor 1
i2c-core.o: adapter tl880 0-2 registered as adapter 1.
i2c-dev.o: Registered 'tl880 0-3' as minor 2
i2c-core.o: adapter tl880 0-3 registered as adapter 2.
tl880: deinitializing card number 0
i2c-core.o: adapter unregistered: tl880 0-1
i2c-core.o: adapter unregistered: tl880 0-2
i2c-core.o: adapter unregistered: tl880 0-3
tl880: module cleanup complete
Now that you've run all the tests, e-mail the results to the mailing list (myhd-develop at lists.sourceforge.net). An example e-mail would look like this:
$ mail myhd-develop at lists.sourceforge.net Replace " at " with "@" to send the message
Subject: Driver I2C test results (example)
*** i2cdetect results ***
time i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX XX XX 0a XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

real 0m5.692s
user 0m0.002s
sys 0m0.673s


time i2cdetect 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f


real 0m43.394s
user 0m0.000s
sys 0m38.392s


time i2cdetect 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

real 0m5.679s
user 0m0.001s
sys 0m0.678s


*** i2cdump results ***
time i2cdump 0 0xa
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0xa, mode byte
You have five seconds to reconsider and press CTRL-C!

0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 13 00 1b 58 80 00 c0 00 00 00 00 00 00 00 00 .?.?X?.?........
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 4a 54 60 aa 00 00 00 00 00 01 fc ff ff ff ..JT`?.....??...
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: 2c 1f 00 00 1f 00 00 04 06 04 00 1e 00 00 00 00 ,?..?..???.?....
50: 00 ff ff ff 00 00 00 18 00 00 00 00 00 00 01 ff .......?......?.
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: 02 22 04 99 00 00 00 00 00 00 00 00 00 00 00 00 ?"??............
90: 00 aa 55 0f f0 f0 f0 f0 f0 f0 f0 07 fa fa fa 00 .?U????????????.
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 ..?.............
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

real 0m6.143s
user 0m0.000s
sys 0m1.138s


*** kernel messages ***
tl880: device found, irq 5
tl880: initializing card number 0
tl880: mem: 0xdc000000(0xe5d4e000), reg: 0xe2000000(0xe9d4f000), unk:
0xe2100000(0xe9e50000)
tl880: Found MIT Inc. MyHD MDP110B
tl880: set vip 0
tl880: set vip 1
i2c-dev.o: Registered 'tl880 0-1' as minor 0
i2c-core.o: adapter tl880 0-1 registered as adapter 0.
i2c-dev.o: Registered 'tl880 0-2' as minor 1
i2c-core.o: adapter tl880 0-2 registered as adapter 1.
i2c-dev.o: Registered 'tl880 0-3' as minor 2
i2c-core.o: adapter tl880 0-3 registered as adapter 2.
tl880: deinitializing card number 0
i2c-core.o: adapter unregistered: tl880 0-1
i2c-core.o: adapter unregistered: tl880 0-2
i2c-core.o: adapter unregistered: tl880 0-3
tl880: module cleanup complete

.


OSD, Cursor, and Video Sync Test

The TL880 chip has an integrated simple vertical color bars generator that can be activated by the TL880 Linux driver and tools. I recommend using an external monitor for this test, but using a single monitor with the video passthrough feature of the HDTV card will be sufficient. The chip also has a powerful OSD mechanism and support for mouse cursor overlays. This test will display color bars, a test OSD image, and a mouse cursor. It may also be helpful to include your dmesg output with the results of this test.
$ lynx http://myhd.sourceforge.net/download.php Download the current driver
$ tar -jxvf myhd-version.tar.bz2 Extract the driver tarball
$ cd myhd-version Change to the driver source directory
$ make Compile the kernel module (requires kernel source) and tools
# dmesg -c Clear the kernel message log
# insmod driver/tl880.ko Load the kernel module into the running kernel
# driver/tl880_mkdev Create /dev/tl880/* entries for each card in the system
If the display goes blank or distorted, disconnect your monitor from the video output of the HDTV card and connect it directly to your video card. In this highly unlikely case, shutting down and restarting your computer will reset the hardware, and you can then reconnect your monitor to the HDTV card's video output, and the video input of the card to your video card.
$ tools/osd.sh; tools/dpc/videoout 0 Run the display tests
# rmmod tl880 Unload the driver from the kernel
Now send an e-mail to the mailing list (myhd-develop at lists.sourceforge.net) saying whether you saw vertical color bars at 1024x768 60.0Hz. Here are two example messages, one indicating success, the other failure.
$ mail myhd-develop at lists.sourceforge.net Replace " at " with "@" to send the message
Subject: Driver display test results (example)
The display showed color bars at 60.0Hz vertical (48.3kHz horizontal)
refresh rate for eight seconds, then showed an animated mouse cursor.
Finally, original video output was restored.

.
- or -
Subject: Driver display test results (example)
The display went blank and did not switch back to original video output after
any amount of time. I had to connect my monitor directly to my video card to
get video output back.

.

©2006 MyHD Linux Driver Project