summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvp5150.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-08-18 07:31:10 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-08-18 07:31:10 -0300
commitb3695963b44851ccb50ee0dcd1e4e9ad19795784 (patch)
treea83292fe4ac3b030e0c6458ca1e6da54107dedcc /linux/drivers/media/video/tvp5150.c
parentdf6dfbf4e5ec7073afef3a4b5c3f3c4e88aba010 (diff)
downloadmediapointer-dvb-s2-b3695963b44851ccb50ee0dcd1e4e9ad19795784.tar.gz
mediapointer-dvb-s2-b3695963b44851ccb50ee0dcd1e4e9ad19795784.tar.bz2
TVP5150 routing logic were broken.
From: Mauro Carvalho Chehab <mchehab@infradead.org> As pointed by The Coverity checker, commit c7c0b34c27bbf0671807e902fbfea6270c8f138d broked input selection. Thanks-to: Adrian Bunk <bunk@stusta.de> for pointing this CC: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tvp5150.c')
-rw-r--r--linux/drivers/media/video/tvp5150.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c
index 7cafcd52b..c611ffc4d 100644
--- a/linux/drivers/media/video/tvp5150.c
+++ b/linux/drivers/media/video/tvp5150.c
@@ -325,7 +325,7 @@ static inline void tvp5150_selmux(struct i2c_client *c)
if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable)
input = 8;
- switch (input) {
+ switch (decoder->route.input) {
case TVP5150_COMPOSITE1:
input |= 2;
/* fall through */
@@ -339,6 +339,11 @@ static inline void tvp5150_selmux(struct i2c_client *c)
break;
}
+ tvp5150_dbg( 1, "Selecting video route: route input=%i, output=%i "
+ "=> tvp5150 input=%i, opmode=%i\n",
+ decoder->route.input,decoder->route.output,
+ input, opmode );
+
tvp5150_write(c, TVP5150_OP_MODE_CTL, opmode);
tvp5150_write(c, TVP5150_VD_IN_SRC_SEL_1, input);
};