Commit c5d4a70f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

[PATCH] V4L: 916: fixes set scart parameter definitions and audout ioctl

Fixes set_scart parameter definitions and AUDOUT ioctl
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e2998e10
...@@ -413,7 +413,7 @@ static void msp3400c_set_scart(struct i2c_client *client, int in, int out) ...@@ -413,7 +413,7 @@ static void msp3400c_set_scart(struct i2c_client *client, int in, int out)
msp->in_scart=in; msp->in_scart=in;
if (in<=2) { if (in >= 1 && in <= 8 && out >= 0 && out <= 2) {
if (-1 == scarts[out][in]) if (-1 == scarts[out][in])
return; return;
...@@ -2120,10 +2120,11 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -2120,10 +2120,11 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOC_G_AUDOUT: case VIDIOC_G_AUDOUT:
{ {
struct v4l2_audioout *a=(struct v4l2_audioout *)arg; struct v4l2_audioout *a=(struct v4l2_audioout *)arg;
int idx=a->index;
memset(a,0,sizeof(*a)); memset(a,0,sizeof(*a));
switch (a->index) { switch (idx) {
case 0: case 0:
strcpy(a->name,"Scart1 Out"); strcpy(a->name,"Scart1 Out");
break; break;
...@@ -2152,8 +2153,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -2152,8 +2153,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
else else
msp->i2s_mode=0; msp->i2s_mode=0;
} }
printk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode); 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); msp3400c_set_scart(client,msp->in_scart,a->index+1);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment