Twinhan VP-1020

From LinuxTVWiki
Jump to navigation Jump to search
VP-1020
VP-1020 ASIC ... Identify your card model

A (so called) "Budget" DVB-S PCI card by TwinHan. This card is well suppported by the LinuxTV drivers.

Overview

The oldest card in the DVB-S family from TwinHan !

TwinHan VP-1020 (DST-MOT)
("DST-020") (dst)
  features: Card is capable of delivering the full unmodified TS stream to userspace. 
  interface: PCI
  PCI device id: 14f1:8804
  PCI subsystem id: 1822:0001
  Bridge: bt8xx
    card driver: dvb-bt8xx
  frontend 1: LG
    frontend driver: dst
  
Notes: 
* The actual card type is determined by interrogating the onboard EEPROM.
* The frontend on these cards is hidden behind an ASIC -- the tuner component initialization routines are held 
  in the ASIC in the form of firmware (not reloadable through software).  So there is no need to know the full 
  details of the frontend, and, consequently, the only frontend driver for this card is the dst module. 

Required modules and parameters: This card uses the bttv driver.

dvb_core dvb_shutdown_timeout=0 
bttv i2c_hw=1 card=0x71 
bt878 
dst 
dvb-bt8xx

Loading just dvb-bt8xx will normally autodetect the card and load all the above modules with the required parameters. See the following section for one potential problem area.

Kernel Hangup Problems with the TwinHan 1020 / bttv Driver

This card derives it's PCI subsystem ID from the value contained in the EEPROM. Unfortunately, for some reason (or cheapness on TwinHan's part) the EEPROM is not write protected, and, consequently, due to unknown reasons (maybe a buggy driver or something?) portions of it may become corrupted/overwritten.

So, if your kernel freezes at startup with the following last messages:

bttv0: subsystem: fefe:0001 (UNKNOWN)
bttv0: using: *** UNKNOWN/GENERIC *** [card=0,autodetected]

it most likely means that your card's EEPROM has become corrupted. The fefe:0001 value reported is an unknown ID, which causes the bttv driver to hang. The good news, however, is that with the EEPROM being writable, this also means that one can fix the problem relatively easy.

Steps for fixing a corrupted EEPROM:

Note: To fix the EEPROM, it is IMPORTANT that you load all modules for your 1020 card except dvb-bt8xx.

1. Obtain the i2c* utilities
You will need the i2c* programs from lm-sensors -- some Linux distros may have these utilities already installed, otherwise you will have to obtain and install them yourself.

2. Determine your card's i2c Bus
List all the installed i2c buses on your system by opening a command terminal and running:

modprobe i2c_dev
i2cdetect -l

From the i2cdetect output, determine which bus relates to your 1020 card -- the first column in the list will show i2c-BUS, where BUS is an integer representing a particular installed bus in your system. From here on, whenever BUS is written in these instructions, substitute it with the correct integer that represents the bus that you just determined is for your card.

3. Obtain a contents dump from your card's EEPROM

Note: This can be dangerous if the BUS used is wrong, but usually it is safe.

The next step is to run:

i2cdetect BUS

The above should list available address spaces detected on that BUS. The 1020 card normally has only one active chip at address 0x50. If your output seems right, then try to dump the EEPROM's contents with:

i2cdump BUS 0x50

From the output of the EEPROM contests dump, you will find that the (incorrect) subsystem ID will reside in the last 4 bytes -- make sure it matches the one that your system prints just before the system hang (i.e. if your system message shows the incorrect fefe:0001, that means the last 4 bytes from the EEPROM dump should be 00 01 fe fe ). If you do not see the incorrect ID there, or nothing resides at address 0x50, stop here and heed this warning!

Note: The following commands will write to the EEPROM chip. This means that:
  • you should be absolutely sure that the EEPROM dump you are looking at is from your 1020 card -- i.e make sure you are NOT looking at that from another piece of hardware, as the write operation may damage the respective hardware irreparably !!
  • even if you are looking at the EEPROM dump from your 1020 card, and even though the chances of mishap are then very small, there are still NO GUARANTEES that the write operation won't damage the 1020 card irreparably -- just as when you write a new BIOS to a motherboard, or a new firmware to a optical disc burner, or whatever, there is always an element of risk involved

Now, with that said, a 1020 card exhibiting the hanging symptoms described above, but whose EEPROM dump doesn't have the expected incorrect ID at 0x50, is still essentially a very small step away from becoming a doorstop, so you might as well go ahead anyway and perform the following steps which write to the card.

4. Write the correct ID value to your card's EEPROM
To put the correct ID of 1822:0001 at address 0x50 (i.e. the EEPROM on your 1020 card), run the following commands:

i2cset -y BUS 0x50 0xfc 0x00 b
i2cset -y BUS 0x50 0xfd 0x01 b
i2cset -y BUS 0x50 0xfe 0x18 b
i2cset -y BUS 0x50 0xff 0x22 b

The commands will complain about failing readback, but it should work anyway.

5. Check for success
Cross-check that you successfully overwrote the EEPROM with the correct ID by way of another EEPROM contents dump:

i2cdump -y BUS 0x50

If all looks correct, then once the bttv module is loaded again (e.g. at the next reboot, or via unloading the modules from memory and then reloading them), it should now detect your card correctly. The same goes for the dvb-bt8xx module.

Sound Module Conflicts

When loading the dvb_bt8xx module it will sometimes complain that it is unable to determine DMA of the card if you have certain sound modules installed.

dvb_bt8xx: unable to determine DMA core of card 0,
dvb_bt8xx: if you have the ALSA bt87x audio driver installed, try removing it.
dvb-bt8xx: probe of dvb0 failed with error -14

In one case the OSS drivers were the cause of this error. Unload the OSS sound modules. Then re-install the dvb_bt8xx module.

rmmod snd_pcm snd_timer snd snd_page_alloc soundcore
modprode dvb_bt8xx