aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-07-03 10:20:58 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:16:47 -0400
commit54ab92ca05550550bcec2462de2605f35d079b66 (patch)
tree01b9816582655927ae66ed4a30c95960c807ded6
parentbf7f0b98426b54c29ec8100a3f1963114c2f2ef0 (diff)
V4L/DVB (8194): gspca: Fix the format of the low resolution mode of spca561.
The low (half) res modes of the spca561 are not spca561 compressed, but are raw bayer, this patches fixes this and adds a PIX_FMT define for the GBRG bayer format used by the spca561 in low res mode. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/gspca/spca561.c6
-rw-r--r--include/linux/videodev2.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c
index a94e6270115e..dbd1648a655f 100644
--- a/drivers/media/video/gspca/spca561.c
+++ b/drivers/media/video/gspca/spca561.c
@@ -98,8 +98,8 @@ static struct ctrl sd_ctrls[] = {
98}; 98};
99 99
100static struct cam_mode sif_mode[] = { 100static struct cam_mode sif_mode[] = {
101 {V4L2_PIX_FMT_SPCA561, 160, 120, 3}, 101 {V4L2_PIX_FMT_SGBRG8, 160, 120, 3},
102 {V4L2_PIX_FMT_SPCA561, 176, 144, 2}, 102 {V4L2_PIX_FMT_SGBRG8, 176, 144, 2},
103 {V4L2_PIX_FMT_SPCA561, 320, 240, 1}, 103 {V4L2_PIX_FMT_SPCA561, 320, 240, 1},
104 {V4L2_PIX_FMT_SPCA561, 352, 288, 0}, 104 {V4L2_PIX_FMT_SPCA561, 352, 288, 0},
105}; 105};
@@ -808,7 +808,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
808 gspca_frame_add(gspca_dev, FIRST_PACKET, 808 gspca_frame_add(gspca_dev, FIRST_PACKET,
809 frame, data, len); 809 frame, data, len);
810 } else { 810 } else {
811 /*fixme: which format?*/ 811 /* raw bayer (with a header, which we skip) */
812 data += 20; 812 data += 20;
813 len -= 20; 813 len -= 20;
814 gspca_frame_add(gspca_dev, FIRST_PACKET, 814 gspca_frame_add(gspca_dev, FIRST_PACKET,
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 43a6c81a53ef..577f15634791 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -310,6 +310,7 @@ struct v4l2_pix_format
310 310
311/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ 311/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
312#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ 312#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */
313#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G','B','R','G') /* 8 GBGB.. RGRG.. */
313#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */ 314#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */
314 315
315/* compressed formats */ 316/* compressed formats */