diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-06-14 18:15:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 02:12:50 -0400 |
commit | ae49c40461d8981b232e3fec28234d492067f0e1 (patch) | |
tree | 943c34266c9ef36745cf34a784e53bf2fadbb0fb /drivers | |
parent | b282d87332f5b3c2ac2e289f772b33067e4be77b (diff) |
V4L/DVB (12081): gspca_ov519: Cleanup some sensor special cases
gspca_ov519: Cleanup some sensor special cases
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 3aebc744368d..cb5f3c786db4 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -529,7 +529,7 @@ static const struct ov_i2c_regvals norm_6x20[] = { | |||
529 | { 0x28, 0x05 }, | 529 | { 0x28, 0x05 }, |
530 | { 0x2a, 0x04 }, /* Disable framerate adjust */ | 530 | { 0x2a, 0x04 }, /* Disable framerate adjust */ |
531 | /* { 0x2b, 0xac }, * Framerate; Set 2a[7] first */ | 531 | /* { 0x2b, 0xac }, * Framerate; Set 2a[7] first */ |
532 | { 0x2d, 0x99 }, | 532 | { 0x2d, 0x85 }, |
533 | { 0x33, 0xa0 }, /* Color Processing Parameter */ | 533 | { 0x33, 0xa0 }, /* Color Processing Parameter */ |
534 | { 0x34, 0xd2 }, /* Max A/D range */ | 534 | { 0x34, 0xd2 }, /* Max A/D range */ |
535 | { 0x38, 0x8b }, | 535 | { 0x38, 0x8b }, |
@@ -2120,6 +2120,8 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
2120 | /* case SEN_OV76BE: */ | 2120 | /* case SEN_OV76BE: */ |
2121 | if (write_i2c_regvals(sd, norm_7610, ARRAY_SIZE(norm_7610))) | 2121 | if (write_i2c_regvals(sd, norm_7610, ARRAY_SIZE(norm_7610))) |
2122 | return -EIO; | 2122 | return -EIO; |
2123 | if (i2c_w_mask(sd, 0x0e, 0x00, 0x40)) | ||
2124 | return -EIO; | ||
2123 | break; | 2125 | break; |
2124 | case SEN_OV7620: | 2126 | case SEN_OV7620: |
2125 | if (write_i2c_regvals(sd, norm_7620, ARRAY_SIZE(norm_7620))) | 2127 | if (write_i2c_regvals(sd, norm_7620, ARRAY_SIZE(norm_7620))) |
@@ -2597,10 +2599,6 @@ static int mode_init_ov_sensor_regs(struct sd *sd) | |||
2597 | } | 2599 | } |
2598 | 2600 | ||
2599 | /******** Palette-specific regs ********/ | 2601 | /******** Palette-specific regs ********/ |
2600 | if (sd->sensor == SEN_OV7610 || sd->sensor == SEN_OV76BE) { | ||
2601 | /* not valid on the OV6620/OV7620/6630? */ | ||
2602 | i2c_w_mask(sd, 0x0e, 0x00, 0x40); | ||
2603 | } | ||
2604 | 2602 | ||
2605 | /* The OV518 needs special treatment. Although both the OV518 | 2603 | /* The OV518 needs special treatment. Although both the OV518 |
2606 | * and the OV6630 support a 16-bit video bus, only the 8 bit Y | 2604 | * and the OV6630 support a 16-bit video bus, only the 8 bit Y |
@@ -2615,21 +2613,7 @@ static int mode_init_ov_sensor_regs(struct sd *sd) | |||
2615 | i2c_w_mask(sd, 0x13, 0x00, 0x20); | 2613 | i2c_w_mask(sd, 0x13, 0x00, 0x20); |
2616 | 2614 | ||
2617 | /******** Clock programming ********/ | 2615 | /******** Clock programming ********/ |
2618 | /* The OV6620 needs special handling. This prevents the | 2616 | i2c_w(sd, 0x11, sd->clockdiv); |
2619 | * severe banding that normally occurs */ | ||
2620 | if (sd->sensor == SEN_OV6620) { | ||
2621 | |||
2622 | /* Clock down */ | ||
2623 | i2c_w(sd, 0x2a, 0x04); | ||
2624 | i2c_w(sd, 0x11, sd->clockdiv); | ||
2625 | i2c_w(sd, 0x2a, 0x84); | ||
2626 | /* This next setting is critical. It seems to improve | ||
2627 | * the gain or the contrast. The "reserved" bits seem | ||
2628 | * to have some effect in this case. */ | ||
2629 | i2c_w(sd, 0x2d, 0x85); | ||
2630 | } else { | ||
2631 | i2c_w(sd, 0x11, sd->clockdiv); | ||
2632 | } | ||
2633 | 2617 | ||
2634 | /******** Special Features ********/ | 2618 | /******** Special Features ********/ |
2635 | /* no evidence this is possible with OV7670, either */ | 2619 | /* no evidence this is possible with OV7670, either */ |