Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250237
b: refs/heads/master
c: 24fb060
h: refs/heads/master
i:
  250235: 1d272a0
v: v3
  • Loading branch information
Malcolm Priestley authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 71ef949 commit f8e29bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f9700062cf67b14729b2916ba662e7884d3e0c5
refs/heads/master: 24fb06049af849934a30a06da78b7c75fac280df
10 changes: 8 additions & 2 deletions trunk/drivers/media/dvb/frontends/stv0299.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct stv0299_state {
fe_code_rate_t fec_inner;
int errmode;
u32 ucblocks;
u8 mcr_reg;
};

#define STATUS_BER 0
Expand Down Expand Up @@ -457,13 +458,18 @@ static int stv0299_init (struct dvb_frontend* fe)

dprintk("stv0299: init chip\n");

stv0299_writeregI(state, 0x02, 0x30 | state->mcr_reg);
msleep(50);

for (i = 0; ; i += 2) {
reg = state->config->inittab[i];
val = state->config->inittab[i+1];
if (reg == 0xff && val == 0xff)
break;
if (reg == 0x0c && state->config->op0_off)
val &= ~0x10;
if (reg == 0x2)
state->mcr_reg = val & 0xf;
stv0299_writeregI(state, reg, val);
}

Expand Down Expand Up @@ -618,7 +624,7 @@ static int stv0299_sleep(struct dvb_frontend* fe)
{
struct stv0299_state* state = fe->demodulator_priv;

stv0299_writeregI(state, 0x02, 0x80);
stv0299_writeregI(state, 0x02, 0xb0 | state->mcr_reg);
state->initialised = 0;

return 0;
Expand Down Expand Up @@ -680,7 +686,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
state->errmode = STATUS_BER;

/* check if the demod is there */
stv0299_writeregI(state, 0x02, 0x34); /* standby off */
stv0299_writeregI(state, 0x02, 0x30); /* standby off */
msleep(200);
id = stv0299_readreg(state, 0x00);

Expand Down

0 comments on commit f8e29bd

Please sign in to comment.