TerraTec Cinergy T Stick: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 14: Line 14:
=== Method A ===
=== Method A ===


* Download the driver from Terratec http://linux.terratec.de/files/terratec_af9035.zip
* Download the driver from Terratec http://linux.terratec.de/files/terratec_af9035.zip.
* Apply patch to kernel source
* Apply patch (AF9035-AF9033-TUA9001_DRIVER.patch) to kernel source, ignore the other files.
* Copy firmware (dvb-usb-af9035-01.fw) to /lib/firmware.
* Apply the following patch to tuner code
* Apply the following patch to the tuner code.
<pre>
<pre>
--- a/linux/drivers/media/common/tuners/tua9001.c 2009-07-03 04:04:40.000000000 +0200
--- a/linux/drivers/media/common/tuners/tua9001.c 2009-07-03 04:04:40.000000000 +0200

Revision as of 19:18, 18 July 2009

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

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

Based on:

  • Afatech AF9035
  • Infineon TUA9001


Install instructions for manufacturer driver

Method A

  • 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.
  • 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!

Method B

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.