summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-05 11:39:12 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-05 11:39:12 -0200
commit53f02dd170952065cf1c6c18fefa194bd403c4ee (patch)
tree53dd5b068511ade8fa276eb8846e6117fc8fedd4 /linux/drivers/media/video/em28xx
parente743836c92c2f0fb9bf167dc094bb22ebbded955 (diff)
downloadmediapointer-dvb-s2-53f02dd170952065cf1c6c18fefa194bd403c4ee.tar.gz
mediapointer-dvb-s2-53f02dd170952065cf1c6c18fefa194bd403c4ee.tar.bz2
em28xx: turn off tuner when not used
From: Mauro Carvalho Chehab <mchehab@redhat.com> em28xx devices generally get hot when xc3028 tuner is powered on. This patch solves this by turning power off when the device is not used, at the expense of having a higher load time, when calling a TV application. Since firmware load happens on 1 or 2 seconds on most devices, this is not a pain. Also, it helps to save the planet by saving some power :) Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 00d49c45f..ff960f90c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -1758,6 +1758,9 @@ static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
return 0;
}
+ /* Save some power by putting tuner to sleep */
+ em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+
/* do this before setting alternate! */
em28xx_uninit_isoc(dev);
em28xx_set_mode(dev, EM28XX_SUSPEND);
@@ -2203,6 +2206,9 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
mutex_unlock(&em28xx_extension_devlist_lock);
mutex_unlock(&em28xx_devlist_mutex);
+ /* Save some power by putting tuner to sleep */
+ em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
+
return 0;
fail_reg_devices: