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:
parent
1f77192d62
commit
7cc9107597
@ -66,6 +66,10 @@ static int no_init;
|
|||||||
module_param(no_init, int, 0444);
|
module_param(no_init, int, 0444);
|
||||||
MODULE_PARM_DESC(no_init, "do not initialize most devices");
|
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
|
#define DDB_MAX_ADAPTER 64
|
||||||
static struct ddb *ddbs[DDB_MAX_ADAPTER];
|
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 ddb_dvb *dvb = &input->port->dvb[input->nr & 1];
|
||||||
struct stv0910_cfg cfg = stv0910_p;
|
struct stv0910_cfg cfg = stv0910_p;
|
||||||
|
|
||||||
|
if (stv0910_single)
|
||||||
|
cfg.single = 1;
|
||||||
if (type)
|
if (type)
|
||||||
cfg.parallel = 2;
|
cfg.parallel = 2;
|
||||||
dvb->fe = dvb_attach(stv0910_attach, i2c, &cfg, (input->nr & 1));
|
dvb->fe = dvb_attach(stv0910_attach, i2c, &cfg, (input->nr & 1));
|
||||||
|
@ -105,6 +105,7 @@ struct stv {
|
|||||||
u8 tscfgh;
|
u8 tscfgh;
|
||||||
u8 tsgeneral;
|
u8 tsgeneral;
|
||||||
u8 tsspeed;
|
u8 tsspeed;
|
||||||
|
u8 single;
|
||||||
unsigned long tune_time;
|
unsigned long tune_time;
|
||||||
|
|
||||||
s32 SearchRange;
|
s32 SearchRange;
|
||||||
@ -1137,7 +1138,10 @@ static int probe(struct stv *state)
|
|||||||
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
write_reg(state, RSTV0910_SYNTCTRL, 0x02); /* SYNTCTRL */
|
||||||
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
|
write_reg(state, RSTV0910_TSGENERAL, state->tsgeneral); /* TSGENERAL */
|
||||||
write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */
|
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_P1_TNRCFG2, 0x02); /* IQSWAP = 0 */
|
||||||
write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */
|
write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */
|
||||||
@ -1830,6 +1834,7 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
|
|||||||
state->DEMOD = 0x10; /* Inversion : Auto with reset to 0 */
|
state->DEMOD = 0x10; /* Inversion : Auto with reset to 0 */
|
||||||
state->ReceiveMode = Mode_None;
|
state->ReceiveMode = Mode_None;
|
||||||
state->CurScramblingCode = NO_SCRAMBLING_CODE;
|
state->CurScramblingCode = NO_SCRAMBLING_CODE;
|
||||||
|
state->single = cfg->single ? 1 : 0;
|
||||||
|
|
||||||
base = match_base(i2c, cfg->adr);
|
base = match_base(i2c, cfg->adr);
|
||||||
if (base) {
|
if (base) {
|
||||||
|
@ -9,6 +9,7 @@ struct stv0910_cfg {
|
|||||||
u8 adr;
|
u8 adr;
|
||||||
u8 parallel;
|
u8 parallel;
|
||||||
u8 rptlvl;
|
u8 rptlvl;
|
||||||
|
u8 single;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_DVB_STV0910) || \
|
#if defined(CONFIG_DVB_STV0910) || \
|
||||||
|
Loading…
Reference in New Issue
Block a user