aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-14 02:18:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 13:03:26 -0400
commitd36bb4e77257ed0df86deca3f69794f037f68c7d (patch)
tree0e9352299d3158eb6f9fff87a3dcff9a39e881f5 /drivers/media/video/em28xx/em28xx-cards.c
parent2ea472ff704a8a94b3b9abec438db23e512be337 (diff)
V4L/DVB (12243): em28xx: allow specifying sensor xtal frequency
In order to properly estimate fps, mt9v011 sensor driver needs to know what is the used frequency on the sensor cristal. Adds the proper fields and initialization code for specifying the cristal frequency. Also, based on experimentation, it was noticed that the Silvercrest is outputing data at 7 fps. This means that it should be using a 6.3 MHz cristal. This information needs to be double checked later, by opening the device. Anyway, by using this value for xtal, at least now we have the correct fps report. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index d4a7e6075cc9..82536dd6b0fd 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1734,6 +1734,7 @@ static int em28xx_hint_sensor(struct em28xx *dev)
1734 dev->em28xx_sensor = EM28XX_MT9V011; 1734 dev->em28xx_sensor = EM28XX_MT9V011;
1735 dev->sensor_xres = 640; 1735 dev->sensor_xres = 640;
1736 dev->sensor_yres = 480; 1736 dev->sensor_yres = 480;
1737 dev->sensor_xtal = 6300000;
1737 break; 1738 break;
1738 default: 1739 default:
1739 printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version)); 1740 printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
@@ -2261,9 +2262,13 @@ void em28xx_card_setup(struct em28xx *dev)
2261 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2262 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
2262 "tvp5150", "tvp5150", tvp5150_addrs); 2263 "tvp5150", "tvp5150", tvp5150_addrs);
2263 2264
2264 if (dev->em28xx_sensor == EM28XX_MT9V011) 2265 if (dev->em28xx_sensor == EM28XX_MT9V011) {
2265 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2266 struct v4l2_subdev *sd;
2266 "mt9v011", "mt9v011", mt9v011_addrs); 2267
2268 sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
2269 &dev->i2c_adap, "mt9v011", "mt9v011", mt9v011_addrs);
2270 v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal);
2271 }
2267 2272
2268 if (dev->board.adecoder == EM28XX_TVAUDIO) 2273 if (dev->board.adecoder == EM28XX_TVAUDIO)
2269 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, 2274 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,