summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-14 03:18:39 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-14 03:18:39 -0300
commit0edfef5c337eb0bd9d0146246fae01a308faea4f (patch)
tree6928acdc9b141e6d905a9fc65e293790d3939da3 /linux/drivers/media/video/em28xx/em28xx-cards.c
parenta8d41efd6cd091346a1276f0c7d818874b10bc36 (diff)
downloadmediapointer-dvb-s2-0edfef5c337eb0bd9d0146246fae01a308faea4f.tar.gz
mediapointer-dvb-s2-0edfef5c337eb0bd9d0146246fae01a308faea4f.tar.bz2
em28xx: allow specifying sensor xtal frequency
From: Mauro Carvalho Chehab <mchehab@redhat.com> 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. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index d5ebfb8be..75032271d 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -1805,6 +1805,7 @@ static int em28xx_hint_sensor(struct em28xx *dev)
dev->em28xx_sensor = EM28XX_MT9V011;
dev->sensor_xres = 640;
dev->sensor_yres = 480;
+ dev->sensor_xtal = 6300000;
break;
default:
printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
@@ -2366,9 +2367,13 @@ void em28xx_card_setup(struct em28xx *dev)
v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
"tvp5150", "tvp5150", tvp5150_addrs);
- if (dev->em28xx_sensor == EM28XX_MT9V011)
- v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
- "mt9v011", "mt9v011", mt9v011_addrs);
+ if (dev->em28xx_sensor == EM28XX_MT9V011) {
+ struct v4l2_subdev *sd;
+
+ sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
+ &dev->i2c_adap, "mt9v011", "mt9v011", mt9v011_addrs);
+ v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal);
+ }
if (dev->board.adecoder == EM28XX_TVAUDIO)
v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,