diff options
author | Andrew de Quincy <devnull@localhost> | 2004-12-16 23:51:28 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-12-16 23:51:28 +0000 |
commit | 6aeca2870e2a28736c99884f1848354966a5dda1 (patch) | |
tree | 7f82f6b8fcadcb488ead62ffe599be13878f52cd /linux/drivers/media | |
parent | 164429b647d9fa0e7ab13830d5f2efe041ef8a2b (diff) | |
download | mediapointer-dvb-s2-6aeca2870e2a28736c99884f1848354966a5dda1.tar.gz mediapointer-dvb-s2-6aeca2870e2a28736c99884f1848354966a5dda1.tar.bz2 |
Fixes for av7110+stv0297 support
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0297.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0297.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_v4l.c | 2 |
4 files changed, 14 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0297.c b/linux/drivers/media/dvb/frontends/stv0297.c index 2114c91a8..647a63e6c 100644 --- a/linux/drivers/media/dvb/frontends/stv0297.c +++ b/linux/drivers/media/dvb/frontends/stv0297.c @@ -482,6 +482,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par int carrieroffset; unsigned long starttime; unsigned long timeout; + fe_spectral_inversion_t inversion; switch (p->u.qam.modulation) { case QAM_16: @@ -506,8 +507,11 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par } // determine inversion dependant parameters + inversion = p->inversion; + if (fe->config->invert) + inversion = (inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON; carrieroffset = -330; - switch (p->inversion) { + switch (inversion) { case INVERSION_OFF: break; @@ -586,7 +590,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par stv0297_set_symbolrate(state, p->u.qam.symbol_rate / 1000); stv0297_set_sweeprate(state, sweeprate, p->u.qam.symbol_rate / 1000); stv0297_set_carrieroffset(state, carrieroffset); - stv0297_set_inversion(state, p->inversion); + stv0297_set_inversion(state, inversion); /* kick off lock */ stv0297_writereg_mask(state, 0x88, 0x08, 0x08); @@ -681,6 +685,8 @@ static int stv0297_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par p->frequency = state->base_freq + state->freq_off; p->inversion = (reg_83 & 0x08) ? INVERSION_ON : INVERSION_OFF; + if (fe->config->invert) + p->inversion = (p->inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON; p->u.qam.symbol_rate = 0; p->u.qam.fec_inner = 0; diff --git a/linux/drivers/media/dvb/frontends/stv0297.h b/linux/drivers/media/dvb/frontends/stv0297.h index 355aa8720..3be535989 100644 --- a/linux/drivers/media/dvb/frontends/stv0297.h +++ b/linux/drivers/media/dvb/frontends/stv0297.h @@ -29,6 +29,9 @@ struct stv0297_config /* the demodulator's i2c address */ u8 demod_address; + /* does the "inversion" need inverted? */ + u8 invert:1; + /* PLL maintenance */ int (*pll_init)(struct dvb_frontend* fe); int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 15e803e74..524d18a8a 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -1702,6 +1702,7 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ static struct stv0297_config nexusca_stv0297_config = { .demod_address = 0x1C, + .invert = 1, .pll_set = nexusca_stv0297_pll_set, }; @@ -1906,7 +1907,7 @@ static void frontend_init(struct av7110 *av7110) av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap, 0x7b); if (av7110->fe) { /* set TDA9819 into DVB mode */ - saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD) + saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) /* tuner on this needs a slower i2c bus speed */ diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index 997cd82a6..e14f32d5e 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -248,7 +248,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) dprintk(1, "setting band in demodulator failed.\n"); } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD) + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) } } |