summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-11-05 23:51:10 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-11-05 23:51:10 +0000
commit1e7b8dee73f36d53303c453994cf6f4a9fde738b (patch)
tree55ecdf80b366504dad9f42062584f8a5af4e26f7 /linux/drivers/media/video
parentbeda7f49d19164696901cf82198d4d2dd28533c1 (diff)
downloadmediapointer-dvb-s2-1e7b8dee73f36d53303c453994cf6f4a9fde738b.tar.gz
mediapointer-dvb-s2-1e7b8dee73f36d53303c453994cf6f4a9fde738b.tar.bz2
- Fixes set_scart parameter definitions and AUDOUT ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/msp3400-driver.c9
-rw-r--r--linux/drivers/media/video/msp3400.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 288d6a909..60afdac9a 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -426,7 +426,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;
@@ -2195,10 +2195,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;
@@ -2227,8 +2228,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;
}
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index 288d6a909..60afdac9a 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -426,7 +426,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;
@@ -2195,10 +2195,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;
@@ -2227,8 +2228,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;
}