change pls to official scrambling_sequence_index

This commit is contained in:
Ralph Metzler
2018-01-16 23:50:40 +01:00
parent bda6c538ae
commit 4f136e5659
8 changed files with 33 additions and 28 deletions

View File

@@ -448,10 +448,7 @@ static int cfg_scrambler(struct mxl *state, u32 gold)
0, 0, 0, 0, 1, 0, 0, 0,
};
if (gold != NO_SCRAMBLING_CODE)
root = gold2root(gold);
else
root = 1;
root = gold2root(gold);
buf[25] = (root >> 24) & 0xff;
buf[24] = (root >> 16) & 0xff;
buf[23] = (root >> 8) & 0xff;
@@ -530,7 +527,7 @@ static int set_parameters(struct dvb_frontend *fe)
demodChanCfg.rollOff = MXL_HYDRA_ROLLOFF_AUTO;
demodChanCfg.modulationScheme = MXL_HYDRA_MOD_AUTO;
demodChanCfg.pilots = MXL_HYDRA_PILOTS_AUTO;
cfg_scrambler(state, p->pls);
cfg_scrambler(state, p->scrambling_sequence_index);
break;
default:
return -EINVAL;

View File

@@ -3537,8 +3537,8 @@ static enum dvbfe_search stv090x_search(struct dvb_frontend *fe, struct dvb_fron
if ((props->stream_id != NO_STREAM_ID_FILTER) &&
(props->stream_id & 0xffffff00))
pls = props->stream_id >> 8;
if (props->pls != NO_SCRAMBLING_CODE)
pls = props->pls | 0x40000; /* props->pls is always gold code */
/* props->scrambling_sequence_index is always gold code */
pls = props->scrambling_sequence_index | 0x40000;
stv090x_set_pls(state, (pls >> 18) & 3, pls & 0x3ffff);
stv090x_set_mis(state, props->stream_id);

View File

@@ -893,9 +893,8 @@ static void set_stream_modes(struct stv *state, struct dtv_frontend_properties *
if ((p->stream_id != NO_STREAM_ID_FILTER) &&
(p->stream_id & 0xfffff00))
scrambling_code = 0xfffff & (p->stream_id >> 8);
/* p->pls is always gold code ! */
if (p->pls != NO_SCRAMBLING_CODE)
scrambling_code = p->pls | 0x40000;
/* p->scrambling_sequence_index is always gold code ! */
scrambling_code = p->scrambling_sequence_index | 0x40000;
set_pls(state, scrambling_code);
}
@@ -1850,7 +1849,7 @@ struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
state->search_range = 16000000;
state->demod = 0x10; /* Inversion : Auto with reset to 0 */
state->receive_mode = RCVMODE_NONE;
state->cur_scrambling_code = NO_SCRAMBLING_CODE;
state->cur_scrambling_code = 0xffffffff;
state->single = cfg->single ? 1 : 0;
base = match_base(i2c, cfg->adr);