Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161573
b: refs/heads/master
c: 81016b4
h: refs/heads/master
i:
  161571: b02bbf2
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Sep 12, 2009
1 parent 8c57ec5 commit 53d42f9
Show file tree
Hide file tree
Showing 3 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: ee8145d5634da4e062f8693f59695b0b2ed6e60d
refs/heads/master: 81016b496ee75cfb13d346ee58176d36a5f9c191
20 changes: 18 additions & 2 deletions trunk/drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module_param_named(debug, tda18271_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debug level "
"(info=1, map=2, reg=4, adv=8, cal=16 (or-able))");

static int tda18271_cal_on_startup;
static int tda18271_cal_on_startup = -1;
module_param_named(cal, tda18271_cal_on_startup, int, 0644);
MODULE_PARM_DESC(cal, "perform RF tracking filter calibration on startup");

Expand Down Expand Up @@ -1192,10 +1192,25 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
case 0:
goto fail;
case 1:
{
/* new tuner instance */
int rf_cal_on_startup;

priv->gate = (cfg) ? cfg->gate : TDA18271_GATE_AUTO;
priv->role = (cfg) ? cfg->role : TDA18271_MASTER;
priv->config = (cfg) ? cfg->config : 0;

/* tda18271_cal_on_startup == -1 when cal
* module option is unset */
if (tda18271_cal_on_startup == -1) {
/* honor attach-time configuration */
rf_cal_on_startup =
((cfg) && (cfg->rf_cal_on_startup)) ? 1 : 0;
} else {
/* module option overrides attach configuration */
rf_cal_on_startup = tda18271_cal_on_startup;
}

priv->cal_initialized = false;
mutex_init(&priv->lock);

Expand All @@ -1213,11 +1228,12 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
mutex_lock(&priv->lock);
tda18271_init_regs(fe);

if ((tda18271_cal_on_startup) && (priv->id == TDA18271HDC2))
if ((rf_cal_on_startup) && (priv->id == TDA18271HDC2))
tda18271c2_rf_cal_init(fe);

mutex_unlock(&priv->lock);
break;
}
default:
/* existing tuner instance */
fe->tuner_priv = priv;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/common/tuners/tda18271.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ struct tda18271_config {
/* use i2c gate provided by analog or digital demod */
enum tda18271_i2c_gate gate;

/* force rf tracking filter calibration on startup */
unsigned int rf_cal_on_startup:1;

/* some i2c providers cant write all 39 registers at once */
unsigned int small_i2c:1;

Expand Down

0 comments on commit 53d42f9

Please sign in to comment.