aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-08 21:38:50 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:56:31 -0800
commitc5d4a70ff82aab638b871debc9c8b27216cf1ecd (patch)
tree0528f65a92011ee0abde27c8195e85994d28f5d4 /drivers
parente2998e10a9ed47cb70a5be6207aa34b2f2f22c17 (diff)
[PATCH] V4L: 916: fixes set scart parameter definitions and audout ioctl
Fixes set_scart parameter definitions and AUDOUT ioctl Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/msp3400.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c
index b599f0554fb..035dee4ce3f 100644
--- a/drivers/media/video/msp3400.c
+++ b/drivers/media/video/msp3400.c
@@ -413,7 +413,7 @@ static void msp3400c_set_scart(struct i2c_client *client, int in, int out)
msp->in_scart=in;
- if (in<=2) {
+ if (in >= 1 && in <= 8 && out >= 0 && out <= 2) {
if (-1 == scarts[out][in])
return;
@@ -2120,10 +2120,11 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOC_G_AUDOUT:
{
struct v4l2_audioout *a=(struct v4l2_audioout *)arg;
+ int idx=a->index;
memset(a,0,sizeof(*a));
- switch (a->index) {
+ switch (idx) {
case 0:
strcpy(a->name,"Scart1 Out");
break;
@@ -2152,8 +2153,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
else
msp->i2s_mode=0;
}
-printk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode);
- msp3400c_set_scart(client,msp->in_scart,a->index);
+ dprintk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode);
+ msp3400c_set_scart(client,msp->in_scart,a->index+1);
break;
}