diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-23 18:12:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-24 14:27:00 -0500 |
commit | 7fa033b103bc3f5c37f934695473f63adf140dba (patch) | |
tree | 7aa5fb9e81f2939e31acef2b26a2d6ef7728bfb0 /drivers/media/video/wm8775.c | |
parent | a20c522498330ba0f4970a9bcd11890312277ae2 (diff) |
V4L/DVB (3599): Implement new routing commands for wm8775 and cs53l32a.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/wm8775.c')
-rw-r--r-- | drivers/media/video/wm8775.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index 9b90225226e6..d81a88bbe43d 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -79,21 +79,26 @@ static int wm8775_command(struct i2c_client *client, unsigned int cmd, | |||
79 | void *arg) | 79 | void *arg) |
80 | { | 80 | { |
81 | struct wm8775_state *state = i2c_get_clientdata(client); | 81 | struct wm8775_state *state = i2c_get_clientdata(client); |
82 | struct v4l2_audio *input = arg; | 82 | struct v4l2_routing *route = arg; |
83 | struct v4l2_control *ctrl = arg; | 83 | struct v4l2_control *ctrl = arg; |
84 | 84 | ||
85 | switch (cmd) { | 85 | switch (cmd) { |
86 | case VIDIOC_S_AUDIO: | 86 | case VIDIOC_INT_G_AUDIO_ROUTING: |
87 | route->input = state->input; | ||
88 | route->output = 0; | ||
89 | break; | ||
90 | |||
91 | case VIDIOC_INT_S_AUDIO_ROUTING: | ||
87 | /* There are 4 inputs and one output. Zero or more inputs | 92 | /* There are 4 inputs and one output. Zero or more inputs |
88 | are multiplexed together to the output. Hence there are | 93 | are multiplexed together to the output. Hence there are |
89 | 16 combinations. | 94 | 16 combinations. |
90 | If only one input is active (the normal case) then the | 95 | If only one input is active (the normal case) then the |
91 | input values 1, 2, 4 or 8 should be used. */ | 96 | input values 1, 2, 4 or 8 should be used. */ |
92 | if (input->index > 15) { | 97 | if (route->input > 15) { |
93 | v4l_err(client, "Invalid input %d.\n", input->index); | 98 | v4l_err(client, "Invalid input %d.\n", route->input); |
94 | return -EINVAL; | 99 | return -EINVAL; |
95 | } | 100 | } |
96 | state->input = input->index; | 101 | state->input = route->input; |
97 | if (state->muted) | 102 | if (state->muted) |
98 | break; | 103 | break; |
99 | wm8775_write(client, R21, 0x0c0); | 104 | wm8775_write(client, R21, 0x0c0); |