diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-05-12 06:01:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 13:06:06 -0400 |
commit | 74c519cb6c5f23574a4d1d4a71b2b481a7482c85 (patch) | |
tree | 39cd1634487d7130c1fa6988de8a442f90762b0e | |
parent | 14bff9b8e746cfdb08f852f489a41659ed814c2a (diff) |
V4L/DVB: gspca_tv8532: rename brightness control to exposure
What we've called brightness so far actually is an exposure control,
rename it and fixup the maximum and default values.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/tv8532.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/media/video/gspca/tv8532.c b/drivers/media/video/gspca/tv8532.c index 420dde9ef6fa..d9c5bf3449d4 100644 --- a/drivers/media/video/gspca/tv8532.c +++ b/drivers/media/video/gspca/tv8532.c | |||
@@ -30,32 +30,32 @@ MODULE_LICENSE("GPL"); | |||
30 | struct sd { | 30 | struct sd { |
31 | struct gspca_dev gspca_dev; /* !! must be the first item */ | 31 | struct gspca_dev gspca_dev; /* !! must be the first item */ |
32 | 32 | ||
33 | __u16 brightness; | 33 | __u16 exposure; |
34 | __u16 gain; | 34 | __u16 gain; |
35 | 35 | ||
36 | __u8 packet; | 36 | __u8 packet; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* V4L2 controls supported by the driver */ | 39 | /* V4L2 controls supported by the driver */ |
40 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); | 40 | static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val); |
41 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); | 41 | static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val); |
42 | static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val); | 42 | static int sd_setgain(struct gspca_dev *gspca_dev, __s32 val); |
43 | static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val); | 43 | static int sd_getgain(struct gspca_dev *gspca_dev, __s32 *val); |
44 | 44 | ||
45 | static const struct ctrl sd_ctrls[] = { | 45 | static const struct ctrl sd_ctrls[] = { |
46 | { | 46 | { |
47 | { | 47 | { |
48 | .id = V4L2_CID_BRIGHTNESS, | 48 | .id = V4L2_CID_EXPOSURE, |
49 | .type = V4L2_CTRL_TYPE_INTEGER, | 49 | .type = V4L2_CTRL_TYPE_INTEGER, |
50 | .name = "Brightness", | 50 | .name = "Exposure", |
51 | .minimum = 1, | 51 | .minimum = 1, |
52 | .maximum = 0x15f, /* = 352 - 1 */ | 52 | .maximum = 0x18f, |
53 | .step = 1, | 53 | .step = 1, |
54 | #define BRIGHTNESS_DEF 0x14c | 54 | #define EXPOSURE_DEF 0x18f |
55 | .default_value = BRIGHTNESS_DEF, | 55 | .default_value = EXPOSURE_DEF, |
56 | }, | 56 | }, |
57 | .set = sd_setbrightness, | 57 | .set = sd_setexposure, |
58 | .get = sd_getbrightness, | 58 | .get = sd_getexposure, |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | { | 61 | { |
@@ -209,7 +209,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
209 | cam->cam_mode = sif_mode; | 209 | cam->cam_mode = sif_mode; |
210 | cam->nmodes = ARRAY_SIZE(sif_mode); | 210 | cam->nmodes = ARRAY_SIZE(sif_mode); |
211 | 211 | ||
212 | sd->brightness = BRIGHTNESS_DEF; | 212 | sd->exposure = EXPOSURE_DEF; |
213 | sd->gain = GAIN_DEF; | 213 | sd->gain = GAIN_DEF; |
214 | return 0; | 214 | return 0; |
215 | } | 215 | } |
@@ -241,11 +241,11 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | 243 | ||
244 | static void setbrightness(struct gspca_dev *gspca_dev) | 244 | static void setexposure(struct gspca_dev *gspca_dev) |
245 | { | 245 | { |
246 | struct sd *sd = (struct sd *) gspca_dev; | 246 | struct sd *sd = (struct sd *) gspca_dev; |
247 | 247 | ||
248 | reg_w2(gspca_dev, R1C_AD_EXPOSE_TIMEL, sd->brightness); | 248 | reg_w2(gspca_dev, R1C_AD_EXPOSE_TIMEL, sd->exposure); |
249 | reg_w1(gspca_dev, R00_PART_CONTROL, LATENT_CHANGE | EXPO_CHANGE); | 249 | reg_w1(gspca_dev, R00_PART_CONTROL, LATENT_CHANGE | EXPO_CHANGE); |
250 | /* 0x84 */ | 250 | /* 0x84 */ |
251 | } | 251 | } |
@@ -289,7 +289,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
289 | 289 | ||
290 | tv_8532_setReg(gspca_dev); | 290 | tv_8532_setReg(gspca_dev); |
291 | 291 | ||
292 | setbrightness(gspca_dev); | 292 | setexposure(gspca_dev); |
293 | setgain(gspca_dev); | 293 | setgain(gspca_dev); |
294 | 294 | ||
295 | /************************************************/ | 295 | /************************************************/ |
@@ -339,21 +339,21 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
339 | data + gspca_dev->width + 5, gspca_dev->width); | 339 | data + gspca_dev->width + 5, gspca_dev->width); |
340 | } | 340 | } |
341 | 341 | ||
342 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) | 342 | static int sd_setexposure(struct gspca_dev *gspca_dev, __s32 val) |
343 | { | 343 | { |
344 | struct sd *sd = (struct sd *) gspca_dev; | 344 | struct sd *sd = (struct sd *) gspca_dev; |
345 | 345 | ||
346 | sd->brightness = val; | 346 | sd->exposure = val; |
347 | if (gspca_dev->streaming) | 347 | if (gspca_dev->streaming) |
348 | setbrightness(gspca_dev); | 348 | setexposure(gspca_dev); |
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val) | 352 | static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val) |
353 | { | 353 | { |
354 | struct sd *sd = (struct sd *) gspca_dev; | 354 | struct sd *sd = (struct sd *) gspca_dev; |
355 | 355 | ||
356 | *val = sd->brightness; | 356 | *val = sd->exposure; |
357 | return 0; | 357 | return 0; |
358 | } | 358 | } |
359 | 359 | ||