summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-03 22:40:24 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-12-11 18:08:03 -0200
commitf4b8b3ae13b2246cf7e1b998f0292f3297d03d41 (patch)
tree78543838029bd74abeea6da7eafb575c61b5ce6f
parent2b2c93ac998896db0d2b754a4fd83479bda7efde (diff)
downloadlinux-f4b8b3ae13b2246cf7e1b998f0292f3297d03d41.tar.gz
linux-f4b8b3ae13b2246cf7e1b998f0292f3297d03d41.tar.bz2
linux-f4b8b3ae13b2246cf7e1b998f0292f3297d03d41.zip
V4L/DVB (6542): Fix S-video mode on tvp5150
Thanks to Markus Reichberger to point this. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/tvp5150.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c
index 25d0aef88ef5..445eba4174d7 100644
--- a/drivers/media/video/tvp5150.c
+++ b/drivers/media/video/tvp5150.c
@@ -290,6 +290,7 @@ static inline void tvp5150_selmux(struct i2c_client *c)
int opmode=0;
struct tvp5150 *decoder = i2c_get_clientdata(c);
int input = 0;
+ unsigned char val;
if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable)
input = 8;
@@ -315,6 +316,16 @@ static inline void tvp5150_selmux(struct i2c_client *c)
tvp5150_write(c, TVP5150_OP_MODE_CTL, opmode);
tvp5150_write(c, TVP5150_VD_IN_SRC_SEL_1, input);
+
+ /* Svideo should enable YCrCb output and disable GPCL output
+ * For Composite and TV, it should be the reverse
+ */
+ val = tvp5150_read(c, TVP5150_MISC_CTL);
+ if (decoder->route.input == TVP5150_SVIDEO)
+ val = (val & ~0x40) | 0x10;
+ else
+ val = (val & ~0x10) | 0x40;
+ tvp5150_write(c, TVP5150_MISC_CTL, val);
};
struct i2c_reg_value {