The patch number 8194 was added via Jean-Francois Moine <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans de Goede  <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Signed-off-by: Jean-Francois Moine <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/gspca/spca561.c |    6 +++---
 linux/include/linux/videodev2.h           |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff -r 8c13846f43bd -r feeaaa9d3ed3 linux/drivers/media/video/gspca/spca561.c
--- a/linux/drivers/media/video/gspca/spca561.c Thu Jul 03 13:09:12 2008 +0200
+++ b/linux/drivers/media/video/gspca/spca561.c Thu Jul 03 13:20:58 2008 +0200
@@ -98,8 +98,8 @@ static struct ctrl sd_ctrls[] = {
 };
 
 static struct cam_mode sif_mode[] = {
-       {V4L2_PIX_FMT_SPCA561, 160, 120, 3},
-       {V4L2_PIX_FMT_SPCA561, 176, 144, 2},
+       {V4L2_PIX_FMT_SGBRG8, 160, 120, 3},
+       {V4L2_PIX_FMT_SGBRG8, 176, 144, 2},
        {V4L2_PIX_FMT_SPCA561, 320, 240, 1},
        {V4L2_PIX_FMT_SPCA561, 352, 288, 0},
 };
@@ -808,7 +808,7 @@ static void sd_pkt_scan(struct gspca_dev
                        gspca_frame_add(gspca_dev, FIRST_PACKET,
                                        frame, data, len);
                } else {
-                       /*fixme: which format?*/
+                       /* raw bayer (with a header, which we skip) */
                        data += 20;
                        len -= 20;
                        gspca_frame_add(gspca_dev, FIRST_PACKET,
diff -r 8c13846f43bd -r feeaaa9d3ed3 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h   Thu Jul 03 13:09:12 2008 +0200
+++ b/linux/include/linux/videodev2.h   Thu Jul 03 13:20:58 2008 +0200
@@ -310,6 +310,7 @@ struct v4l2_pix_format
 
 /* see http://www.siliconimaging.com/RGB%20Bayer.htm */
 #define V4L2_PIX_FMT_SBGGR8  v4l2_fourcc('B','A','8','1') /*  8  BGBG.. GRGR.. 
*/
+#define V4L2_PIX_FMT_SGBRG8  v4l2_fourcc('G','B','R','G') /*  8  GBGB.. RGRG.. 
*/
 #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16  BGBG.. GRGR.. 
*/
 
 /* compressed formats */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/feeaaa9d3ed37d97c46ff5c47e92a1e62c5bde7d

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to