TerraTec Cinergy T Stick: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
(TerraTec Cinergy T Stick Black (0ccd:00a9) is a different device, based on RTL2838UHIDIR / Realtek RTL2831U.)
Line 12: Line 12:


Currently not supported by LinuxTV. The manufacturer's [http://linux.terratec.de/ Linux page] links to vendor driver.
Currently not supported by LinuxTV. The manufacturer's [http://linux.terratec.de/ Linux page] links to vendor driver.

([[TerraTec Cinergy T Stick Black]] / 0ccd:00a9 is a different device, based on RTL2838UHIDIR / [[Realtek RTL2831U]])


Based on:
Based on:

Revision as of 18:00, 11 January 2011

TerraTec Cinergy T Stick is a USB 2.0 DVB-T device.


Vendor
Device/Model
Supported ID on
Interface
Hardware Firmware Comment / Pictures URL E
TerraTec Cinergy T Stick Yes, but see device page for details. 0ccd:00aa USB2.0 Afatech AF9035, TUA9001 Jump to the place where you can edit this entry


Currently not supported by LinuxTV. The manufacturer's Linux page links to vendor driver.

(TerraTec Cinergy T Stick Black / 0ccd:00a9 is a different device, based on RTL2838UHIDIR / Realtek RTL2831U)

Based on:

  • Afatech AF9033
  • Afatech AF9035
  • Infineon TUA9001


Install instructions for manufacturer driver

Method A

This method install the same drivers as in section B, with some small patches and a Makefile that directly creates the kernel modules, without compiling a whole kernel. The patches are (as in method B): to support the alternative USB code of the stick; to correct the frequency calculations.

  • Download kernel source and headers equal to the ones you are using (check with 'uname -a'); e.g., for a Debian or Ubuntu distribution,
apt-get install linux-source-2.6.30 linux-headers-2.6.30-1-686 kernel-package
  • and unpack the kernel source
 cd /usr/src ; tar xjf linux-source-2.6.30.tar.bz2
make
  • install (as root)
make install
  • Copy firmware (dvb-usb-af9035-01.fw) to /lib/firmware.

Note that currently, with kernel 2.6.30, the remote does not work: the module 'hiddev' recognizes the stick as a keyboard, and offers it as a input device /dev/input/event?? (use 'evtest' to test it).

Method B

  • Download the driver from Terratec http://linux.terratec.de/files/terratec_af9035.zip.
  • Apply patch (AF9035-AF9033-TUA9001_DRIVER.patch) to kernel source, ignore the other files.
  • Copy firmware (dvb-usb-af9035-01.fw) to /lib/firmware.
  • The stick come with two different identifications, either 93 or AA . Check the USB identifier of the stick using 'lsusb' ; if you see 'AA' in a line such as
ID 0ccd:00aa TerraTec Electronic GmbH 

then you should edit the file drivers/media/dvb/dvb-usb/dvb-usb-ids.h and change the line from

#define USB_PID_TERRATEC_CINERGY_T_STICK		0x0093 

to

#define USB_PID_TERRATEC_CINERGY_T_STICK		0x00AA
  • Apply the following patch to the tuner code.
--- a/linux/drivers/media/common/tuners/tua9001.c	2009-07-03 04:04:40.000000000 +0200
+++ b/linux/drivers/media/common/tuners/tua9001.c	2009-07-18 20:41:32.000000000 +0200
@@ -93,6 +93,7 @@
 	struct tua9001_priv *priv = fe->tuner_priv;
 	int ret;
 	u16 val;
+	u32 freq;
 	u8 i;
 	struct regdesc data[2];
 
@@ -117,12 +118,19 @@
 	data[0].reg = 0x04;
 	data[0].val = val;
 
+freq = params->frequency;
+
 #define OFFSET 150000000
-	val = 0.000048 * (params->frequency - OFFSET);
+freq = freq - OFFSET;
+freq  = freq/1000;
+freq  = 48 * freq;
+freq  = freq/1000;
+
+val = freq;
+
 	data[1].reg = 0x1f;
 	data[1].val = val;
 
-	priv->frequency = (val * 20833.33334) + OFFSET;
 
 	deb_info("%s: freq:%d bw:%d freq tuner:%d val:%d\n", __func__,
 		params->frequency, params->u.ofdm.bandwidth, priv->frequency,

  • Configure and compile your kernel
  • Have a beer

Tested with 2.6.30.1, in case the patches fail just work them in by hand. Don't give up!

Tested with 2.6.30.8, patch fails on file /usr/source/linux-`uname -r`/drivers/media/dvb/frontends/Makefile but it is sufficient to patch it file by hand to make it work. To patch the file add the following line just under line 74 (i.e. at the end of the file):

obj-$(CONFIG_DVB_AF9033) += af9033.o

Method C

Patch for adding device USB IDs to the manufacturer's driver.

72a73
> #define USB_PID_TERRATEC_CINERGY_T			0x0093
78a80
> 		{USB_DEVICE(USB_VID_TERRATEC,  USB_PID_TERRATEC_CINERGY_T)},
146c148
< 		.num_device_descs =1,
---
> 		.num_device_descs =2,
152a155,159
> 			{
> 				.name = "TerraTec Cinergy T-Stick",
> 				.cold_ids = {&af903x_usb_id_table[5], NULL},
> 				.warm_ids = {NULL},
> 			},

Install instructions

  • copy above patch to file (e.g. TerraTec_Cinergy_T-Stick.patch) and save it your home directory
  • download driver from TerraTec support site
wget http://linux.terratec.de/files/Linux-Driver-for-T-Stick.rar
  • extract driver package
unrar x Linux-Driver-for-T-Stick.rar
  • enter driver directory
cd Linux_PC_AF9035_Afatech_2008.12.17/
  • enter driver directory according to your Kernel architecture
    • for 32 bit
cd Linux-32bit_AF9035_20081217/
    • for 64 bit
cd Linux-64bit_AF9035_20081217/
  • extract driver package
tar zxvf AF903x_SRC.tar.gz
  • enter driver directory
cd AF903x_SRC/
  • apply patch (from home directory)
patch af903x-devices.c ~/TerraTec_Cinergy_T-Stick.patch
  • compile
make
  • install (as root)
make install

Device should work if everything goes correctly. Few distribution specific install commands you may wish use:

Fedora:

su -c "make install"

Ubuntu:

sudo make install

Driver does support Kernels from 2.6.16 to 2.6.27. If you have newer Kernel then you could try compile it against 2.6.27 headers (cp v4l/kernel-2.6.27/* ./). In that case there is big risk it doesn't work and crashes your Kernel when device is plugged.


Method D

  • patch -p0 < v4l-dvb-af9033.patch && patch -p0 < v4l-dvb-af9035.patch && patch -p0 < v4l-dvb-tua9001.patch
  • cd v4l-dvb
  • make
  • sudo make install (sudo -c make install)

now should be ready to merge to main!!!!