Skip to content

Commit

Permalink
[media] gspca-sonixb: Adjust hstart on sn9c103 + pas202
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed May 7, 2013
1 parent cd5de26 commit 0391dc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/usb/gspca/sonixb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0391dc1

Please sign in to comment.