]> Pileus Git - ~andy/linux/commitdiff
[media] gspca-sonixb: Adjust hstart on sn9c103 + pas202
authorHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2013 11:54:14 +0000 (08:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 7 May 2013 12:41:49 +0000 (09:41 -0300)
For some unknown reason we need to increase hstart by 1 on when using the
PAS202 on the sn9c103 (versus on the sn9c102), otherwise we get the wrong
colors, due to shifting of the bayer pattern.

Reported-by: Patrizio Bassi <patrizio.bassi@gmail.com>
Tested-by: Patrizio Bassi <patrizio.bassi@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/gspca/sonixb.c

index 3fe207e038c75b5ea260745149d271463f89d1e9..d7ff3b9687c57cb22c504e7a3a9493e41fd924eb 100644 (file)
@@ -1159,6 +1159,13 @@ static int sd_start(struct gspca_dev *gspca_dev)
                        regs[0x01] = 0x44; /* Select 24 Mhz clock */
                        regs[0x12] = 0x02; /* Set hstart to 2 */
                }
+               break;
+       case SENSOR_PAS202:
+               /* For some unknown reason we need to increase hstart by 1 on
+                  the sn9c103, otherwise we get wrong colors (bayer shift). */
+               if (sd->bridge == BRIDGE_103)
+                       regs[0x12] += 1;
+               break;
        }
        /* Disable compression when the raw bayer format has been selected */
        if (cam->cam_mode[gspca_dev->curr_mode].priv & MODE_RAW)