aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tea6420.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tea6420.c')
-rw-r--r--drivers/media/video/tea6420.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c
index 8a55b46ea9b7..ced6eadf347a 100644
--- a/drivers/media/video/tea6420.c
+++ b/drivers/media/video/tea6420.c
@@ -48,15 +48,15 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
48 48
49/* make a connection between the input 'i' and the output 'o' 49/* make a connection between the input 'i' and the output 'o'
50 with gain 'g' (note: i = 6 means 'mute') */ 50 with gain 'g' (note: i = 6 means 'mute') */
51static int tea6420_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) 51static int tea6420_s_routing(struct v4l2_subdev *sd,
52 u32 i, u32 o, u32 config)
52{ 53{
53 struct i2c_client *client = v4l2_get_subdevdata(sd); 54 struct i2c_client *client = v4l2_get_subdevdata(sd);
54 int i = route->input; 55 int g = (o >> 4) & 0xf;
55 int o = route->output & 0xf;
56 int g = (route->output >> 4) & 0xf;
57 u8 byte; 56 u8 byte;
58 int ret; 57 int ret;
59 58
59 o &= 0xf;
60 v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g); 60 v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g);
61 61
62 /* check if the parameters are valid */ 62 /* check if the parameters are valid */
@@ -133,13 +133,8 @@ static int tea6420_probe(struct i2c_client *client,
133 133
134 /* set initial values: set "mute"-input to all outputs at gain 0 */ 134 /* set initial values: set "mute"-input to all outputs at gain 0 */
135 err = 0; 135 err = 0;
136 for (i = 1; i < 5; i++) { 136 for (i = 1; i < 5; i++)
137 struct v4l2_routing route; 137 err += tea6420_s_routing(sd, 6, i, 0);
138
139 route.input = 6;
140 route.output = i;
141 err += tea6420_s_routing(sd, &route);
142 }
143 if (err) { 138 if (err) {
144 v4l_dbg(1, debug, client, "could not initialize tea6420\n"); 139 v4l_dbg(1, debug, client, "could not initialize tea6420\n");
145 return -ENODEV; 140 return -ENODEV;