Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164089
b: refs/heads/master
c: 81259f2
h: refs/heads/master
i:
  164087: 9199474
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 3cd5a72 commit 0e30306
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 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: fd9a40da1db372833e1af6397d2f6c94ceff3dad
refs/heads/master: 81259f210ef09c6e6e643c7cecc803a7083f970e
16 changes: 13 additions & 3 deletions trunk/drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,9 +1017,17 @@ static int tda18271_sleep(struct dvb_frontend *fe)

mutex_lock(&priv->lock);

/* standby mode w/ slave tuner output
* & loop thru & xtal oscillator on */
ret = tda18271_set_standby_mode(fe, 1, 0, 0);
switch (priv->standby_mode) {
case TDA18271_STANDBY_POWER_OFF:
ret = tda18271_set_standby_mode(fe, 1, 1, 1);
break;
case TDA18271_STANDBY_XT_ON:
ret = tda18271_set_standby_mode(fe, 1, 1, 0);
break;
case TDA18271_STANDBY_LT_XT_ON:
default:
ret = tda18271_set_standby_mode(fe, 1, 0, 0);
}

mutex_unlock(&priv->lock);

Expand Down Expand Up @@ -1199,6 +1207,8 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
priv->gate = (cfg) ? cfg->gate : TDA18271_GATE_AUTO;
priv->role = (cfg) ? cfg->role : TDA18271_MASTER;
priv->config = (cfg) ? cfg->config : 0;
priv->standby_mode = (cfg) ?
cfg->standby_mode : TDA18271_STANDBY_LT_XT_ON;

/* tda18271_cal_on_startup == -1 when cal
* module option is unset */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/common/tuners/tda18271-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ struct tda18271_priv {
enum tda18271_role role;
enum tda18271_i2c_gate gate;
enum tda18271_ver id;
enum tda18271_standby_mode standby_mode;

unsigned int config; /* interface to saa713x / tda829x */
unsigned int tm_rfcal;
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/media/common/tuners/tda18271.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ enum tda18271_i2c_gate {
TDA18271_GATE_DIGITAL,
};

enum tda18271_standby_mode {
/* slave tuner output & loop thru & xtal oscillator on */
TDA18271_STANDBY_LT_XT_ON = 0,

/* xtal oscillator on */
TDA18271_STANDBY_XT_ON,

/* power off */
TDA18271_STANDBY_POWER_OFF,
};

struct tda18271_config {
/* override default if freq / std settings (optional) */
struct tda18271_std_map *std_map;
Expand All @@ -77,6 +88,9 @@ struct tda18271_config {
/* use i2c gate provided by analog or digital demod */
enum tda18271_i2c_gate gate;

/* allow lower power standby modes */
enum tda18271_standby_mode standby_mode;

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

Expand Down

0 comments on commit 0e30306

Please sign in to comment.