diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-07 17:43:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-08-13 19:39:10 -0400 |
commit | d7612c86d099939503c2f849a523dbca753d1935 (patch) | |
tree | da7ac74b1cefb92dcfc83072671e1201c95297b4 /drivers/media | |
parent | 3d3215c4e4cfca74e5805a8506d50a6752172e81 (diff) |
V4L/DVB (12405): em28xx-cards: move register 0x13 setting to the proper place
Register 0x13 seems to be a sort of image control, maybe gamma, white
level or black level. Lower values produce better images, while higher
values increases the contrast and shifts colors to green. 0xff produces
a black image. This register is not Silvercrest-specific, so its code
should be moved to a better place.
If this register is left alone, a random value can be found at the
register, producing weird results.
While here, let's remove register 0x0d, as it had no noticed effect at
the image.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 4 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 54429b629b2..ed281f56594 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -2273,10 +2273,6 @@ void em28xx_card_setup(struct em28xx *dev) | |||
2273 | em28xx_gpio_set(dev, dev->board.tuner_gpio); | 2273 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
2274 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); | 2274 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
2275 | break; | 2275 | break; |
2276 | case EM2820_BOARD_SILVERCREST_WEBCAM: | ||
2277 | /* FIXME: need to document the registers bellow */ | ||
2278 | em28xx_write_reg(dev, 0x0d, 0x42); | ||
2279 | em28xx_write_reg(dev, 0x13, 0x08); | ||
2280 | } | 2276 | } |
2281 | 2277 | ||
2282 | if (dev->board.has_snapshot_button) | 2278 | if (dev->board.has_snapshot_button) |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 339fffdf6bc..98e140b5d95 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -632,6 +632,9 @@ int em28xx_capture_start(struct em28xx *dev, int start) | |||
632 | return rc; | 632 | return rc; |
633 | } | 633 | } |
634 | 634 | ||
635 | if (dev->board.is_webcam) | ||
636 | rc = em28xx_write_reg(dev, 0x13, 0x0c); | ||
637 | |||
635 | /* enable video capture */ | 638 | /* enable video capture */ |
636 | rc = em28xx_write_reg(dev, 0x48, 0x00); | 639 | rc = em28xx_write_reg(dev, 0x48, 0x00); |
637 | 640 | ||