diff options
author | Johannes Stezenbach <devnull@localhost> | 2003-05-13 12:55:21 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2003-05-13 12:55:21 +0000 |
commit | 061758a4f8633f46f492e5d03bce979055fc86de (patch) | |
tree | 16956659580aed0da3041f61d751a85e9ae733a3 /linux/drivers/media | |
parent | 2bb15bfae8e796c26f62000c27490c90a25161eb (diff) | |
download | mediapointer-dvb-s2-061758a4f8633f46f492e5d03bce979055fc86de.tar.gz mediapointer-dvb-s2-061758a4f8633f46f492e5d03bce979055fc86de.tar.bz2 |
patch from Jaakko Hyvatti http://hyvatti.iki.fi/~jaakko/dvb/dvb6.diff:
- Makes zigzag to not change frequency for DVB-c at all. It only resets
the parameters over and over again. - The IF of 35937500 might be better to be 36000000. This might be what the
card designer meant. My card shows the AFC fine tuning offset to be closest
to zero with 35937500 (one step below 36MHz). Some other cards might be
different. I have not heard of any complaints about my patch not working
for someone in this respect.
- Has anyone ever tested this auto inversion thing? DVB-c is far too slow to
tune and lock for this auto inversion code to work. Therefore you need to
manually set it. Maybe zigzag changes above allow the auto inversion to work. - QAM registers have been tweaked to non-specification values. I do not know
if someone has counterexamples, but this works for a lot of people.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_frontend.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c index 5009fc164..1eff505f2 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -389,6 +389,8 @@ void dvb_frontend_recover (struct dvb_frontend_data *fe) if (fe->info->type == FE_QPSK) stepsize = fe->parameters.u.qpsk.symbol_rate / 16000; + else if (fe->info->type == FE_QAM) + stepsize = 0; else stepsize = fe->info->frequency_stepsize * 2; @@ -996,4 +998,3 @@ MODULE_PARM(dvb_frontend_debug,"i"); MODULE_PARM(dvb_shutdown_timeout,"i"); MODULE_PARM_DESC(dvb_frontend_debug, "enable verbose debug messages"); MODULE_PARM_DESC(dvb_shutdown_timeout, "wait <shutdown_timeout> seconds after close() before suspending hardware"); - diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index 12dcfd8eb..f68ec68bb 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -179,7 +179,8 @@ int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq) if (tuner_type == 0xff) /* PLL not reachable over i2c ... */ return 0; - div = (freq + 36125000 + 31250) / 62500; + /* div = (freq + 36125000 + 31250) / 62500; */ + div = (freq + 35937500 + 31250) / 62500; /* works better for finland and sweden */ buf[0] = (div >> 8) & 0x7f; buf[1] = div & 0xff; buf[2] = byte3[tuner_type]; @@ -198,9 +199,15 @@ int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq) static -int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0) +int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0, + fe_spectral_inversion_t inversion) { reg0 |= GET_REG0(fe->data) & 0x62; + + if (INVERSION_ON == inversion) + reg0 &= ~0x20; + else if (INVERSION_OFF == inversion) + reg0 |= 0x20; ves1820_writereg (fe, 0x00, reg0 & 0xfe); ves1820_writereg (fe, 0x00, reg0 | 0x01); @@ -208,7 +215,7 @@ int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0) /** * check lock and toggle inversion bit if required... */ - if (!(ves1820_readreg (fe, 0x11) & 0x08)) { + if (INVERSION_AUTO == inversion && !(ves1820_readreg (fe, 0x11) & 0x08)) { dvb_delay(10); if (!(ves1820_readreg (fe, 0x11) & 0x08)) { reg0 ^= 0x20; @@ -302,7 +309,7 @@ int ves1820_set_parameters (struct dvb_frontend *fe, struct dvb_frontend_parameters *p) { static const u8 reg0x00 [] = { 0x00, 0x04, 0x08, 0x0c, 0x10 }; - static const u8 reg0x01 [] = { 140, 140, 106, 120, 92 }; + static const u8 reg0x01 [] = { 140, 140, 106, 100, 92 }; static const u8 reg0x05 [] = { 135, 100, 70, 54, 38 }; static const u8 reg0x08 [] = { 162, 116, 67, 52, 35 }; static const u8 reg0x09 [] = { 145, 150, 106, 126, 107 }; @@ -320,7 +327,7 @@ int ves1820_set_parameters (struct dvb_frontend *fe, ves1820_writereg (fe, 0x08, reg0x08[real_qam]); ves1820_writereg (fe, 0x09, reg0x09[real_qam]); - ves1820_setup_reg0 (fe, reg0x00[real_qam]); + ves1820_setup_reg0 (fe, reg0x00[real_qam], p->inversion); return 0; } @@ -539,4 +546,3 @@ module_exit(exit_ves1820); MODULE_DESCRIPTION("VES1820 DVB-C frontend driver"); MODULE_AUTHOR("Ralph Metzler, Holger Waechtler"); MODULE_LICENSE("GPL"); - |