aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cs53l32a.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-23 18:12:26 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 14:27:00 -0500
commit7fa033b103bc3f5c37f934695473f63adf140dba (patch)
tree7aa5fb9e81f2939e31acef2b26a2d6ef7728bfb0 /drivers/media/video/cs53l32a.c
parenta20c522498330ba0f4970a9bcd11890312277ae2 (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/cs53l32a.c')
-rw-r--r--drivers/media/video/cs53l32a.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c
index bc3331870240..de87247c74ee 100644
--- a/drivers/media/video/cs53l32a.c
+++ b/drivers/media/video/cs53l32a.c
@@ -59,20 +59,25 @@ static int cs53l32a_read(struct i2c_client *client, u8 reg)
59static int cs53l32a_command(struct i2c_client *client, unsigned int cmd, 59static int cs53l32a_command(struct i2c_client *client, unsigned int cmd,
60 void *arg) 60 void *arg)
61{ 61{
62 struct v4l2_audio *input = arg; 62 struct v4l2_routing *route = arg;
63 struct v4l2_control *ctrl = arg; 63 struct v4l2_control *ctrl = arg;
64 64
65 switch (cmd) { 65 switch (cmd) {
66 case VIDIOC_S_AUDIO: 66 case VIDIOC_INT_G_AUDIO_ROUTING:
67 route->input = (cs53l32a_read(client, 0x01) >> 4) & 3;
68 route->output = 0;
69 break;
70
71 case VIDIOC_INT_S_AUDIO_ROUTING:
67 /* There are 2 physical inputs, but the second input can be 72 /* There are 2 physical inputs, but the second input can be
68 placed in two modes, the first mode bypasses the PGA (gain), 73 placed in two modes, the first mode bypasses the PGA (gain),
69 the second goes through the PGA. Hence there are three 74 the second goes through the PGA. Hence there are three
70 possible inputs to choose from. */ 75 possible inputs to choose from. */
71 if (input->index > 2) { 76 if (route->input > 2) {
72 v4l_err(client, "Invalid input %d.\n", input->index); 77 v4l_err(client, "Invalid input %d.\n", route->input);
73 return -EINVAL; 78 return -EINVAL;
74 } 79 }
75 cs53l32a_write(client, 0x01, 0x01 + (input->index << 4)); 80 cs53l32a_write(client, 0x01, 0x01 + (route->input << 4));
76 break; 81 break;
77 82
78 case VIDIOC_G_CTRL: 83 case VIDIOC_G_CTRL: