Leadtek WinFast DTV2000DS: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
m (Frequent lockups during live TV fixed by using previous firmware.)
Line 259: Line 259:
8- Hopefully now your tuner is recognized and works happily. If not, double check the process, check for errors that might have been missed, and if it all fails, post to a forum.
8- Hopefully now your tuner is recognized and works happily. If not, double check the process, check for errors that might have been missed, and if it all fails, post to a forum.


===Frequent lockups during live TV and recording of TV shows===
Using the firmware mentioned above (5.1.0.0) on my system resulted in frequent lockups during recording or watching live TV. Mythbackend.log has entries "Poll giving up", "Device error detected" and "Stream handler died unexpectedly".
The previous firmware version is more stable. To use the previous version replace the "wget" line in step 5 with:

wget http://palosaari.fi/linux/v4l-dvb/firmware/af9015/4.95.0.0/dvb-usb-af9015.fw

Remember to do a cold boot afterwards to activate this firmware, /var/log/messages should show "af9013: firmware version:4.95.0"


===Remote Control Support===
===Remote Control Support===

Revision as of 00:11, 18 January 2011

Leadtek dtv 2000ds 2s.jpg
Leadtek dtv 2000ds 3s.jpg
Leadtek dtv 2000ds 4s.jpg

A dual tuner DVB-T PCI card from Leadtek.

Currently supported by recent V4L-DVB (as at Sep 2010) The card is not working out of the box, however there is a solution (patch to V4L really).

Your mileage may vary. There are still some issues in using this card; please read on.


Overview/Features

Formats:

  • DVB-T

Inputs:

  • RF
  • Infrared

Components Used

Contains

  • NXP TDA18211

Identification

Output of lsusb -v:

Bus 002 Device 002: ID 0413:6a04 Leadtek Research, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0413 Leadtek Research, Inc.
  idProduct          0x6a04
  bcdDevice            2.00
  iManufacturer           1 Afatech
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Making it work in Ubuntu

Updated 20 Nov 2010 by AMX.

Here is a simple HOWTO/Workaround to get this card working . This is based on debian flavours. Although there are some people that have come up with shell scrips and patches to get something similar, it is better that everyone knows how things are done, and also hopefully this will be incorporated into the new releases of V4L. Until then we all have to sweat it a bit!!

The real solution is based on the bug found in http://www.xpmediacentre.com.au/community/tuners/41937-leadtek-dtv2000ds-4.html . There is another issue that better get fixed and it is to do with I2C byte write numbers.

Please leave comments in the discussion session or put comments in http://www.xpmediacentre.com.au/community/tuners/41937-leadtek-dtv2000ds-4.html so that we keep this updated.

1- Starting from a clean install of 10.04 or 10.10, perform the initial steps to install V4L drivers

sudo apt-get install mercurial linux-headers-$(uname -r) build-essential


2- go to http://linuxtv.org/hg/v4l-dvb/rev/abd3aac6644e and click on the "bz2" link and download the file.

Note: Here I am referring to a specific tag of the repository, i.e. abd3aac6644e. If you have recent kernels such as 2.6.36, you may need to grab the latest source rather than this particular tag. The rest of the process is still the same.


3- run

bzcat v4l-dvb-abd3aac6644e.tar.bz2 | tar xv
cd v4l-dvb-abd3aac6644e

This should create a directory called v4l-dvb-abd3aac6644e

4- Do the following modifications

4.1- The small_i2c fix: This fix is from discussions here http://www.spinics.net/lists/linux-usb/msg37741.html .

Edit the file linux/drivers/media/dvb/dvb-usb/af9015.c and replace

static struct tda18271_config af9015_tda18271_config = {
	.gate = TDA18271_GATE_DIGITAL,
	.small_i2c = 1,
};

with

static struct tda18271_config af9015_tda18271_config = {
	.gate = TDA18271_GATE_DIGITAL,
	.small_i2c = TDA18271_16_BYTE_CHUNK_INIT,
};

Then edit the file linux/drivers/media/common/tuners/tda18271.h

and replace

enum tda18271_small_i2c {
        TDA18271_39_BYTE_CHUNK_INIT = 0,
	TDA18271_16_BYTE_CHUNK_INIT = 1,
	TDA18271_08_BYTE_CHUNK_INIT = 2,

};

with

enum tda18271_small_i2c {
        TDA18271_39_BYTE_CHUNK_INIT = 0,
	TDA18271_16_BYTE_CHUNK_INIT = 16,
	TDA18271_08_BYTE_CHUNK_INIT = 8,
	TDA18271_03_BYTE_CHUNK_INIT = 3,
};


4.2- The main and the nasty bug i.e. the if_sample_freq bug: This fix is from http://www.xpmediacentre.com.au/community/tuners/41937-leadtek-dtv2000ds-4.html . If you have a quick look inside the file (just out of interest), you will notice that how this bug was messing up all the tuner frequency calculations. The frequencies are given in Table 41 in the datasheet (http://www.nxp.com/documents/data_sheet/TDA18211HD.pdf)

Anyway

edit the file linux/drivers/media/dvb/frontends/af9013.c

and replace

		/* TDA18271 uses different sampling freq for every bw */
		if (state->config.tuner == AF9013_TUNER_TDA18271) {
			switch (bw) {
			case BANDWIDTH_6_MHZ:
				if_sample_freq = 3300000; /* 3.3 MHz */
				break;
			case BANDWIDTH_7_MHZ:
				if_sample_freq = 3800000; /* 3.8 MHz */
				break;
			case BANDWIDTH_8_MHZ:
			default:
				if_sample_freq = 4300000; /* 4.3 MHz */
				break;
			}
		}

with

		/* TDA18271 uses different sampling freq for every bw */
		if (state->config.tuner == AF9013_TUNER_TDA18271) {
			switch (bw) {
			case BANDWIDTH_6_MHZ:
				if_sample_freq = 3300000; /* 3.3 MHz */
				break;
			case BANDWIDTH_7_MHZ:
				if_sample_freq = 3500000; /* 3.5 MHz */
				break;
			case BANDWIDTH_8_MHZ:
			default:
				if_sample_freq = 4000000; /* 4.0 MHz */
				break;
			}
		}


5- Compile and install the drivers

make sure you are back in the v4l-dvb-abd3aac6644e directory

make config
sed -i -e "s/FIREDTV=m/FIREDTV=n/" v4l/.config
make
sudo make install
wget http://palosaari.fi/linux/v4l-dvb/firmware/af9015/5.1.0.0/dvb-usb-af9015.fw
sudo cp dvb-usb-af9015.fw /lib/firmware

6- Shutdown (you have to shutdown)

7- Startup

8- Hopefully now your tuner is recognized and works happily. If not, double check the process, check for errors that might have been missed, and if it all fails, post to a forum.

Frequent lockups during live TV and recording of TV shows

Using the firmware mentioned above (5.1.0.0) on my system resulted in frequent lockups during recording or watching live TV. Mythbackend.log has entries "Poll giving up", "Device error detected" and "Stream handler died unexpectedly". The previous firmware version is more stable. To use the previous version replace the "wget" line in step 5 with:

wget http://palosaari.fi/linux/v4l-dvb/firmware/af9015/4.95.0.0/dvb-usb-af9015.fw

Remember to do a cold boot afterwards to activate this firmware, /var/log/messages should show "af9013: firmware version:4.95.0"

Remote Control Support

I (Gregoryo) have had no success with the remote, but there is hope from dmesg:

[   22.263721] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:0e.0/0000:02:0a.2/usb2/2-1/input/input5
user@host:~$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=0413 Product=6a04 Version=0200
N: Name="IR-receiver inside an USB DVB receiver"
P: Phys=usb-0000:02:0a.2-1/ir0
S: Sysfs=/devices/pci0000:00/0000:00:0e.0/0000:02:0a.2/usb2/2-1/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=3
B: KEY=108fc310 2802891 0 0 0 0 118000 200180 4803 e1680 0 100000 ffe

So I've been using /dev/input/event5 in my tests. I have tried using evtest, mode2, and irw to no avail. I get no indication of any signal coming from the remote. Am I missing a kernel driver module?

External Links