diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-23 20:12:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-24 16:27:00 -0300 |
commit | 7fa033b103bc3f5c37f934695473f63adf140dba (patch) | |
tree | 7aa5fb9e81f2939e31acef2b26a2d6ef7728bfb0 /drivers/media/video/wm8775.c | |
parent | a20c522498330ba0f4970a9bcd11890312277ae2 (diff) | |
download | talos-obmc-linux-7fa033b103bc3f5c37f934695473f63adf140dba.tar.gz talos-obmc-linux-7fa033b103bc3f5c37f934695473f63adf140dba.zip |
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, void *arg) { struct wm8775_state *state = i2c_get_clientdata(client); - struct v4l2_audio *input = arg; + struct v4l2_routing *route = arg; struct v4l2_control *ctrl = arg; switch (cmd) { - case VIDIOC_S_AUDIO: + case VIDIOC_INT_G_AUDIO_ROUTING: + route->input = state->input; + route->output = 0; + break; + + case VIDIOC_INT_S_AUDIO_ROUTING: /* There are 4 inputs and one output. Zero or more inputs are multiplexed together to the output. Hence there are 16 combinations. If only one input is active (the normal case) then the input values 1, 2, 4 or 8 should be used. */ - if (input->index > 15) { - v4l_err(client, "Invalid input %d.\n", input->index); + if (route->input > 15) { + v4l_err(client, "Invalid input %d.\n", route->input); return -EINVAL; } - state->input = input->index; + state->input = route->input; if (state->muted) break; wm8775_write(client, R21, 0x0c0); |