aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-14 12:33:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 14:03:26 -0300
commit579d315218e8a3f696e375c5f6917da6488bec8a (patch)
treec72d128308c801311cdf79638cbfbe453824411a /drivers/media/video/em28xx/em28xx-cards.c
parentd36bb4e77257ed0df86deca3f69794f037f68c7d (diff)
V4L/DVB (12244): em28xx: adjust vinmode/vinctl based on the stream input format
Depending on the video input format, vinmode/vinctl needs adjustments. For TV, this is not relevant, since the supported decoders output data at the same format. However, webcam sensors may have different formats, so, this needs to be adjusted based on the device. 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, 11 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 82536dd6b0f..e793aee1672 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1735,6 +1735,11 @@ static int em28xx_hint_sensor(struct em28xx *dev)
dev->sensor_xres = 640;
dev->sensor_yres = 480;
dev->sensor_xtal = 6300000;
+
+ /* probably means GRGB 16 bit bayer */
+ dev->vinmode = 0x0d;
+ dev->vinctl = 0x00;
+
break;
default:
printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
@@ -2415,6 +2420,12 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
}
/*
+ * Default format, used for tvp5150 or saa711x output formats
+ */
+ dev->vinmode = 0x10;
+ dev->vinctl = 0x11;
+
+ /*
* If the device can be a webcam, seek for a sensor.
* If sensor is not found, then it isn't a webcam.
*/