Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98495
b: refs/heads/master
c: 74d5072
h: refs/heads/master
i:
  98493: f2d5fb6
  98491: 613b379
  98487: 0f260fe
  98479: 2483681
  98463: 6dd7ec8
  98431: a3b24e6
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jun 26, 2008
1 parent 8aa6e24 commit 597b196
Show file tree
Hide file tree
Showing 2 changed files with 22 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: 104fe9a2d2a56f25fb95800a7ab0f7600dd6879c
refs/heads/master: 74d50724a02d7cdc7f7887411518ec43d0251b97
23 changes: 21 additions & 2 deletions trunk/drivers/media/dvb/frontends/au8522.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,13 @@ static int au8522_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
struct au8522_state *state = fe->demodulator_priv;
int ret = -EINVAL;

dprintk("%s(frequency=%d)\n", __func__, p->frequency);

state->current_frequency = p->frequency;
if ((state->current_frequency == p->frequency) &&
(state->current_modulation == p->u.vsb.modulation))
return 0;

au8522_enable_modulation(fe, p->u.vsb.modulation);

Expand All @@ -476,11 +479,16 @@ static int au8522_set_frontend(struct dvb_frontend *fe,
if (fe->ops.tuner_ops.set_params) {
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
fe->ops.tuner_ops.set_params(fe, p);
ret = fe->ops.tuner_ops.set_params(fe, p);
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 0);
}

if (ret < 0)
return ret;

state->current_frequency = p->frequency;

return 0;
}

Expand All @@ -498,6 +506,16 @@ static int au8522_init(struct dvb_frontend *fe)
return 0;
}

static int au8522_sleep(struct dvb_frontend *fe)
{
struct au8522_state *state = fe->demodulator_priv;
dprintk("%s()\n", __func__);

state->current_frequency = 0;

return 0;
}

static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status)
{
struct au8522_state *state = fe->demodulator_priv;
Expand Down Expand Up @@ -672,6 +690,7 @@ static struct dvb_frontend_ops au8522_ops = {
},

.init = au8522_init,
.sleep = au8522_sleep,
.i2c_gate_ctrl = au8522_i2c_gate_ctrl,
.set_frontend = au8522_set_frontend,
.get_frontend = au8522_get_frontend,
Expand Down

0 comments on commit 597b196

Please sign in to comment.