diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-08 21:38:50 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 07:56:31 -0800 |
commit | c5d4a70ff82aab638b871debc9c8b27216cf1ecd (patch) | |
tree | 0528f65a92011ee0abde27c8195e85994d28f5d4 /drivers/media | |
parent | e2998e10a9ed47cb70a5be6207aa34b2f2f22c17 (diff) | |
download | linux-3.10-c5d4a70ff82aab638b871debc9c8b27216cf1ecd.tar.gz linux-3.10-c5d4a70ff82aab638b871debc9c8b27216cf1ecd.tar.bz2 linux-3.10-c5d4a70ff82aab638b871debc9c8b27216cf1ecd.zip |
[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/media')
-rw-r--r-- | drivers/media/video/msp3400.c | 9 |
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; } |