killer patch for Pinnacle PCTVSAT, kernel 2.6.19-rc1

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

 



Hi everybody,
the following material is nothing for Mercurial tree, and also nothing for the mainline kernel. It was written for:
a. test reasons
b. help to save memory.

It wipes out support for TwinHan cards and for FusionHDTV cards.
If you owe a Pinnsat card as the only one in your machine you can safely apply this most horrible hack I ever produced.
It will conserve a lot of kilobytes RAM by getting rid of the following modules the Pinnsat definitely does not need:
a. backend modules: dst and dst_ca
b. frontend modules: dvb_pll.c library

Apply it, test it and send feedback if you may wish.
As I stated already it is fantastic to deselect frontends in the current kernel. But one frontend is missing, and parts of the backend could also be split and deselected. About unnecessary code in the utmost fattened dvb_core.c modules I would not even dare to speculate.

And here this horrible work is, ladies and gentlemen:
Enjoy it!

--- a/drivers/media/dvb/bt8xx/Makefile
+++ b/drivers/media/dvb/bt8xx/Makefile
@@ -1,3 +1,3 @@
-obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
+obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video/bt8xx -Idrivers/media/dvb/frontends
--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -1,7 +1,7 @@
 config DVB_BT8XX
 	tristate "BT8xx based PCI cards"
 	depends on DVB_CORE && PCI && I2C && VIDEO_BT848
-	select DVB_PLL
+	select DVB_PLL if !DVB_FE_CUSTOMISE
 	select DVB_MT352 if !DVB_FE_CUSTOMISE
 	select DVB_SP887X if !DVB_FE_CUSTOMISE
 	select DVB_NXT6000 if !DVB_FE_CUSTOMISE
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -264,8 +264,11 @@
 	depends on DVB_CORE
 
 config DVB_PLL
-	tristate
+	tristate "PLL support for DVB tuners"
 	depends on DVB_CORE && I2C
+	default m if !DVB_FE_CUSTOMISE
+	help
+	  You can safely deselect this if you're only running a Pinnacle PCTV Sat DVB-S card.
 
 config DVB_TDA826X
 	tristate "Philips TDA826X silicon tuner"
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -403,9 +403,6 @@
 	.demod_init = advbt771_samsung_tdtc9251dh0_demod_init,
 };
 
-static struct dst_config dst_config = {
-	.demod_address = 0x55,
-};
 
 static int or51211_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name)
 {
@@ -568,34 +565,9 @@
 	.demod_init = digitv_alps_tded4_demod_init,
 };
 
-static int tdvs_tua6034_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
-{
-	struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv;
-	return lg_h06xf_pll_set(fe, card->i2c_adapter, params);
-}
-
-static struct lgdt330x_config tdvs_tua6034_config = {
-	.demod_address    = 0x0e,
-	.demod_chip       = LGDT3303,
-	.serial_mpeg      = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
-};
-
-static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
-{
-	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
-
-	/* Pulse the reset line */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
-	msleep(100);
-
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	msleep(100);
-}
 
 static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
 {
-	struct dst_state* state = NULL;
 
 	switch(type) {
 	case BTTV_BOARD_DVICO_DVBT_LITE:
@@ -612,14 +584,6 @@
 		}
 		break;
 
-	case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
-		lgdt330x_reset(card);
-		card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config, card->i2c_adapter);
-		if (card->fe != NULL) {
-			card->fe->ops.tuner_ops.set_params = tdvs_tua6034_tuner_set_params;
-			dprintk ("dvb_bt8xx: lgdt330x detected\n");
-		}
-		break;
 
 	case BTTV_BOARD_NEBULA_DIGITV:
 		/*
@@ -662,25 +626,6 @@
 		}
 		break;
 
-	case BTTV_BOARD_TWINHAN_DST:
-		/*	DST is not a frontend driver !!!		*/
-		state = (struct dst_state *) kmalloc(sizeof (struct dst_state), GFP_KERNEL);
-		/*	Setup the Card					*/
-		state->config = &dst_config;
-		state->i2c = card->i2c_adapter;
-		state->bt = card->bt;
-		state->dst_ca = NULL;
-		/*	DST is not a frontend, attaching the ASIC	*/
-		if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
-			printk("%s: Could not find a Twinhan DST.\n", __FUNCTION__);
-			break;
-		}
-		/*	Attach other DST peripherals if any		*/
-		/*	Conditional Access device			*/
-		card->fe = &state->frontend;
-		if (state->dst_hw_cap & DST_TYPE_HAS_CA)
-			dvb_attach(dst_ca_attach, state, &card->dvb_adapter);
-		break;
 
 	case BTTV_BOARD_PINNACLESAT:
 		card->fe = dvb_attach(cx24110_attach, &pctvsat_config, card->i2c_adapter);
@@ -848,23 +793,6 @@
 		/* A_PWRDN DA_SBR  DA_APP[0] PKTP=10 RISC_ENABLE FIFO_ENABLE*/
 		break;
 
-	case BTTV_BOARD_TWINHAN_DST:
-		card->gpio_mode = 0x2204f2c;
-		card->op_sync_orin = BT878_RISC_SYNC_MASK;
-		card->irq_err_ignore = BT878_APABORT | BT878_ARIPERR |
-				       BT878_APPERR | BT878_AFBUS;
-		/* 25,21,14,11,10,9,8,3,2 then
-		 * 0x33 = 5,4,1,0
-		 * A_SEL=SML, DA_MLB, DA_SBR,
-		 * DA_SDR=f, fifo trigger = 32 DWORDS
-		 * IOM = 0 == audio A/D
-		 * DPM = 0 == digital audio mode
-		 * == async data parallel port
-		 * then 0x33 (13 is set by start_capture)
-		 * DA_APP = async data parallel port,
-		 * ACAP_EN = 1,
-		 * RISC+FIFO ENABLE */
-		break;
 
 	case BTTV_BOARD_PC_HDTV:
 		card->gpio_mode = 0x0100EC7B;



-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

  Powered by Linux