Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92380
b: refs/heads/master
c: 4d2d42b
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 60d70ba commit ef2cfea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 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: a60b866567001e97b5bdc9811aee155ae759e48f
refs/heads/master: 4d2d42bcd8c73273f22d16ef4e619ce3f07f07d0
30 changes: 19 additions & 11 deletions trunk/drivers/media/dvb/frontends/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,21 +652,13 @@ static int tda18271c2_tune(struct dvb_frontend *fe,

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

static int tda18271c1_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe,
u32 freq, u32 bw)
{
struct tda18271_priv *priv = fe->tuner_priv;
unsigned char *regs = priv->tda18271_regs;
u32 N = 0;

tda18271_init(fe);

mutex_lock(&priv->lock);

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

/* RF tracking filter calibration */

/* calculate bp filter */
tda18271_calc_bp_filter(fe, &freq);
tda18271_write_regs(fe, R_EP1, 1);
Expand Down Expand Up @@ -737,7 +729,7 @@ static int tda18271c1_tune(struct dvb_frontend *fe,

regs[R_EB7] = 0x40;
tda18271_write_regs(fe, R_EB7, 1);
msleep(10);
msleep(10); /* pll locking */

regs[R_EB20] = 0xec;
tda18271_write_regs(fe, R_EB20, 1);
Expand All @@ -752,6 +744,22 @@ static int tda18271c1_tune(struct dvb_frontend *fe,
if (0 == tda18271_calc_rf_cal(fe, &freq))
tda18271_write_regs(fe, R_EB14, 1);

return 0;
}

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

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);
Expand Down

0 comments on commit ef2cfea

Please sign in to comment.