diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-11-09 00:38:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:31 -0500 |
commit | c5d4a70ff82aab638b871debc9c8b27216cf1ecd (patch) | |
tree | 0528f65a92011ee0abde27c8195e85994d28f5d4 | |
parent | e2998e10a9ed47cb70a5be6207aa34b2f2f22c17 (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>
-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 b599f0554fb7..035dee4ce3f5 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) | |||
413 | 413 | ||
414 | msp->in_scart=in; | 414 | msp->in_scart=in; |
415 | 415 | ||
416 | if (in<=2) { | 416 | if (in >= 1 && in <= 8 && out >= 0 && out <= 2) { |
417 | if (-1 == scarts[out][in]) | 417 | if (-1 == scarts[out][in]) |
418 | return; | 418 | return; |
419 | 419 | ||
@@ -2120,10 +2120,11 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
2120 | case VIDIOC_G_AUDOUT: | 2120 | case VIDIOC_G_AUDOUT: |
2121 | { | 2121 | { |
2122 | struct v4l2_audioout *a=(struct v4l2_audioout *)arg; | 2122 | struct v4l2_audioout *a=(struct v4l2_audioout *)arg; |
2123 | int idx=a->index; | ||
2123 | 2124 | ||
2124 | memset(a,0,sizeof(*a)); | 2125 | memset(a,0,sizeof(*a)); |
2125 | 2126 | ||
2126 | switch (a->index) { | 2127 | switch (idx) { |
2127 | case 0: | 2128 | case 0: |
2128 | strcpy(a->name,"Scart1 Out"); | 2129 | strcpy(a->name,"Scart1 Out"); |
2129 | break; | 2130 | break; |
@@ -2152,8 +2153,8 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
2152 | else | 2153 | else |
2153 | msp->i2s_mode=0; | 2154 | msp->i2s_mode=0; |
2154 | } | 2155 | } |
2155 | printk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode); | 2156 | dprintk("Setting audio out on msp34xx to input %i, mode %i\n",a->index,msp->i2s_mode); |
2156 | msp3400c_set_scart(client,msp->in_scart,a->index); | 2157 | msp3400c_set_scart(client,msp->in_scart,a->index+1); |
2157 | 2158 | ||
2158 | break; | 2159 | break; |
2159 | } | 2160 | } |