Skip to content

Commit

Permalink
[media] tda666x: add support for set_parms() and get_frequency()
Browse files Browse the repository at this point in the history
Those two callbacks are the ones that should be used by normal
DVB frontend drivers.

Add support for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Mauro Carvalho Chehab committed Nov 17, 2015
1 parent 8e6c4be commit 8fdc25b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/media/dvb-frontends/tda665x.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ static int tda665x_get_state(struct dvb_frontend *fe,
return err;
}

static int tda665x_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct tda665x_state *state = fe->tuner_priv;

*frequency = state->frequency;

return 0;
}

static int tda665x_get_status(struct dvb_frontend *fe, u32 *status)
{
struct tda665x_state *state = fe->tuner_priv;
Expand Down Expand Up @@ -201,6 +210,15 @@ static int tda665x_set_frequency(struct dvb_frontend *fe,
return err;
}

static int tda665x_set_params(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;

tda665x_set_frequency(fe, c->frequency);

return 0;
}

static int tda665x_set_state(struct dvb_frontend *fe,
enum tuner_param param,
struct tuner_state *tstate)
Expand All @@ -226,6 +244,8 @@ static struct dvb_tuner_ops tda665x_ops = {
.set_state = tda665x_set_state,
.get_state = tda665x_get_state,
.get_status = tda665x_get_status,
.set_params = tda665x_set_params,
.get_frequency = tda665x_get_frequency,
.release = tda665x_release
};

Expand Down

0 comments on commit 8fdc25b

Please sign in to comment.