summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-05 11:31:16 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-05 11:31:16 -0200
commite743836c92c2f0fb9bf167dc094bb22ebbded955 (patch)
tree55fe816918bd2e0bcfb9ac9db77da311bfe723e5 /linux/drivers/media
parent81755eaa892b63b3357fca8123471febe60b9f66 (diff)
downloadmediapointer-dvb-s2-e743836c92c2f0fb9bf167dc094bb22ebbded955.tar.gz
mediapointer-dvb-s2-e743836c92c2f0fb9bf167dc094bb22ebbded955.tar.bz2
tuner-xc2028: powers device of when not used
From: Mauro Carvalho Chehab <mchehab@redhat.com> Since the firmware load is now fast on most boards, better to keep the tuner off by default. A modprobe parameter were added to keep the old behavior, to be used by old devices. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/common/tuners/tuner-xc2028.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/common/tuners/tuner-xc2028.c b/linux/drivers/media/common/tuners/tuner-xc2028.c
index 7f43272ca..c7ed924df 100644
--- a/linux/drivers/media/common/tuners/tuner-xc2028.c
+++ b/linux/drivers/media/common/tuners/tuner-xc2028.c
@@ -32,6 +32,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,
@@ -1095,16 +1101,16 @@ static int xc2028_set_params(struct dvb_frontend *fe,
T_DIGITAL_TV, type, 0, demod);
}
-#if 0
-/* This is needed at sleep (S1/S3), but not at fe_standby. Otherwise,
- firmware will be loaded on every open()
- */
static int xc2028_sleep(struct dvb_frontend *fe)
{
struct xc2028_data *priv = fe->tuner_priv;
int rc = 0;
- tuner_dbg("%s called\n", __func__);
+ /* Avoid firmware reload on slow devices */
+ if (no_poweroff)
+ return;
+
+ tuner_dbg("Putting xc2028/3028 into poweroff mode.\n");
mutex_lock(&priv->lock);
@@ -1119,7 +1125,6 @@ static int xc2028_sleep(struct dvb_frontend *fe)
return rc;
}
-#endif
static int xc2028_dvb_release(struct dvb_frontend *fe)
{
@@ -1200,9 +1205,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,
-#if 0
.sleep = xc2028_sleep,
-#endif
#if 0
int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
int (*get_status)(struct dvb_frontend *fe, u32 *status);