diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-01-24 14:22:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-31 09:05:26 -0500 |
commit | 3d244065cb8764e23fe86225fb985e5deb3b26d5 (patch) | |
tree | 812b0023f72153605b3df90758f48231f4446a22 /drivers/media | |
parent | 7c45f2c7fe8eb433a8af0f38ddeaa7e4abc05e0c (diff) |
[media] gspca - zc3xx: Fix bad images with the sensor hv7131r
The problem was introduced by the commit 2af0b4c60cc0daf0.
Some registers were no more initialized.
Tested-by: <Giovanni Scafora giovanni@archlinux.org>
Tested-by: <Sergey Manucharian sm@ingeniware.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index f9710f9851c5..cf65fb36e88f 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -5830,7 +5830,7 @@ static void setmatrix(struct gspca_dev *gspca_dev) | |||
5830 | [SENSOR_GC0305] = gc0305_matrix, | 5830 | [SENSOR_GC0305] = gc0305_matrix, |
5831 | [SENSOR_HDCS2020b] = NULL, | 5831 | [SENSOR_HDCS2020b] = NULL, |
5832 | [SENSOR_HV7131B] = NULL, | 5832 | [SENSOR_HV7131B] = NULL, |
5833 | [SENSOR_HV7131R] = NULL, | 5833 | [SENSOR_HV7131R] = po2030_matrix, |
5834 | [SENSOR_ICM105A] = po2030_matrix, | 5834 | [SENSOR_ICM105A] = po2030_matrix, |
5835 | [SENSOR_MC501CB] = NULL, | 5835 | [SENSOR_MC501CB] = NULL, |
5836 | [SENSOR_MT9V111_1] = gc0305_matrix, | 5836 | [SENSOR_MT9V111_1] = gc0305_matrix, |
@@ -5936,6 +5936,7 @@ static void setquality(struct gspca_dev *gspca_dev) | |||
5936 | case SENSOR_ADCM2700: | 5936 | case SENSOR_ADCM2700: |
5937 | case SENSOR_GC0305: | 5937 | case SENSOR_GC0305: |
5938 | case SENSOR_HV7131B: | 5938 | case SENSOR_HV7131B: |
5939 | case SENSOR_HV7131R: | ||
5939 | case SENSOR_OV7620: | 5940 | case SENSOR_OV7620: |
5940 | case SENSOR_PAS202B: | 5941 | case SENSOR_PAS202B: |
5941 | case SENSOR_PO2030: | 5942 | case SENSOR_PO2030: |
@@ -6108,11 +6109,13 @@ static void send_unknown(struct gspca_dev *gspca_dev, int sensor) | |||
6108 | reg_w(gspca_dev, 0x02, 0x003b); | 6109 | reg_w(gspca_dev, 0x02, 0x003b); |
6109 | reg_w(gspca_dev, 0x00, 0x0038); | 6110 | reg_w(gspca_dev, 0x00, 0x0038); |
6110 | break; | 6111 | break; |
6112 | case SENSOR_HV7131R: | ||
6111 | case SENSOR_PAS202B: | 6113 | case SENSOR_PAS202B: |
6112 | reg_w(gspca_dev, 0x03, 0x003b); | 6114 | reg_w(gspca_dev, 0x03, 0x003b); |
6113 | reg_w(gspca_dev, 0x0c, 0x003a); | 6115 | reg_w(gspca_dev, 0x0c, 0x003a); |
6114 | reg_w(gspca_dev, 0x0b, 0x0039); | 6116 | reg_w(gspca_dev, 0x0b, 0x0039); |
6115 | reg_w(gspca_dev, 0x0b, 0x0038); | 6117 | if (sensor == SENSOR_PAS202B) |
6118 | reg_w(gspca_dev, 0x0b, 0x0038); | ||
6116 | break; | 6119 | break; |
6117 | } | 6120 | } |
6118 | } | 6121 | } |
@@ -6704,10 +6707,13 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6704 | reg_w(gspca_dev, 0x02, 0x003b); | 6707 | reg_w(gspca_dev, 0x02, 0x003b); |
6705 | reg_w(gspca_dev, 0x00, 0x0038); | 6708 | reg_w(gspca_dev, 0x00, 0x0038); |
6706 | break; | 6709 | break; |
6710 | case SENSOR_HV7131R: | ||
6707 | case SENSOR_PAS202B: | 6711 | case SENSOR_PAS202B: |
6708 | reg_w(gspca_dev, 0x03, 0x003b); | 6712 | reg_w(gspca_dev, 0x03, 0x003b); |
6709 | reg_w(gspca_dev, 0x0c, 0x003a); | 6713 | reg_w(gspca_dev, 0x0c, 0x003a); |
6710 | reg_w(gspca_dev, 0x0b, 0x0039); | 6714 | reg_w(gspca_dev, 0x0b, 0x0039); |
6715 | if (sd->sensor == SENSOR_HV7131R) | ||
6716 | reg_w(gspca_dev, 0x50, ZC3XX_R11D_GLOBALGAIN); | ||
6711 | break; | 6717 | break; |
6712 | } | 6718 | } |
6713 | 6719 | ||
@@ -6720,6 +6726,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6720 | break; | 6726 | break; |
6721 | case SENSOR_PAS202B: | 6727 | case SENSOR_PAS202B: |
6722 | case SENSOR_GC0305: | 6728 | case SENSOR_GC0305: |
6729 | case SENSOR_HV7131R: | ||
6723 | case SENSOR_TAS5130C: | 6730 | case SENSOR_TAS5130C: |
6724 | reg_r(gspca_dev, 0x0008); | 6731 | reg_r(gspca_dev, 0x0008); |
6725 | /* fall thru */ | 6732 | /* fall thru */ |
@@ -6760,6 +6767,12 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6760 | /* ms-win + */ | 6767 | /* ms-win + */ |
6761 | reg_w(gspca_dev, 0x40, 0x0117); | 6768 | reg_w(gspca_dev, 0x40, 0x0117); |
6762 | break; | 6769 | break; |
6770 | case SENSOR_HV7131R: | ||
6771 | i2c_write(gspca_dev, 0x25, 0x04, 0x00); /* exposure */ | ||
6772 | i2c_write(gspca_dev, 0x26, 0x93, 0x00); | ||
6773 | i2c_write(gspca_dev, 0x27, 0xe0, 0x00); | ||
6774 | reg_w(gspca_dev, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN); | ||
6775 | break; | ||
6763 | case SENSOR_GC0305: | 6776 | case SENSOR_GC0305: |
6764 | case SENSOR_TAS5130C: | 6777 | case SENSOR_TAS5130C: |
6765 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ | 6778 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |