Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331078
b: refs/heads/master
c: f9040ef
h: refs/heads/master
v: v3
  • Loading branch information
Evgeny Plehov authored and Mauro Carvalho Chehab committed Sep 24, 2012
1 parent d5278c6 commit 1dc26ae
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 81800159eff5ae8369a0e21a469cb7241a34a7dc
refs/heads/master: f9040ef3fab8f6f5f6fced5583203695d08efde3
32 changes: 32 additions & 0 deletions trunk/drivers/media/dvb-frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3425,6 +3425,33 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state)
return -1;
}

static int stv090x_set_mis(struct stv090x_state *state, int mis)
{
u32 reg;

if (mis < 0 || mis > 255) {
dprintk(FE_DEBUG, 1, "Disable MIS filtering");
reg = STV090x_READ_DEMOD(state, PDELCTRL1);
STV090x_SETFIELD_Px(reg, FILTER_EN_FIELD, 0x00);
if (STV090x_WRITE_DEMOD(state, PDELCTRL1, reg) < 0)
goto err;
} else {
dprintk(FE_DEBUG, 1, "Enable MIS filtering - %d", mis);
reg = STV090x_READ_DEMOD(state, PDELCTRL1);
STV090x_SETFIELD_Px(reg, FILTER_EN_FIELD, 0x01);
if (STV090x_WRITE_DEMOD(state, PDELCTRL1, reg) < 0)
goto err;
if (STV090x_WRITE_DEMOD(state, ISIENTRY, mis) < 0)
goto err;
if (STV090x_WRITE_DEMOD(state, ISIBITENA, 0xff) < 0)
goto err;
}
return 0;
err:
dprintk(FE_ERROR, 1, "I/O error");
return -1;
}

static enum dvbfe_search stv090x_search(struct dvb_frontend *fe)
{
struct stv090x_state *state = fe->demodulator_priv;
Expand All @@ -3447,6 +3474,8 @@ static enum dvbfe_search stv090x_search(struct dvb_frontend *fe)
state->search_range = 5000000;
}

stv090x_set_mis(state, props->stream_id);

if (stv090x_algo(state) == STV090x_RANGEOK) {
dprintk(FE_DEBUG, 1, "Search success!");
return DVBFE_ALGO_SEARCH_SUCCESS;
Expand Down Expand Up @@ -4798,6 +4827,9 @@ struct dvb_frontend *stv090x_attach(const struct stv090x_config *config,
}
}

if (state->internal->dev_ver >= 0x30)
state->frontend.ops.info.caps |= FE_CAN_MULTISTREAM;

/* workaround for stuck DiSEqC output */
if (config->diseqc_envelope_mode)
stv090x_send_diseqc_burst(&state->frontend, SEC_MINI_A);
Expand Down

0 comments on commit 1dc26ae

Please sign in to comment.