Skip to content

Commit

Permalink
V4L/DVB (4506): TVP5150 routing logic were broken.
Browse files Browse the repository at this point in the history
As pointed by The Coverity checker, commit
c7c0b34 broked input selection.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Sep 26, 2006
1 parent e738e35 commit 12500f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/media/video/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,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 */
Expand All @@ -308,6 +308,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);
};
Expand Down

0 comments on commit 12500f0

Please sign in to comment.