summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-16 03:23:33 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-16 03:23:33 +0000
commit05353ab5a232caae632667698348a6db0c4125b2 (patch)
tree74daabfbffd3c2a8133f9f1bebd3fe8ce73b629e /linux/drivers
parent069ea508eeb8e9d9ec6eabba697ad2b816278d8d (diff)
downloadmediapointer-dvb-s2-05353ab5a232caae632667698348a6db0c4125b2.tar.gz
mediapointer-dvb-s2-05353ab5a232caae632667698348a6db0c4125b2.tar.bz2
- This patch adds the VIDIOC_LOG_STATUS to videodev2.h and adds
LOG_STATUS support to tda9887.c and bttv-driver.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/bttv-driver.c8
-rw-r--r--linux/drivers/media/video/tda9887.c29
2 files changed, 24 insertions, 13 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 839e69dc9..353eec005 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.62 2005/10/15 17:02:48 nsh Exp $
+ $Id: bttv-driver.c,v 1.63 2005/10/16 03:23:33 mchehab Exp $
bttv - Bt848 frame grabber driver
@@ -1875,6 +1875,11 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
up(&btv->lock);
return 0;
}
+ case VIDIOC_LOG_STATUS:
+ {
+ bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, 0);
+ return 0;
+ }
default:
return -ENOIOCTLCMD;
@@ -2882,6 +2887,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_S_TUNER:
case VIDIOC_G_FREQUENCY:
case VIDIOC_S_FREQUENCY:
+ case VIDIOC_LOG_STATUS:
return bttv_common_ioctls(btv,cmd,arg);
default:
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 6d5e9ef46..67dc0f8d8 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -68,6 +68,7 @@ struct tda9887 {
unsigned int pinnacle_id;
unsigned int using_v4l2;
unsigned int radio_mode;
+ unsigned char data[4];
};
struct tvnorm {
@@ -589,23 +590,22 @@ static int tda9887_status(struct tda9887 *t)
static int tda9887_configure(struct tda9887 *t)
{
- unsigned char buf[4];
int rc;
- memset(buf,0,sizeof(buf));
- tda9887_set_tvnorm(t,buf);
+ memset(t->data,0,sizeof(t->data));
+ tda9887_set_tvnorm(t,t->data);
- buf[1] |= cOutputPort1Inactive;
- buf[1] |= cOutputPort2Inactive;
+ t->data[1] |= cOutputPort1Inactive;
+ t->data[1] |= cOutputPort2Inactive;
if (UNSET != t->pinnacle_id) {
- tda9887_set_pinnacle(t,buf);
+ tda9887_set_pinnacle(t,t->data);
}
- tda9887_set_config(t,buf);
- tda9887_set_insmod(t,buf);
+ tda9887_set_config(t,t->data);
+ tda9887_set_insmod(t,t->data);
if (t->mode == T_STANDBY) {
- buf[1] |= cForcedMuteAudioON;
+ t->data[1] |= cForcedMuteAudioON;
}
#if 0
@@ -619,11 +619,11 @@ static int tda9887_configure(struct tda9887 *t)
#endif
tda9887_dbg("writing: b=0x%02x c=0x%02x e=0x%02x\n",
- buf[1],buf[2],buf[3]);
+ t->data[1],t->data[2],t->data[3]);
if (debug > 1)
- dump_write_message(t, buf);
+ dump_write_message(t, t->data);
- if (4 != (rc = i2c_master_send(&t->client,buf,4)))
+ if (4 != (rc = i2c_master_send(&t->client,t->data,4)))
tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc);
if (debug > 2) {
@@ -821,6 +821,11 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
break;
}
+ case VIDIOC_LOG_STATUS:
+ {
+ tda9887_info("Data bytes: b=%02x c=%02x e=%02x\n", t->data[1], t->data[2], t->data[3]);
+ break;
+ }
default:
/* nothing */
break;