Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124303
b: refs/heads/master
c: 74a89b2
h: refs/heads/master
i:
  124301: beff6bb
  124299: 6893cd0
  124295: 9b2c1c2
  124287: da185c3
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 55cd5bd commit 87b6537
Show file tree
Hide file tree
Showing 2 changed files with 32 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: 9e5d6760c28409dd4ebd1cbafee77e5f58d6d574
refs/heads/master: 74a89b2ae352aca1d76789365e9f49964f2677e4
31 changes: 31 additions & 0 deletions trunk/drivers/media/common/tuners/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable verbose debug messages");

static int no_poweroff;
module_param(no_poweroff, int, 0644);
MODULE_PARM_DESC(debug, "0 (default) powers device off when not used.\n"
"1 keep device energized and with tuner ready all the times.\n"
" Faster, but consumes more power and keeps the device hotter\n");

static char audio_std[8];
module_param_string(audio_std, audio_std, sizeof(audio_std), 0);
MODULE_PARM_DESC(audio_std,
Expand Down Expand Up @@ -1091,6 +1097,30 @@ static int xc2028_set_params(struct dvb_frontend *fe,
T_DIGITAL_TV, type, 0, demod);
}

static int xc2028_sleep(struct dvb_frontend *fe)
{
struct xc2028_data *priv = fe->tuner_priv;
int rc = 0;

/* Avoid firmware reload on slow devices */
if (no_poweroff)
return;

tuner_dbg("Putting xc2028/3028 into poweroff mode.\n");

mutex_lock(&priv->lock);

if (priv->firm_version < 0x0202)
rc = send_seq(priv, {0x00, 0x08, 0x00, 0x00});
else
rc = send_seq(priv, {0x80, 0x08, 0x00, 0x00});

priv->cur_fw.type = 0; /* need firmware reload */

mutex_unlock(&priv->lock);

return rc;
}

static int xc2028_dvb_release(struct dvb_frontend *fe)
{
Expand Down Expand Up @@ -1171,6 +1201,7 @@ static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = {
.get_frequency = xc2028_get_frequency,
.get_rf_strength = xc2028_signal,
.set_params = xc2028_set_params,
.sleep = xc2028_sleep,
};

struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
Expand Down

0 comments on commit 87b6537

Please sign in to comment.