[linux-dvb] PATCH: Tevion DVB-T 220RF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached is the patch for the Tevion DVB-T 220RF analog/digital card.

It is a patch against 2.6.15-git12 released 31/01/2006. I had problems with CVS not compiling 
properly.

It is based off the MSI board (as this is the same board with extra dvb components) and the 
Philips Tiger code.

I haven't looked at the remote / IR yet.

Analog and digital work at the same time.
-------------- next part --------------
diff -BurN linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134-cards.c linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134-cards.c
--- linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134-cards.c	2006-02-04 16:36:50.000000000 +1100
+++ linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134-cards.c	2006-02-04 18:26:02.000000000 +1100
@@ -2619,6 +2619,33 @@
 			.gpio = 0x000000,	/* GPIO21=Low for FM radio antenna */
 		},
 	},
+	[SAA7134_BOARD_TEVION_DVBT_220RF] = {
+		.name           = "Tevion DVB-T 220RF",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.mpeg           = SAA7134_MPEG_DVB,
+		.inputs = {{
+			.name   = name_tv,
+			.vmux   = 1,
+			.amux   = TV,
+			.tv     = 1,
+		},{
+			.name   = name_comp1,
+			.vmux   = 3,
+			.amux   = LINE1,
+		},{
+			.name   = name_svideo,
+			.vmux   = 0,
+			.amux   = LINE1,
+		}},
+		.radio = {
+			.name   = name_radio,
+			.amux   = LINE1,
+		},
+	},
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3084,6 +3111,12 @@
 		.subdevice    = 0x0319,
 		.driver_data  = SAA7134_BOARD_FLYDVB_TRIO,
 	},{
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor    = 0x17de,
+		.subdevice    = 0x7201,
+		.driver_data  = SAA7134_BOARD_TEVION_DVBT_220RF,
+	},{
 		/* --- boards without eeprom + subsystem ID --- */
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3348,6 +3381,7 @@
 		}
 		break;
 	case SAA7134_BOARD_PHILIPS_TIGER:
+	case SAA7134_BOARD_TEVION_DVBT_220RF:
 	case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
 		/* this is a hybrid board, initialize to analog mode */
 		{
diff -BurN linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134-dvb.c linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134-dvb.c
--- linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134-dvb.c	2006-02-04 16:36:50.000000000 +1100
+++ linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134-dvb.c	2006-02-04 18:36:48.000000000 +1100
@@ -813,6 +813,42 @@
 	.request_firmware = NULL,
 };
 
+static int tevion_dvb220rf_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
+{
+	int ret;
+	ret = philips_tda827xa_pll_set(0x60, fe, params);
+	return ret;
+}
+
+static int tevion_dvb220rf_pll_init(struct dvb_frontend *fe)
+{
+	struct saa7134_dev *dev = fe->dvb->priv;
+	static u8 data[] = { 0x3c, 0x33, 0x6a};
+	struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+
+	if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1)
+		return -EIO;
+	return 0;
+}
+
+static void tevion_dvb220rf_pll_sleep(struct dvb_frontend *fe)
+{
+	philips_tda827xa_pll_sleep( 0x61, fe);
+}
+
+static struct tda1004x_config tevion_dvbt220rf_config = {
+	.demod_address = 0x08,
+	.invert        = 1,
+	.invert_oclk   = 0,
+	.xtal_freq     = TDA10046_XTAL_16M,
+	.agc_config    = TDA10046_AGC_TDA827X,
+	.if_freq       = TDA10046_FREQ_045,
+	.pll_init      = tevion_dvb220rf_pll_init,
+	.pll_set       = tevion_dvb220rf_pll_set,
+	.pll_sleep     = tevion_dvb220rf_pll_sleep,
+	.request_firmware = NULL,
+};
+
 #endif
 
 /* ------------------------------------------------------------------ */
@@ -885,6 +921,10 @@
 		dev->dvb.frontend = tda10046_attach(&philips_tiger_config,
 						    &dev->i2c_adap);
 		break;
+	case SAA7134_BOARD_TEVION_DVBT_220RF:
+		dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config,
+						    &dev->i2c_adap);
+		break;
 #endif
 #ifdef HAVE_NXT200X
 	case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
diff -BurN linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134.h linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134.h
--- linux-2.6.15-git-12-orig/drivers/media/video/saa7134/saa7134.h	2006-02-04 16:36:50.000000000 +1100
+++ linux-2.6.15-git-12/drivers/media/video/saa7134/saa7134.h	2006-02-04 18:23:02.000000000 +1100
@@ -210,6 +210,7 @@
 #define SAA7134_BOARD_MSI_TVATANYWHERE_PLUS  82
 #define SAA7134_BOARD_CINERGY250PCI 83
 #define SAA7134_BOARD_FLYDVB_TRIO 84
+#define SAA7134_BOARD_TEVION_DVBT_220RF 85
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux