diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2011-03-26 20:57:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:29:46 -0400 |
commit | 24fb06049af849934a30a06da78b7c75fac280df (patch) | |
tree | d0805c61c84bff9458cf04ce2886996b79bfb158 /drivers/media/dvb/frontends/stv0299.c | |
parent | 2f9700062cf67b14729b2916ba662e7884d3e0c5 (diff) |
[media] STV0299 incorrect standby setting issues register 02 (MCR)
Issues with Register 02 causing spurious channel locking from standby.
Should have always bits 4 & 5 written to 1.
Lower nibble not used in any current driver. Usage if necessary can be
applied through initab to mcr_reg. stv0299 not out of standby before
writing inittab.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv0299.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c index 4e3db3a42e06..42684bec8883 100644 --- a/drivers/media/dvb/frontends/stv0299.c +++ b/drivers/media/dvb/frontends/stv0299.c | |||
@@ -64,6 +64,7 @@ struct stv0299_state { | |||
64 | fe_code_rate_t fec_inner; | 64 | fe_code_rate_t fec_inner; |
65 | int errmode; | 65 | int errmode; |
66 | u32 ucblocks; | 66 | u32 ucblocks; |
67 | u8 mcr_reg; | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | #define STATUS_BER 0 | 70 | #define STATUS_BER 0 |
@@ -457,6 +458,9 @@ static int stv0299_init (struct dvb_frontend* fe) | |||
457 | 458 | ||
458 | dprintk("stv0299: init chip\n"); | 459 | dprintk("stv0299: init chip\n"); |
459 | 460 | ||
461 | stv0299_writeregI(state, 0x02, 0x30 | state->mcr_reg); | ||
462 | msleep(50); | ||
463 | |||
460 | for (i = 0; ; i += 2) { | 464 | for (i = 0; ; i += 2) { |
461 | reg = state->config->inittab[i]; | 465 | reg = state->config->inittab[i]; |
462 | val = state->config->inittab[i+1]; | 466 | val = state->config->inittab[i+1]; |
@@ -464,6 +468,8 @@ static int stv0299_init (struct dvb_frontend* fe) | |||
464 | break; | 468 | break; |
465 | if (reg == 0x0c && state->config->op0_off) | 469 | if (reg == 0x0c && state->config->op0_off) |
466 | val &= ~0x10; | 470 | val &= ~0x10; |
471 | if (reg == 0x2) | ||
472 | state->mcr_reg = val & 0xf; | ||
467 | stv0299_writeregI(state, reg, val); | 473 | stv0299_writeregI(state, reg, val); |
468 | } | 474 | } |
469 | 475 | ||
@@ -618,7 +624,7 @@ static int stv0299_sleep(struct dvb_frontend* fe) | |||
618 | { | 624 | { |
619 | struct stv0299_state* state = fe->demodulator_priv; | 625 | struct stv0299_state* state = fe->demodulator_priv; |
620 | 626 | ||
621 | stv0299_writeregI(state, 0x02, 0x80); | 627 | stv0299_writeregI(state, 0x02, 0xb0 | state->mcr_reg); |
622 | state->initialised = 0; | 628 | state->initialised = 0; |
623 | 629 | ||
624 | return 0; | 630 | return 0; |
@@ -680,7 +686,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, | |||
680 | state->errmode = STATUS_BER; | 686 | state->errmode = STATUS_BER; |
681 | 687 | ||
682 | /* check if the demod is there */ | 688 | /* check if the demod is there */ |
683 | stv0299_writeregI(state, 0x02, 0x34); /* standby off */ | 689 | stv0299_writeregI(state, 0x02, 0x30); /* standby off */ |
684 | msleep(200); | 690 | msleep(200); |
685 | id = stv0299_readreg(state, 0x00); | 691 | id = stv0299_readreg(state, 0x00); |
686 | 692 | ||