aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-07-22 06:13:21 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 11:54:10 -0400
commite0a33d4d6e028bf40a18069c00884671be75c6b4 (patch)
tree1a59384263e088dfd6cb6df89fb2d11057f78b1f /drivers/media/video
parent6af492e56648e786e0dfb84d538fb7f9ecc02504 (diff)
V4L/DVB (8456): gspca_sonixb remove non working ovXXXX contrast, hue and saturation ctrls
gspca_sonixb remove non working ovXXXX contrast, hue and saturation ctrls Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/sonixb.c171
1 files changed, 0 insertions, 171 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 4f9c9ecb06e8..f8e510cfdf96 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -43,9 +43,6 @@ struct sd {
43 unsigned char autogain_ignore_frames; 43 unsigned char autogain_ignore_frames;
44 unsigned char frames_to_drop; 44 unsigned char frames_to_drop;
45 unsigned char freq; /* light freq filter setting */ 45 unsigned char freq; /* light freq filter setting */
46 unsigned char saturation;
47 unsigned char hue;
48 unsigned char contrast;
49 46
50 unsigned char fr_h_sz; /* size of frame header */ 47 unsigned char fr_h_sz; /* size of frame header */
51 char sensor; /* Type of image sensor chip */ 48 char sensor; /* Type of image sensor chip */
@@ -90,12 +87,6 @@ static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
90static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); 87static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
91static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val); 88static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
92static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); 89static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
93static int sd_setsaturation(struct gspca_dev *gspca_dev, __s32 val);
94static int sd_getsaturation(struct gspca_dev *gspca_dev, __s32 *val);
95static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val);
96static int sd_gethue(struct gspca_dev *gspca_dev, __s32 *val);
97static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val);
98static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
99 90
100static struct ctrl sd_ctrls[] = { 91static struct ctrl sd_ctrls[] = {
101 { 92 {
@@ -172,48 +163,6 @@ static struct ctrl sd_ctrls[] = {
172 .set = sd_setfreq, 163 .set = sd_setfreq,
173 .get = sd_getfreq, 164 .get = sd_getfreq,
174 }, 165 },
175 {
176 {
177 .id = V4L2_CID_SATURATION,
178 .type = V4L2_CTRL_TYPE_INTEGER,
179 .name = "Saturation",
180 .minimum = 0,
181 .maximum = 255,
182 .step = 1,
183#define SATURATION_DEF 127
184 .default_value = SATURATION_DEF,
185 },
186 .set = sd_setsaturation,
187 .get = sd_getsaturation,
188 },
189 {
190 {
191 .id = V4L2_CID_HUE,
192 .type = V4L2_CTRL_TYPE_INTEGER,
193 .name = "Hue",
194 .minimum = 0,
195 .maximum = 255,
196 .step = 1,
197#define HUE_DEF 127
198 .default_value = HUE_DEF,
199 },
200 .set = sd_sethue,
201 .get = sd_gethue,
202 },
203 {
204 {
205 .id = V4L2_CID_CONTRAST,
206 .type = V4L2_CTRL_TYPE_INTEGER,
207 .name = "Contrast",
208 .minimum = 0,
209 .maximum = 255,
210 .step = 1,
211#define CONTRAST_DEF 127
212 .default_value = CONTRAST_DEF,
213 },
214 .set = sd_setcontrast,
215 .get = sd_getcontrast,
216 },
217}; 166};
218 167
219static struct v4l2_pix_format vga_mode[] = { 168static struct v4l2_pix_format vga_mode[] = {
@@ -779,66 +728,6 @@ static void setfreq(struct gspca_dev *gspca_dev)
779 } 728 }
780} 729}
781 730
782static void setsaturation(struct gspca_dev *gspca_dev)
783{
784 struct sd *sd = (struct sd *) gspca_dev;
785
786 switch (sd->sensor) {
787/* case SENSOR_OV6650: */
788 case SENSOR_OV7630: {
789 __u8 i2c[] = {0xa0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10};
790 i2c[1] = sd->sensor_addr;
791 i2c[3] = sd->saturation & 0xf0;
792 if (i2c_w(gspca_dev, i2c) < 0)
793 PDEBUG(D_ERR, "i2c error setsaturation");
794 else
795 PDEBUG(D_CONF, "saturation set to: %d",
796 (int)sd->saturation);
797 break;
798 }
799 }
800}
801
802static void sethue(struct gspca_dev *gspca_dev)
803{
804 struct sd *sd = (struct sd *) gspca_dev;
805
806 switch (sd->sensor) {
807/* case SENSOR_OV6650: */
808 case SENSOR_OV7630: {
809 __u8 i2c[] = {0xa0, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10};
810 i2c[1] = sd->sensor_addr;
811 i2c[3] = 0x20 | (sd->hue >> 3);
812 if (i2c_w(gspca_dev, i2c) < 0)
813 PDEBUG(D_ERR, "i2c error setsaturation");
814 else
815 PDEBUG(D_CONF, "hue set to: %d", (int)sd->hue);
816 break;
817 }
818 }
819}
820
821static void setcontrast(struct gspca_dev *gspca_dev)
822{
823 struct sd *sd = (struct sd *) gspca_dev;
824
825 switch (sd->sensor) {
826/* case SENSOR_OV6650: */
827 case SENSOR_OV7630: {
828 __u8 i2c[] = {0xa0, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x10};
829 i2c[1] = sd->sensor_addr;
830 i2c[3] = 0x20 | (sd->contrast >> 3);
831 if (i2c_w(gspca_dev, i2c) < 0)
832 PDEBUG(D_ERR, "i2c error setcontrast");
833 else
834 PDEBUG(D_CONF, "contrast set to: %d",
835 (int)sd->contrast);
836 break;
837 }
838 }
839}
840
841
842static void do_autogain(struct gspca_dev *gspca_dev) 731static void do_autogain(struct gspca_dev *gspca_dev)
843{ 732{
844 struct sd *sd = (struct sd *) gspca_dev; 733 struct sd *sd = (struct sd *) gspca_dev;
@@ -950,9 +839,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
950 sd->exposure = EXPOSURE_DEF; 839 sd->exposure = EXPOSURE_DEF;
951 sd->autogain = AUTOGAIN_DEF; 840 sd->autogain = AUTOGAIN_DEF;
952 sd->freq = FREQ_DEF; 841 sd->freq = FREQ_DEF;
953 sd->contrast = CONTRAST_DEF;
954 sd->saturation = SATURATION_DEF;
955 sd->hue = HUE_DEF;
956 842
957 if (product == 0x60b0) /* SN9C103 with OV7630 */ 843 if (product == 0x60b0) /* SN9C103 with OV7630 */
958 reg_w(gspca_dev, 0x01, probe_ov7630, sizeof probe_ov7630); 844 reg_w(gspca_dev, 0x01, probe_ov7630, sizeof probe_ov7630);
@@ -1125,9 +1011,6 @@ static void sd_start(struct gspca_dev *gspca_dev)
1125 setbrightness(gspca_dev); 1011 setbrightness(gspca_dev);
1126 setexposure(gspca_dev); 1012 setexposure(gspca_dev);
1127 setfreq(gspca_dev); 1013 setfreq(gspca_dev);
1128 setsaturation(gspca_dev);
1129 sethue(gspca_dev);
1130 setcontrast(gspca_dev);
1131 1014
1132 sd->frames_to_drop = 0; 1015 sd->frames_to_drop = 0;
1133 sd->autogain_ignore_frames = 0; 1016 sd->autogain_ignore_frames = 0;
@@ -1314,60 +1197,6 @@ static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val)
1314 return 0; 1197 return 0;
1315} 1198}
1316 1199
1317static int sd_setsaturation(struct gspca_dev *gspca_dev, __s32 val)
1318{
1319 struct sd *sd = (struct sd *) gspca_dev;
1320
1321 sd->saturation = val;
1322 if (gspca_dev->streaming)
1323 setsaturation(gspca_dev);
1324 return 0;
1325}
1326
1327static int sd_getsaturation(struct gspca_dev *gspca_dev, __s32 *val)
1328{
1329 struct sd *sd = (struct sd *) gspca_dev;
1330
1331 *val = sd->saturation;
1332 return 0;
1333}
1334
1335static int sd_sethue(struct gspca_dev *gspca_dev, __s32 val)
1336{
1337 struct sd *sd = (struct sd *) gspca_dev;
1338
1339 sd->hue = val;
1340 if (gspca_dev->streaming)
1341 sethue(gspca_dev);
1342 return 0;
1343}
1344
1345static int sd_gethue(struct gspca_dev *gspca_dev, __s32 *val)
1346{
1347 struct sd *sd = (struct sd *) gspca_dev;
1348
1349 *val = sd->hue;
1350 return 0;
1351}
1352
1353static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val)
1354{
1355 struct sd *sd = (struct sd *) gspca_dev;
1356
1357 sd->contrast = val;
1358 if (gspca_dev->streaming)
1359 setcontrast(gspca_dev);
1360 return 0;
1361}
1362
1363static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val)
1364{
1365 struct sd *sd = (struct sd *) gspca_dev;
1366
1367 *val = sd->contrast;
1368 return 0;
1369}
1370
1371static int sd_querymenu(struct gspca_dev *gspca_dev, 1200static int sd_querymenu(struct gspca_dev *gspca_dev,
1372 struct v4l2_querymenu *menu) 1201 struct v4l2_querymenu *menu)
1373{ 1202{