aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/tvp5150.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-12-21 22:21:08 +1100
committerPaul Mackerras <paulus@samba.org>2007-12-21 22:21:08 +1100
commitc2a7dcad9f0d92d7a96e735abb8bec7b9c621536 (patch)
treebf9b20fdd5ab07e5b0e4e0b95c6a3dbab1005cb9 /drivers/media/video/tvp5150.c
parent373a6da165ac3012a74fd072da340eabca55d031 (diff)
parentea67db4cdbbf7f4e74150e71da0984e25121f500 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/media/video/tvp5150.c')
-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 25d0aef88ef..445eba4174d 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 {