All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@linuxtv.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [DVB patch 39/48] support for Technotrend PCI DVB-T
Date: Tue, 22 Mar 2005 02:24:12 +0100	[thread overview]
Message-ID: <20050322013459.689970000@abc> (raw)
In-Reply-To: 20050322013427.919515000@abc

[-- Attachment #1: dvb-ttpci-tt-dvb-t.patch --]
[-- Type: text/plain, Size: 4456 bytes --]

patch by Anssi Hannula: add support for Technotrend PCI DVB-T
(0x13c2,0x0008, Grundig 29504-401 (LSI L64781 Based) frontend)

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>

 Kconfig  |    1 +
 av7110.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 av7110.h |    1 +
 3 files changed, 48 insertions(+), 1 deletion(-)

Index: linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/Kconfig
===================================================================
--- linux-2.6.12-rc1-mm1.orig/drivers/media/dvb/ttpci/Kconfig	2005-03-21 23:27:56.000000000 +0100
+++ linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/Kconfig	2005-03-22 00:27:46.000000000 +0100
@@ -10,6 +10,7 @@ config DVB_AV7110
 	select DVB_TDA8083
 	select DVB_SP8870
 	select DVB_STV0297
+	select DVB_L64781
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced 
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
Index: linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/av7110.c
===================================================================
--- linux-2.6.12-rc1-mm1.orig/drivers/media/dvb/ttpci/av7110.c	2005-03-22 00:18:08.000000000 +0100
+++ linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/av7110.c	2005-03-22 00:27:46.000000000 +0100
@@ -1853,6 +1853,45 @@ static struct stv0297_config nexusca_stv
 };
 
 
+
+static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
+{
+	struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
+	u32 div;
+	u8 cfg, cpump, band_select;
+	u8 data[4];
+	struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) };
+
+	div = (36125000 + params->frequency) / 166666;
+
+	cfg = 0x88;
+
+	if (params->frequency < 175000000) cpump = 2;
+	else if (params->frequency < 390000000) cpump = 1;
+	else if (params->frequency < 470000000) cpump = 2;
+	else if (params->frequency < 750000000) cpump = 1;
+	else cpump = 3;
+
+	if (params->frequency < 175000000) band_select = 0x0e;
+	else if (params->frequency < 470000000) band_select = 0x05;
+	else band_select = 0x03;
+
+	data[0] = (div >> 8) & 0x7f;
+	data[1] = div & 0xff;
+	data[2] = ((div >> 10) & 0x60) | cfg;
+	data[3] = (cpump << 6) | band_select;
+
+	if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO;
+	return 0;
+}
+
+static struct l64781_config grundig_29504_401_config = {
+	.demod_address = 0x55,
+	.pll_set = grundig_29504_401_pll_set,
+};
+
+
+
 static void av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status)
 {
 	int synced = (status & FE_HAS_LOCK) ? 1 : 0;
@@ -2060,6 +2099,11 @@ static int frontend_init(struct av7110 *
 			}
 			break;
 
+		case 0x0008: // Hauppauge/TT DVB-T
+
+			av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap);
+			break;
+
 		case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
 
 			av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap, 0x7b);
@@ -2629,6 +2673,7 @@ MAKE_AV7110_INFO(ttc_1_X,    "Technotren
 MAKE_AV7110_INFO(ttc_2_X,    "Technotrend/Hauppauge WinTV DVB-C rev2.X");
 MAKE_AV7110_INFO(tts_2_X,    "Technotrend/Hauppauge WinTV Nexus-S rev2.X");
 MAKE_AV7110_INFO(tts_1_3se,  "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE");
+MAKE_AV7110_INFO(ttt,        "Technotrend/Hauppauge DVB-T");
 MAKE_AV7110_INFO(fsc,        "Fujitsu Siemens DVB-C");
 MAKE_AV7110_INFO(fss,        "Fujitsu Siemens DVB-S rev1.6");
 
@@ -2641,10 +2686,10 @@ static struct pci_device_id pci_tbl[] = 
 	MAKE_EXTENSION_PCI(fsc,       0x110a, 0x0000),
 	MAKE_EXTENSION_PCI(ttc_1_X,   0x13c2, 0x000a),
 	MAKE_EXTENSION_PCI(fss,       0x13c2, 0x0006),
+	MAKE_EXTENSION_PCI(ttt,       0x13c2, 0x0008),
 
 /*	MAKE_EXTENSION_PCI(???, 0x13c2, 0x0004), UNDEFINED CARD */ // Galaxis DVB PC-Sat-Carte
 /*	MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1
-/*	MAKE_EXTENSION_PCI(???, 0x13c2, 0x0008), UNDEFINED CARD */ // TT/Hauppauge WinTV DVB-T v????
 /*	MAKE_EXTENSION_PCI(???, 0x13c2, 0x0009), UNDEFINED CARD */ // TT/Hauppauge WinTV Nexus-CA v????
 
 	{
Index: linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/av7110.h
===================================================================
--- linux-2.6.12-rc1-mm1.orig/drivers/media/dvb/ttpci/av7110.h	2005-03-22 00:18:08.000000000 +0100
+++ linux-2.6.12-rc1-mm1/drivers/media/dvb/ttpci/av7110.h	2005-03-22 00:27:46.000000000 +0100
@@ -31,6 +31,7 @@
 #include "tda8083.h"
 #include "sp8870.h"
 #include "stv0297.h"
+#include "l64781.h"
 
 #include <media/saa7146_vv.h>
 

--


  parent reply	other threads:[~2005-03-22  1:58 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-22  1:23 [DVB patch 00/48] DVB updates for 2.6.12-rc1-mm1 Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 01/48] clarify firmware upload messages Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 02/48] dibcom: frontend fixes Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 03/48] dibusb: misc. fixes Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 04/48] skystar2: remove duplicate pci_release_region() Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 05/48] mt352: Pinnacle 300i comments Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 06/48] support Activy Budget card Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 07/48] skystar2: update email address Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 08/48] ves1x93: invert_pwm fix Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 09/48] dibusb readme update Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 10/48] dibusb: support Hauppauge WinTV NOVA-T USB2 Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 11/48] nxt2002: QAM64/256 support Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 12/48] get_dvb_firmware: new unshield version Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 13/48] dib3000: corrected device naming Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 14/48] dibusb: debug changes Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 15/48] dibusb: increased the number of urbs for usb1.1 devices Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 16/48] ttusb_dec: use alternative interface to save bandwidth Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 17/48] l64781: email address fix Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 18/48] skystar2: fix MAC address reading Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 19/48] support KWorld/ADSTech Instant DVB-T USB2.0 Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 20/48] cleanups, make stuff static Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 21/48] refactor sw pid filter to drop redundant code Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 22/48] nxt2002: fix max frequency Johannes Stezenbach
2005-03-22  2:43   ` Gene Heskett
2005-03-22  1:23 ` [DVB patch 23/48] ttusb-budget: s/usb_unlink_urb/usb_kill_urb/ Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 24/48] av7110: fix Oops when av7110_ir_init() failed Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 25/48] saa7146: static initialization Johannes Stezenbach
2005-03-22  1:23 ` [DVB patch 26/48] av7110: error handling during attach Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 27/48] corrected links to firmware files Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 28/48] support pcHDTV HD2000 Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 29/48] dibusb: support nova-t usb ir Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 30/48] OREN or51211, or51132_qam and or51132_vsb firmware download info Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 31/48] ttusb_dec: IR support Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 32/48] dibusb: pll fix Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 33/48] tda10021: fix continuity errors Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 34/48] saa7146: remove duplicate setgpio Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 35/48] fix CAMs on Typhoon DVB-S Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 36/48] frontends: kfree() cleanup Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 37/48] clear up confusion between ids and adapters Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 38/48] dibusb: remove useless ifdef Johannes Stezenbach
2005-03-22  1:24 ` Johannes Stezenbach [this message]
2005-03-22  1:24 ` [DVB patch 40/48] dibusb: HanfTek UMT-010 fixes Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 41/48] vfree() checking cleanups Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 42/48] convert from pci_module_init to pci_register_driver Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 43/48] dibusb: support dtt200u (Yakumo/Typhoon/Hama) USB2.0 device Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 44/48] sparse warnings on one-bit bitfields Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 45/48] support Nova-S rev 2.2 Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 46/48] ttusb_dec: cleanup Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 47/48] gcc 2.95 compile fixes Johannes Stezenbach
2005-03-22  1:24 ` [DVB patch 48/48] mt352: cleanups Johannes Stezenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050322013459.689970000@abc \
    --to=js@linuxtv.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.