aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/zc3xx.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 16:12:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:37:27 -0400
commitf50ba1bed3cfd65d6899afc4cb77299ee5c297ae (patch)
treec3a998c560dc55ab29a3011a20a7acdb6451680e /drivers/media/video/gspca/zc3xx.c
parent221e7dbe55fe515ff786142bac64b507fa9f26de (diff)
V4L/DVB (8814): gspca: Set DISABLED the disabled controls at query control time.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r--drivers/media/video/gspca/zc3xx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 79436f27cd4e..e78b9b7591d5 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -85,6 +85,7 @@ static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val);
85static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val); 85static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val);
86 86
87static struct ctrl sd_ctrls[] = { 87static struct ctrl sd_ctrls[] = {
88#define BRIGHTNESS_IDX 0
88#define SD_BRIGHTNESS 0 89#define SD_BRIGHTNESS 0
89 { 90 {
90 { 91 {
@@ -141,6 +142,7 @@ static struct ctrl sd_ctrls[] = {
141 .set = sd_setautogain, 142 .set = sd_setautogain,
142 .get = sd_getautogain, 143 .get = sd_getautogain,
143 }, 144 },
145#define LIGHTFREQ_IDX 4
144#define SD_FREQ 4 146#define SD_FREQ 4
145 { 147 {
146 { 148 {
@@ -7150,6 +7152,20 @@ static int sd_config(struct gspca_dev *gspca_dev,
7150 sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; 7152 sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value;
7151 sd->sharpness = sd_ctrls[SD_SHARPNESS].qctrl.default_value; 7153 sd->sharpness = sd_ctrls[SD_SHARPNESS].qctrl.default_value;
7152 7154
7155 switch (sd->sensor) {
7156 case SENSOR_GC0305:
7157 case SENSOR_OV7620:
7158 case SENSOR_PO2030:
7159 gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX);
7160 break;
7161 case SENSOR_HDCS2020:
7162 case SENSOR_HV7131B:
7163 case SENSOR_HV7131C:
7164 case SENSOR_OV7630C:
7165 gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX);
7166 break;
7167 }
7168
7153 /* switch the led off */ 7169 /* switch the led off */
7154 reg_w(gspca_dev->dev, 0x01, 0x0000); 7170 reg_w(gspca_dev->dev, 0x01, 0x0000);
7155 return 0; 7171 return 0;