From 8cbf5ebe8498769d2808daf7d3a604c2a3697b2c Mon Sep 17 00:00:00 2001 From: Andrew de Quincy Date: Thu, 6 Jan 2005 09:08:02 +0000 Subject: Patch from Peter Hettkamp, Adam Szalkowski to add support for pinnacle pctv-sat --- linux/drivers/media/dvb/bt8xx/Kconfig | 1 + linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 80 ++++++++++++++++++++++++++++++- linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h | 1 + 3 files changed, 81 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/dvb/bt8xx/Kconfig b/linux/drivers/media/dvb/bt8xx/Kconfig index 135b4c79d..2598695dc 100644 --- a/linux/drivers/media/dvb/bt8xx/Kconfig +++ b/linux/drivers/media/dvb/bt8xx/Kconfig @@ -4,6 +4,7 @@ config DVB_BT8XX select DVB_MT352 select DVB_SP887X select DVB_NXT6000 + select DVB_CX24110 help Support for PCI cards based on the Bt8xx PCI bridge. Examples are the Nebula cards, the Pinnacle PCTV cards and Twinhan DST cards. diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index cedd03521..89bd546b0 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -181,6 +181,70 @@ static struct mt352_config thomson_dtt7579_config = { .pll_set = thomson_dtt7579_pll_set, }; +static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +{ + u32 freq = params->frequency; + + int i, a, n, pump; + u32 band, pll; + + + u32 osci[]={950000,1019000,1075000,1178000,1296000,1432000, + 1576000,1718000,1856000,2036000,2150000}; + u32 bandsel[]={0,0x00020000,0x00040000,0x00100800,0x00101000, + 0x00102000,0x00104000,0x00108000,0x00110000, + 0x00120000,0x00140000}; + +#define XTAL 1011100 /* Hz, really 1.0111 MHz and a /10 prescaler */ + printk("cx24108 debug: entering SetTunerFreq, freq=%d\n",freq); + + /* This is really the bit driving the tuner chip cx24108 */ + + if(freq<950000) freq=950000; /* kHz */ + if(freq>2150000) freq=2150000; /* satellite IF is 950..2150MHz */ + + /* decide which VCO to use for the input frequency */ + for(i=1;(ife = cx24110_attach(&pctvsat_config, card->i2c_adapter); + if (card->fe != NULL) { + break; + } + break; } if (card->fe == NULL) { @@ -510,7 +581,14 @@ static int dvb_bt8xx_probe(struct device *dev) switch(sub->core->type) { -/* case BTTV_PINNACLESAT: UNDEFINED HARDWARE */ + case BTTV_PINNACLESAT: + card->gpio_mode = 0x0400c060; + /* should be: BT878_A_GAIN=0,BT878_A_PWRDN,BT878_DA_DPM,BT878_DA_SBR, + BT878_DA_IOM=1,BT878_DA_APP to enable serial highspeed mode. */ + card->op_sync_orin = 0; + card->irq_err_ignore = 0; + break; + #ifdef BTTV_DVICO_DVBT_LITE case BTTV_DVICO_DVBT_LITE: #endif diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h index c09161836..e3dbbcdf1 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h @@ -30,6 +30,7 @@ #include "sp887x.h" #include "dst.h" #include "nxt6000.h" +#include "cx24110.h" struct dvb_bt8xx_card { struct semaphore lock; -- cgit v1.2.3