aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2005-11-09 00:37:42 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:20 -0500
commit299392bf2040fc53ebfc94363ac0abdd0f0bf619 (patch)
tree2ea989ebf59a4478921c49897a3b511477e3d4f7 /drivers/media/video
parentc58c21c7a2ef7d1eb45231d5c1bb24d88a9666b8 (diff)
[PATCH] v4l: 798: this patch adds the vidioc log status to videodev2 h and adds
- 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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/bttv-driver.c6
-rw-r--r--drivers/media/video/tda9887.c29
2 files changed, 23 insertions, 12 deletions
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c
index 058b923b4b13..f8307407e320 100644
--- a/drivers/media/video/bttv-driver.c
+++ b/drivers/media/video/bttv-driver.c
@@ -1851,6 +1851,11 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1851 up(&btv->lock); 1851 up(&btv->lock);
1852 return 0; 1852 return 0;
1853 } 1853 }
1854 case VIDIOC_LOG_STATUS:
1855 {
1856 bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, 0);
1857 return 0;
1858 }
1854 1859
1855 default: 1860 default:
1856 return -ENOIOCTLCMD; 1861 return -ENOIOCTLCMD;
@@ -2856,6 +2861,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2856 case VIDIOC_S_TUNER: 2861 case VIDIOC_S_TUNER:
2857 case VIDIOC_G_FREQUENCY: 2862 case VIDIOC_G_FREQUENCY:
2858 case VIDIOC_S_FREQUENCY: 2863 case VIDIOC_S_FREQUENCY:
2864 case VIDIOC_LOG_STATUS:
2859 return bttv_common_ioctls(btv,cmd,arg); 2865 return bttv_common_ioctls(btv,cmd,arg);
2860 2866
2861 default: 2867 default:
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index 796110d4ff72..6d2914f738f2 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -60,6 +60,7 @@ struct tda9887 {
60 unsigned int pinnacle_id; 60 unsigned int pinnacle_id;
61 unsigned int using_v4l2; 61 unsigned int using_v4l2;
62 unsigned int radio_mode; 62 unsigned int radio_mode;
63 unsigned char data[4];
63}; 64};
64 65
65struct tvnorm { 66struct tvnorm {
@@ -575,32 +576,31 @@ static int tda9887_status(struct tda9887 *t)
575 576
576static int tda9887_configure(struct tda9887 *t) 577static int tda9887_configure(struct tda9887 *t)
577{ 578{
578 unsigned char buf[4];
579 int rc; 579 int rc;
580 580
581 memset(buf,0,sizeof(buf)); 581 memset(t->data,0,sizeof(t->data));
582 tda9887_set_tvnorm(t,buf); 582 tda9887_set_tvnorm(t,t->data);
583 583
584 buf[1] |= cOutputPort1Inactive; 584 t->data[1] |= cOutputPort1Inactive;
585 buf[1] |= cOutputPort2Inactive; 585 t->data[1] |= cOutputPort2Inactive;
586 586
587 if (UNSET != t->pinnacle_id) { 587 if (UNSET != t->pinnacle_id) {
588 tda9887_set_pinnacle(t,buf); 588 tda9887_set_pinnacle(t,t->data);
589 } 589 }
590 tda9887_set_config(t,buf); 590 tda9887_set_config(t,t->data);
591 tda9887_set_insmod(t,buf); 591 tda9887_set_insmod(t,t->data);
592 592
593 if (t->mode == T_STANDBY) { 593 if (t->mode == T_STANDBY) {
594 buf[1] |= cForcedMuteAudioON; 594 t->data[1] |= cForcedMuteAudioON;
595 } 595 }
596 596
597 597
598 tda9887_dbg("writing: b=0x%02x c=0x%02x e=0x%02x\n", 598 tda9887_dbg("writing: b=0x%02x c=0x%02x e=0x%02x\n",
599 buf[1],buf[2],buf[3]); 599 t->data[1],t->data[2],t->data[3]);
600 if (debug > 1) 600 if (debug > 1)
601 dump_write_message(t, buf); 601 dump_write_message(t, t->data);
602 602
603 if (4 != (rc = i2c_master_send(&t->client,buf,4))) 603 if (4 != (rc = i2c_master_send(&t->client,t->data,4)))
604 tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc); 604 tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc);
605 605
606 if (debug > 2) { 606 if (debug > 2) {
@@ -785,6 +785,11 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
785 } 785 }
786 break; 786 break;
787 } 787 }
788 case VIDIOC_LOG_STATUS:
789 {
790 tda9887_info("Data bytes: b=%02x c=%02x e=%02x\n", t->data[1], t->data[2], t->data[3]);
791 break;
792 }
788 default: 793 default:
789 /* nothing */ 794 /* nothing */
790 break; 795 break;