aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2007-09-27 19:34:20 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 23:02:59 -0400
commitf5a1ac64cc444cf19c8817d61a410b70bbb619d9 (patch)
tree4fdc4c44e0821f74354080f8cb255d28b03fc256
parentb4aeb8b8232bd80764997bf38f574f63e118c259 (diff)
V4L/DVB (6270): V4L: Honor dev->ctl_invert when setting up the decoder in saa7134
When user sets dev->ctl_invert, driver writes negative values to SAA7134_DEC_LUMA_CONTRAST and SAA7134_DEC_CHROMA_SATURATION, but general code that initializes decorder ignores that Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 27c659cd0f30..525b5b77c13a 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -584,9 +584,13 @@ static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm)
584 saa_writeb(SAA7134_SYNC_CTRL, sync_control); 584 saa_writeb(SAA7134_SYNC_CTRL, sync_control);
585 saa_writeb(SAA7134_LUMA_CTRL, luma_control); 585 saa_writeb(SAA7134_LUMA_CTRL, luma_control);
586 saa_writeb(SAA7134_DEC_LUMA_BRIGHT, dev->ctl_bright); 586 saa_writeb(SAA7134_DEC_LUMA_BRIGHT, dev->ctl_bright);
587 saa_writeb(SAA7134_DEC_LUMA_CONTRAST, dev->ctl_contrast);
588 587
589 saa_writeb(SAA7134_DEC_CHROMA_SATURATION, dev->ctl_saturation); 588 saa_writeb(SAA7134_DEC_LUMA_CONTRAST,
589 dev->ctl_invert ? -dev->ctl_contrast : dev->ctl_contrast);
590
591 saa_writeb(SAA7134_DEC_CHROMA_SATURATION,
592 dev->ctl_invert ? -dev->ctl_saturation : dev->ctl_saturation);
593
590 saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue); 594 saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
591 saa_writeb(SAA7134_CHROMA_CTRL1, norm->chroma_ctrl1); 595 saa_writeb(SAA7134_CHROMA_CTRL1, norm->chroma_ctrl1);
592 saa_writeb(SAA7134_CHROMA_GAIN, norm->chroma_gain); 596 saa_writeb(SAA7134_CHROMA_GAIN, norm->chroma_gain);