1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

add support for single demod mode for testing high bit rates

This commit is contained in:
Ralph Metzler 2016-12-30 15:03:38 +01:00 committed by mvoelkel
parent 1f77192d62
commit c56f593a4c
3 changed files with 14 additions and 2 deletions

View File

@ -66,6 +66,10 @@ static int no_init;
module_param(no_init, int, 0444);
MODULE_PARM_DESC(no_init, "do not initialize most devices");
static int stv0910_single;
module_param(stv0910_single, int, 0444);
MODULE_PARM_DESC(no_init, "use stv0910 cards as single demods");
#define DDB_MAX_ADAPTER 64
static struct ddb *ddbs[DDB_MAX_ADAPTER];
@ -1573,6 +1577,8 @@ static int demod_attach_stv0910(struct ddb_input *input, int type)
struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1];
struct stv0910_cfg cfg = stv0910_p;
if (stv0910_single)
cfg.single = 1;
if (type)
cfg.parallel = 2;
dvb->fe = dvb_attach(stv0910_attach, i2c, &cfg, (input->nr & 1));

View File

@ -105,6 +105,7 @@ struct stv {
u8 tscfgh;
u8 tsgeneral;
u8 tsspeed;
u8 single;
unsigned long tune_time;
s32 SearchRange;
@ -1137,7 +1138,10 @@ static int probe(struct stv *state)
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
if (state->single)
write_reg(state, RSTV0910_GENCFG, 0x14); /* GENCFG */
else
write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */
write_reg(state, RSTV0910_P1_TNRCFG2, 0x02); /* IQSWAP = 0 */
write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */
@ -1830,7 +1834,8 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
state->DEMOD = 0x10; /* Inversion : Auto with reset to 0 */
state->ReceiveMode = Mode_None;
state->CurScramblingCode = NO_SCRAMBLING_CODE;
state->single = cfg->single ? 1 : 0;
base = match_base(i2c, cfg->adr);
if (base) {
base->count++;

View File

@ -9,6 +9,7 @@ struct stv0910_cfg {
u8 adr;
u8 parallel;
u8 rptlvl;
u8 single;
};
#if defined(CONFIG_DVB_STV0910) || \