aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-05 08:39:12 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:15 -0500
commiteb6c96345d07c7c3978e77d3ad0b5c5b9e5b2faa (patch)
tree0f79d5c5d8239c5dafe3c2d311c6611ff1e8a3d4 /drivers/media
parent74a89b2ae352aca1d76789365e9f49964f2677e4 (diff)
V4L/DVB (9770): em28xx: turn off tuner when not used
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 :) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 32b437fd7936..6e558d2ca0f3 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1695,6 +1695,9 @@ static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
1695 return 0; 1695 return 0;
1696 } 1696 }
1697 1697
1698 /* Save some power by putting tuner to sleep */
1699 em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
1700
1698 /* do this before setting alternate! */ 1701 /* do this before setting alternate! */
1699 em28xx_uninit_isoc(dev); 1702 em28xx_uninit_isoc(dev);
1700 em28xx_set_mode(dev, EM28XX_SUSPEND); 1703 em28xx_set_mode(dev, EM28XX_SUSPEND);
@@ -2132,6 +2135,9 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
2132 mutex_unlock(&em28xx_extension_devlist_lock); 2135 mutex_unlock(&em28xx_extension_devlist_lock);
2133 mutex_unlock(&em28xx_devlist_mutex); 2136 mutex_unlock(&em28xx_devlist_mutex);
2134 2137
2138 /* Save some power by putting tuner to sleep */
2139 em28xx_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL);
2140
2135 return 0; 2141 return 0;
2136 2142
2137fail_reg_devices: 2143fail_reg_devices: