[linux-dvb] Patch for Pinnacle PCTVSAT, Kernel 2.6.19-rc3
Uwe Bugla
uwe.bugla at gmx.de
Fri Oct 27 17:34:13 CEST 2006
Hello!
The following patch for Kernel 2.6.19-rc3 contains three functions:
1. synchronizes bt8xx.txt to the current graphical Kernel compilation menu
2. make module dvb-pll.c deselectable as it is not necessary for Pinnacle PCTVSAT
3. get rid of static backend dependencies for dst.c and dst-ca.c (TwinHan Cards)
Effect of 2. and 3.: You save Memory!
I think that the current concept of one common backend for bt8xx cards is completely
obsolete. There should be a couple of card specific backends that can be selected and deseleted
as needed. The big effect would be saving RAM!
Cheers
Uwe
--- 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,29 +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);
- if (!state) {
- printk("dvb_bt8xx: No memory\n");
- break;
- }
- /* 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);
@@ -852,23 +797,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;
--- a/Documentation/dvb/bt8xx.txt
+++ b/Documentation/dvb/bt8xx.txt
@@ -9,9 +9,15 @@
Please see Documentation/dvb/cards.txt => o Cards based on the Conexant Bt8xx PCI bridge:
Compiling kernel please enable:
-a.)"Device drivers" => "Multimedia devices" => "Video For Linux" => "BT848 Video For Linux"
+a.)"Device drivers" => "Multimedia devices" => "Video For Linux" => "Enable Video for Linux API 1 (DEPRECATED)"
-b.)"Device drivers" => "Multimedia devices" => "Digital Video Broadcasting Devices"
- => "DVB for Linux" "DVB Core Support" "Bt8xx based PCI Cards"
+b.)"Device drivers" => "Multimedia devices" => "Video For Linux" => "Video Capture Adapters" => "BT848 Video For Linux"
+c.)"Device drivers" => "Multimedia devices" => "Digital Video Broadcasting Devices"
+ => "DVB for Linux" "DVB Core Support" "Bt8xx based PCI Cards"
+
+Note: If you know the frontend driver that your specific card needs furthermore please enable:
+d.)"Device drivers" => "Multimedia devices" => "Digital Video Broadcasting Devices"
+ => "DVB for Linux" "DVB Core Support" "Customize DVB Frontends" => "Customize the frontend modules to build"
+ Then you can save memory by deselecting every frontend module your specific card does not need.
2) Loading Modules
==================
--
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
More information about the linux-dvb
mailing list