diff --git a/ddbridge/ddbridge-core.c b/ddbridge/ddbridge-core.c index 6bfd392..3a457e3 100644 --- a/ddbridge/ddbridge-core.c +++ b/ddbridge/ddbridge-core.c @@ -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)); diff --git a/frontends/stv0910.c b/frontends/stv0910.c index 2b4223d..5322eba 100644 --- a/frontends/stv0910.c +++ b/frontends/stv0910.c @@ -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++; diff --git a/frontends/stv0910.h b/frontends/stv0910.h index a6fad29..338ae01 100644 --- a/frontends/stv0910.h +++ b/frontends/stv0910.h @@ -9,6 +9,7 @@ struct stv0910_cfg { u8 adr; u8 parallel; u8 rptlvl; + u8 single; }; #if defined(CONFIG_DVB_STV0910) || \