diff options
author | Johannes Stezenbach <devnull@localhost> | 2005-02-03 14:10:54 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2005-02-03 14:10:54 +0000 |
commit | a8829c180209d016396d5fa3e9ef291263bd0f6c (patch) | |
tree | be8354dc8f88577ea23b3c82fcb53444f3f8c208 /linux | |
parent | a6f9c518a08bb23c296f60eb700717d8b80338dc (diff) | |
download | mediapointer-dvb-s2-a8829c180209d016396d5fa3e9ef291263bd0f6c.tar.gz mediapointer-dvb-s2-a8829c180209d016396d5fa3e9ef291263bd0f6c.tar.bz2 |
patch by Taylor Jacob: Add QAM64/256 Support
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/frontends/nxt2002.c | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/frontends/nxt2002.c b/linux/drivers/media/dvb/frontends/nxt2002.c index 2519edb8f..4d9eb2c35 100644 --- a/linux/drivers/media/dvb/frontends/nxt2002.c +++ b/linux/drivers/media/dvb/frontends/nxt2002.c @@ -347,8 +347,21 @@ static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe, /* reset the agc now that tuning has been completed */ nxt2002_agc_reset(state); + + /* set target power level */ - buf[0] = 0x70; + switch (p->u.vsb.modulation) { + case QAM_64: + case QAM_256: + buf[0] = 0x74; + break; + case VSB_8: + buf[0] = 0x70; + break; + default: + return -EINVAL; + break; + } i2c_writebytes(state,0x42,buf,1); /* configure sdm */ @@ -361,7 +374,20 @@ static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe, nxt2002_writereg_multibyte(state,0x58,buf,2); /* write sdmx input */ - buf[0] = 0x60; + switch (p->u.vsb.modulation) { + case QAM_64: + buf[0] = 0x68; + break; + case QAM_256: + buf[0] = 0x64; + break; + case VSB_8: + buf[0] = 0x60; + break; + default: + return -EINVAL; + break; + } buf[1] = 0x00; nxt2002_writereg_multibyte(state,0x5C,buf,2); @@ -391,7 +417,20 @@ static int nxt2002_setup_frontend_parameters (struct dvb_frontend* fe, i2c_writebytes(state,0x41,buf,1); /* write agc ucgp0 */ - buf[0] = 0x00; + switch (p->u.vsb.modulation) { + case QAM_64: + buf[0] = 0x02; + break; + case QAM_256: + buf[0] = 0x03; + break; + case VSB_8: + buf[0] = 0x00; + break; + default: + return -EINVAL; + break; + } i2c_writebytes(state,0x30,buf,1); /* write agc control reg */ @@ -562,7 +601,7 @@ static int nxt2002_init(struct dvb_frontend* fe) i2c_writebytes(state,0x57,buf,1); /* write mod output format */ - buf[0] = 0x20; + buf[0] = 0x20; i2c_writebytes(state,0x09,buf,1); /* write fec mpeg mode */ @@ -637,12 +676,12 @@ static struct dvb_frontend_ops nxt2002_ops = { .name = "Nextwave nxt2002 VSB/QAM frontend", .type = FE_ATSC, .frequency_min = 54000000, - .frequency_max = 803000000, + .frequency_max = 806000000, /* stepsize is just a guess */ .frequency_stepsize = 166666, .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | - FE_CAN_8VSB + FE_CAN_8VSB | FE_CAN_QAM_64 | FE_CAN_QAM_256 }, .release = nxt2002_release, |