diff options
Diffstat (limited to 'drivers/media/video/tvp5150.c')
-rw-r--r-- | drivers/media/video/tvp5150.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 4aea84a392e8..2d38e253f14e 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -69,7 +69,8 @@ struct tvp5150 { | |||
69 | struct v4l2_subdev sd; | 69 | struct v4l2_subdev sd; |
70 | 70 | ||
71 | v4l2_std_id norm; /* Current set standard */ | 71 | v4l2_std_id norm; /* Current set standard */ |
72 | struct v4l2_routing route; | 72 | u32 input; |
73 | u32 output; | ||
73 | int enable; | 74 | int enable; |
74 | int bright; | 75 | int bright; |
75 | int contrast; | 76 | int contrast; |
@@ -280,10 +281,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd) | |||
280 | int input = 0; | 281 | int input = 0; |
281 | unsigned char val; | 282 | unsigned char val; |
282 | 283 | ||
283 | if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable) | 284 | if ((decoder->output & TVP5150_BLACK_SCREEN) || !decoder->enable) |
284 | input = 8; | 285 | input = 8; |
285 | 286 | ||
286 | switch (decoder->route.input) { | 287 | switch (decoder->input) { |
287 | case TVP5150_COMPOSITE1: | 288 | case TVP5150_COMPOSITE1: |
288 | input |= 2; | 289 | input |= 2; |
289 | /* fall through */ | 290 | /* fall through */ |
@@ -299,8 +300,8 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd) | |||
299 | 300 | ||
300 | v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i, output=%i " | 301 | v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i, output=%i " |
301 | "=> tvp5150 input=%i, opmode=%i\n", | 302 | "=> tvp5150 input=%i, opmode=%i\n", |
302 | decoder->route.input,decoder->route.output, | 303 | decoder->input, decoder->output, |
303 | input, opmode ); | 304 | input, opmode); |
304 | 305 | ||
305 | tvp5150_write(sd, TVP5150_OP_MODE_CTL, opmode); | 306 | tvp5150_write(sd, TVP5150_OP_MODE_CTL, opmode); |
306 | tvp5150_write(sd, TVP5150_VD_IN_SRC_SEL_1, input); | 307 | tvp5150_write(sd, TVP5150_VD_IN_SRC_SEL_1, input); |
@@ -309,7 +310,7 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd) | |||
309 | * For Composite and TV, it should be the reverse | 310 | * For Composite and TV, it should be the reverse |
310 | */ | 311 | */ |
311 | val = tvp5150_read(sd, TVP5150_MISC_CTL); | 312 | val = tvp5150_read(sd, TVP5150_MISC_CTL); |
312 | if (decoder->route.input == TVP5150_SVIDEO) | 313 | if (decoder->input == TVP5150_SVIDEO) |
313 | val = (val & ~0x40) | 0x10; | 314 | val = (val & ~0x40) | 0x10; |
314 | else | 315 | else |
315 | val = (val & ~0x10) | 0x40; | 316 | val = (val & ~0x10) | 0x40; |
@@ -878,11 +879,13 @@ static int tvp5150_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
878 | I2C Command | 879 | I2C Command |
879 | ****************************************************************************/ | 880 | ****************************************************************************/ |
880 | 881 | ||
881 | static int tvp5150_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) | 882 | static int tvp5150_s_routing(struct v4l2_subdev *sd, |
883 | u32 input, u32 output, u32 config) | ||
882 | { | 884 | { |
883 | struct tvp5150 *decoder = to_tvp5150(sd); | 885 | struct tvp5150 *decoder = to_tvp5150(sd); |
884 | 886 | ||
885 | decoder->route = *route; | 887 | decoder->input = input; |
888 | decoder->output = output; | ||
886 | tvp5150_selmux(sd); | 889 | tvp5150_selmux(sd); |
887 | return 0; | 890 | return 0; |
888 | } | 891 | } |
@@ -1077,7 +1080,7 @@ static int tvp5150_probe(struct i2c_client *c, | |||
1077 | c->addr << 1, c->adapter->name); | 1080 | c->addr << 1, c->adapter->name); |
1078 | 1081 | ||
1079 | core->norm = V4L2_STD_ALL; /* Default is autodetect */ | 1082 | core->norm = V4L2_STD_ALL; /* Default is autodetect */ |
1080 | core->route.input = TVP5150_COMPOSITE1; | 1083 | core->input = TVP5150_COMPOSITE1; |
1081 | core->enable = 1; | 1084 | core->enable = 1; |
1082 | core->bright = 128; | 1085 | core->bright = 128; |
1083 | core->contrast = 128; | 1086 | core->contrast = 128; |