diff options
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.c | 24 | ||||
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 35 |
3 files changed, 30 insertions, 31 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c index 053c1ba65..859946703 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.c +++ b/linux/drivers/media/dvb/bt8xx/dst.c @@ -1,4 +1,4 @@ -/* +/* Frontend-driver for TwinHan DST Frontend Copyright (C) 2003 Jamie Honan @@ -45,7 +45,7 @@ struct dst_state { const struct dst_config* config; struct dvb_frontend frontend; - + /* private demodulator data */ u8 tx_tuna[10]; u8 rx_tuna[10]; @@ -135,13 +135,13 @@ static int dst_gpio_inb(struct dst_state *state, u8 * result) dprintk("%s: dst_gpio_inb error (err == %i)\n", __FUNCTION__, err); return -EREMOTEIO; } - + *result = (u8) rd_packet.rd.value; return 0; } #define DST_I2C_ENABLE 1 -#define DST_8820 2 +#define DST_8820 2 static int dst_reset8820(struct dst_state *state) { @@ -173,7 +173,7 @@ static int dst_i2c_enable(struct dst_state *state) if (retval < 0) return retval; // dprintk ("%s: i2c enable delay\n", __FUNCTION__); - msleep(33); + msleep(33); return 0; } @@ -690,10 +690,10 @@ static int dst_get_tuna(struct dst_state* state) state->decode_lock = 1; /* - dst->decode_n1 = (dst->rx_tuna[4] << 8) + + dst->decode_n1 = (dst->rx_tuna[4] << 8) + (dst->rx_tuna[5]); - dst->decode_n2 = (dst->rx_tuna[8] << 8) + + dst->decode_n2 = (dst->rx_tuna[8] << 8) + (dst->rx_tuna[7]); */ state->diseq_flags |= HAS_LOCK; @@ -755,9 +755,9 @@ static int dst_write_tuna(struct dvb_frontend* fe) * power_off 0x00, 0x09, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 * power_on 0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00 * Diseqc 1 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec - * Diseqc 2 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf4, 0xe8 - * Diseqc 3 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf8, 0xe4 - * Diseqc 4 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xfc, 0xe0 + * Diseqc 2 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf4, 0xe8 + * Diseqc 3 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf8, 0xe4 + * Diseqc 4 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xfc, 0xe0 */ static int dst_set_diseqc(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd) @@ -1036,7 +1036,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = { .frequency_tolerance = 29500, .symbol_rate_min = 1000000, .symbol_rate_max = 45000000, - /* . symbol_rate_tolerance = ???,*/ + /* . symbol_rate_tolerance = ???,*/ .caps = FE_CAN_FEC_AUTO | FE_CAN_QPSK }, @@ -1066,7 +1066,7 @@ static struct dvb_frontend_ops dst_dvbc_ops = { .frequency_max = 858000000, .symbol_rate_min = 1000000, .symbol_rate_max = 45000000, - /* . symbol_rate_tolerance = ???,*/ + /* . symbol_rate_tolerance = ???,*/ .caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO }, diff --git a/linux/drivers/media/dvb/bt8xx/dst.h b/linux/drivers/media/dvb/bt8xx/dst.h index 79fbe24ad..bcb418c5c 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.h +++ b/linux/drivers/media/dvb/bt8xx/dst.h @@ -1,4 +1,4 @@ -/* +/* Frontend-driver for TwinHan DST Frontend Copyright (C) 2003 Jamie Honan diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index ca15bdd42..73ce1f661 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -167,9 +167,9 @@ static int thomson_dtt7579_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ pllbuf[0] = 0xc0; // Note: non-linux standard PLL i2c address pllbuf[1] = div >> 8; - pllbuf[2] = div & 0xff; - pllbuf[3] = cp; - pllbuf[4] = bs; + pllbuf[2] = div & 0xff; + pllbuf[3] = cp; + pllbuf[4] = bs; return 0; } @@ -184,25 +184,25 @@ static struct mt352_config thomson_dtt7579_config = { static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { u32 freq = params->frequency; - - int i, a, n, pump; + + 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;(i<sizeof(osci)/sizeof(osci[0]))&&(osci[i]<freq);i++); printk("cx24108 debug: select vco #%d (f=%d)\n",i,freq); @@ -210,7 +210,7 @@ static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_paramete /* the gain values must be set by SetSymbolrate */ /* compute the pll divider needed, from Conexant data sheet, resolved for (n*32+a), remember f(vco) is f(receive) *2 or *4, - depending on the divider bit. It is set to /4 on the 2 lowest + depending on the divider bit. It is set to /4 on the 2 lowest bands */ n=((i<=2?2:1)*freq*10L)/(XTAL/100); a=n%32; n/=32; if(a==0) n--; @@ -348,9 +348,9 @@ static int advbt771_samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct pllbuf[0] = 0xc2; // Note: non-linux standard PLL i2c address pllbuf[1] = div >> 8; - pllbuf[2] = div & 0xff; - pllbuf[3] = cp; - pllbuf[4] = bs; + pllbuf[2] = div & 0xff; + pllbuf[3] = cp; + pllbuf[4] = bs; return 0; } @@ -465,7 +465,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) break; } break; - + case BTTV_PINNACLESAT: card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter); if (card->fe != NULL) { @@ -609,7 +609,7 @@ static int dvb_bt8xx_probe(struct device *dev) card->op_sync_orin = 0; card->irq_err_ignore = 0; break; - + #ifdef BTTV_DVICO_DVBT_LITE case BTTV_DVICO_DVBT_LITE: #endif @@ -752,4 +752,3 @@ module_exit(dvb_bt8xx_exit); MODULE_DESCRIPTION("Bt8xx based DVB adapter driver"); MODULE_AUTHOR("Florian Schirmer <jolt@tuxbox.org>"); MODULE_LICENSE("GPL"); - |