Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29893
b: refs/heads/master
c: f1e8091
h: refs/heads/master
i:
  29891: 0bc0165
v: v3
  • Loading branch information
Andrew de Quincey authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 1a75f03 commit 5bd5ed3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 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: d1544ecb3b0589089ddb928affa7bd4255f9442e
refs/heads/master: f1e809191c6b960aef721aa6aa8a8c103039d937
27 changes: 17 additions & 10 deletions trunk/drivers/media/dvb/frontends/tda10021.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,6 @@ static int tda10021_init (struct dvb_frontend *fe)

//Activate PLL
tda10021_writereg(state, 0x2a, tda10021_inittab[0x2a] & 0xef);

if (state->config->pll_init) {
lock_tuner(state);
state->config->pll_init(fe);
unlock_tuner(state);
}

return 0;
}

Expand Down Expand Up @@ -259,9 +252,10 @@ static int tda10021_set_parameters (struct dvb_frontend *fe,

//printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate);

lock_tuner(state);
state->config->pll_set(fe, p);
unlock_tuner(state);
if (fe->ops->tuner_ops.set_params) {
fe->ops->tuner_ops.set_params(fe, p);
if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0);
}

tda10021_set_symbolrate (state, p->u.qam.symbol_rate);
tda10021_writereg (state, 0x34, state->pwm);
Expand Down Expand Up @@ -376,6 +370,18 @@ static int tda10021_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa
return 0;
}

static int tda10021_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
{
struct tda10021_state* state = fe->demodulator_priv;

if (enable) {
lock_tuner(state);
} else {
unlock_tuner(state);
}
return 0;
}

static int tda10021_sleep(struct dvb_frontend* fe)
{
struct tda10021_state* state = fe->demodulator_priv;
Expand Down Expand Up @@ -448,6 +454,7 @@ static struct dvb_frontend_ops tda10021_ops = {

.init = tda10021_init,
.sleep = tda10021_sleep,
.i2c_gate_ctrl = tda10021_i2c_gate_ctrl,

.set_frontend = tda10021_set_parameters,
.get_frontend = tda10021_get_frontend,
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/media/dvb/frontends/tda10021.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ struct tda10021_config
{
/* the demodulator's i2c address */
u8 demod_address;

/* PLL maintenance */
int (*pll_init)(struct dvb_frontend* fe);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
};

extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
Expand Down

0 comments on commit 5bd5ed3

Please sign in to comment.