Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92381
b: refs/heads/master
c: d1c5342
h: refs/heads/master
i:
  92379: 60d70ba
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent ef2cfea commit ed0c57c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 45 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: 4d2d42bcd8c73273f22d16ef4e619ce3f07f07d0
refs/heads/master: d1c53424f3ba9cc46bf3dbc550a916dc1b8355ee
60 changes: 16 additions & 44 deletions trunk/drivers/media/dvb/frontends/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ static int tda18271_read_thermometer(struct dvb_frontend *fe)
return tm;
}

static int tda18271_rf_tracking_filters_correction(struct dvb_frontend *fe,
u32 freq)
static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe,
u32 freq)
{
struct tda18271_priv *priv = fe->tuner_priv;
struct tda18271_rf_tracking_filter_cal *map = priv->rf_cal_state;
Expand Down Expand Up @@ -630,26 +630,6 @@ static int tda18271_init(struct dvb_frontend *fe)
return 0;
}

static int tda18271c2_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
{
struct tda18271_priv *priv = fe->tuner_priv;

tda_dbg("freq = %d, ifc = %d\n", freq, ifc);

tda18271_init(fe);

mutex_lock(&priv->lock);

tda18271_rf_tracking_filters_correction(fe, freq);

tda18271_channel_configuration(fe, ifc, freq, bw, std, radio);

mutex_unlock(&priv->lock);

return 0;
}

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

static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe,
Expand Down Expand Up @@ -747,41 +727,33 @@ static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe,
return 0;
}

static int tda18271c1_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
/* ------------------------------------------------------------------ */

static int tda18271_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
{
struct tda18271_priv *priv = fe->tuner_priv;

tda_dbg("freq = %d, ifc = %d, bw = %d, std = 0x%02x\n",
freq, ifc, bw, std);

tda18271_init(fe);

mutex_lock(&priv->lock);

tda_dbg("freq = %d, ifc = %d\n", freq, ifc);

tda18271c1_rf_tracking_filter_calibration(fe, freq, bw);

tda18271_channel_configuration(fe, ifc, freq, bw, std, radio);

mutex_unlock(&priv->lock);

return 0;
}

static inline int tda18271_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
{
struct tda18271_priv *priv = fe->tuner_priv;
int ret = -EINVAL;

switch (priv->id) {
case TDA18271HDC1:
ret = tda18271c1_tune(fe, ifc, freq, bw, std, radio);
tda18271c1_rf_tracking_filter_calibration(fe, freq, bw);
break;
case TDA18271HDC2:
ret = tda18271c2_tune(fe, ifc, freq, bw, std, radio);
tda18271c2_rf_tracking_filters_correction(fe, freq);
break;
}
return ret;
tda18271_channel_configuration(fe, ifc, freq, bw, std, radio);

mutex_unlock(&priv->lock);

return 0;
}

/* ------------------------------------------------------------------ */
Expand Down

0 comments on commit ed0c57c

Please sign in to comment.