Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285180
b: refs/heads/master
c: 8c8ee11
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent d20c3be commit 0190404
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d697b4ce9490d82380a3fe153a7f9fbe017295f2
refs/heads/master: 8c8ee11345fa26e46cbc9ec88581736e38915b16
10 changes: 10 additions & 0 deletions trunk/drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ static int tda18271_set_params(struct dvb_frontend *fe,
if (tda_fail(ret))
goto fail;

priv->if_freq = map->if_freq;
priv->frequency = freq;
priv->bandwidth = (fe->ops.info.type == FE_OFDM) ?
params->u.ofdm.bandwidth : 0;
Expand Down Expand Up @@ -1050,6 +1051,7 @@ static int tda18271_set_analog_params(struct dvb_frontend *fe,
if (tda_fail(ret))
goto fail;

priv->if_freq = map->if_freq;
priv->frequency = freq;
priv->bandwidth = 0;
fail:
Expand Down Expand Up @@ -1086,6 +1088,13 @@ static int tda18271_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
return 0;
}

static int tda18271_get_if_frequency(struct dvb_frontend *fe, u32 *frequency)
{
struct tda18271_priv *priv = fe->tuner_priv;
*frequency = (u32)priv->if_freq * 1000;
return 0;
}

/* ------------------------------------------------------------------ */

#define tda18271_update_std(std_cfg, name) do { \
Expand Down Expand Up @@ -1245,6 +1254,7 @@ static const struct dvb_tuner_ops tda18271_tuner_ops = {
.set_config = tda18271_set_config,
.get_frequency = tda18271_get_frequency,
.get_bandwidth = tda18271_get_bandwidth,
.get_if_frequency = tda18271_get_if_frequency,
};

struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/media/common/tuners/tda18271-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ struct tda18271_priv {

struct mutex lock;

u16 if_freq;

u32 frequency;
u32 bandwidth;
};
Expand Down

0 comments on commit 0190404

Please sign in to comment.