summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-camera.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2017-04-15 07:05:03 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-17 17:32:44 -0300
commita7b8e9a5b3224883c2ab996717d6b808c46c81b3 (patch)
tree6a864ba5dec1ed95df2049a6a83d2fd61e33a168 /drivers/media/usb/em28xx/em28xx-camera.c
parent85316cf8da9e808f28c81343a050f489ac03e20e (diff)
downloadlinux-a7b8e9a5b3224883c2ab996717d6b808c46c81b3.tar.gz
linux-a7b8e9a5b3224883c2ab996717d6b808c46c81b3.tar.xz
[media] em28xx: shed some light on video input formats
CbYCrY has been identified by looking into the tvp5150 driver and the saa7115 datasheet. YUV formats have been verified with em2765 + ov2640 (VAD Laplace webcam). RGB8 formats have been verified with em2710/em2820 + mt9v011 (Silvercrest webcam 1.3mpix). I also did some cross-checking with these two camera devices and 0x08-0x0b are at least 16 bits per pixel formats on em2710/em2820, too, and 0x0c-0x0f are at least 8 bits per pixel formats on em2765, too. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-camera.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-camera.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-camera.c b/drivers/media/usb/em28xx/em28xx-camera.c
index ee0fe1f13070..ae87dd3e671f 100644
--- a/drivers/media/usb/em28xx/em28xx-camera.c
+++ b/drivers/media/usb/em28xx/em28xx-camera.c
@@ -344,8 +344,7 @@ int em28xx_init_camera(struct em28xx *dev)
v4l2_i2c_new_subdev_board(&v4l2->v4l2_dev, adap,
&mt9v011_info, NULL))
return -ENODEV;
- /* probably means GRGB 16 bit bayer */
- v4l2->vinmode = 0x0d;
+ v4l2->vinmode = EM28XX_VINMODE_RGB8_GRBG;
v4l2->vinctl = 0x00;
break;
@@ -356,8 +355,7 @@ int em28xx_init_camera(struct em28xx *dev)
em28xx_initialize_mt9m001(dev);
- /* probably means BGGR 16 bit bayer */
- v4l2->vinmode = 0x0c;
+ v4l2->vinmode = EM28XX_VINMODE_RGB8_BGGR;
v4l2->vinctl = 0x00;
break;
@@ -369,7 +367,7 @@ int em28xx_init_camera(struct em28xx *dev)
em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk);
em28xx_initialize_mt9m111(dev);
- v4l2->vinmode = 0x0a;
+ v4l2->vinmode = EM28XX_VINMODE_YUV422_UYVY;
v4l2->vinctl = 0x00;
break;
@@ -410,7 +408,7 @@ int em28xx_init_camera(struct em28xx *dev)
/* NOTE: for UXGA=1600x1200 switch to 12MHz */
dev->board.xclk = EM28XX_XCLK_FREQUENCY_24MHZ;
em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk);
- v4l2->vinmode = 0x08;
+ v4l2->vinmode = EM28XX_VINMODE_YUV422_YUYV;
v4l2->vinctl = 0x00;
break;