summary | 
shortlog | 
log | 
commit | commitdiff | 
tree
raw | 
patch | 
inline | side by side (from parent 1: 
e300459)
 
It was working just because it was consistently wrong. :)
Thanks to Drew Fisher (zarvox) for spotting this.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
 #define MODE_1280x1024 0x0002
 
 #define FORMAT_BAYER   0x0010
 #define MODE_1280x1024 0x0002
 
 #define FORMAT_BAYER   0x0010
-#define FORMAT_UYUV    0x0020
+#define FORMAT_UYVY    0x0020
         .bytesperline = 640 * 2,
         .sizeimage = 640 * 480 * 2,
         .colorspace = V4L2_COLORSPACE_SRGB,
         .bytesperline = 640 * 2,
         .sizeimage = 640 * 480 * 2,
         .colorspace = V4L2_COLORSPACE_SRGB,
-        .priv = MODE_640x480 | FORMAT_UYUV},
+        .priv = MODE_640x480 | FORMAT_UYVY},
        {1280, 1024, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
         .bytesperline = 1280,
         .sizeimage = 1280 * 1024,
        {1280, 1024, V4L2_PIX_FMT_SGRBG8, V4L2_FIELD_NONE,
         .bytesperline = 1280,
         .sizeimage = 1280 * 1024,
        fps_reg = 0x0e;
 
        /* format */
        fps_reg = 0x0e;
 
        /* format */
-       if (mode & FORMAT_UYUV)
+       if (mode & FORMAT_UYVY)
                fmt_val = 0x05;
        else
                fmt_val = 0x00;
                fmt_val = 0x05;
        else
                fmt_val = 0x00;