Forráskód Böngészése

[PATCH] v4l: BTTV updates and card additions

- Remove $Id CVS logs for V4L files
- Added DVICO FusionHDTV 5 Lite card.
- Added Acorp Y878F.
- CodingStyle fixes.
- Added tuner_addr to bttv cards structure.
- linux/version.h replaced by linux/utsname.h on bttvp.h
- kernel module for acquiring RDS data from a SAA6588.
- Allow multiple open() and reading calls to /dev/radio on bttv-driver.c
- added i2c address for lgdt330x.

Signed-off-by: Hans J. Koch <koch@hjk-az.de>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
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>
Mauro Carvalho Chehab 19 éve
szülő
commit
24a70fdce8

+ 2 - 0
Documentation/video4linux/CARDLIST.bttv

@@ -133,3 +133,5 @@ card=131 - Tibet Systems 'Progress DVR' CS16
 card=132 - Kodicom 4400R (master)
 card=133 - Kodicom 4400R (slave)
 card=134 - Adlink RTV24
+card=135 - DVICO FusionHDTV 5 Lite
+card=136 - Acorp Y878F

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 248 - 166
drivers/media/video/bttv-cards.c


+ 40 - 8
drivers/media/video/bttv-driver.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-driver.c,v 1.52 2005/08/04 00:55:16 mchehab Exp $
 
     bttv - Bt848 frame grabber driver
 
@@ -42,6 +41,9 @@
 
 #include "bttvp.h"
 
+#include "rds.h"
+
+
 unsigned int bttv_num;			/* number of Bt848s in use */
 struct bttv bttvs[BTTV_MAX];
 
@@ -3128,15 +3130,12 @@ static int radio_open(struct inode *inode, struct file *file)
 
 	dprintk("bttv%d: open called (radio)\n",btv->c.nr);
 	down(&btv->lock);
-	if (btv->radio_user) {
-		up(&btv->lock);
-		return -EBUSY;
-	}
+
 	btv->radio_user++;
+
 	file->private_data = btv;
 
-	i2c_vidiocschan(btv);
-        bttv_call_i2c_clients(btv,AUDC_SET_RADIO,&btv->tuner_type);
+	bttv_call_i2c_clients(btv,AUDC_SET_RADIO,&btv->tuner_type);
 	audio_mux(btv,AUDIO_RADIO);
 
 	up(&btv->lock);
@@ -3145,9 +3144,13 @@ static int radio_open(struct inode *inode, struct file *file)
 
 static int radio_release(struct inode *inode, struct file *file)
 {
-	struct bttv    *btv = file->private_data;
+	struct bttv        *btv = file->private_data;
+	struct rds_command cmd;
 
 	btv->radio_user--;
+
+	bttv_call_i2c_clients(btv, RDS_CMD_CLOSE, &cmd);
+
 	return 0;
 }
 
@@ -3203,13 +3206,42 @@ static int radio_ioctl(struct inode *inode, struct file *file,
 	return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
 }
 
+static ssize_t radio_read(struct file *file, char __user *data,
+			 size_t count, loff_t *ppos)
+{
+	struct bttv    *btv = file->private_data;
+	struct rds_command cmd;
+	cmd.block_count = count/3;
+	cmd.buffer = data;
+	cmd.instance = file;
+	cmd.result = -ENODEV;
+
+	bttv_call_i2c_clients(btv, RDS_CMD_READ, &cmd);
+
+	return cmd.result;
+}
+
+static unsigned int radio_poll(struct file *file, poll_table *wait)
+{
+	struct bttv    *btv = file->private_data;
+	struct rds_command cmd;
+	cmd.instance = file;
+	cmd.event_list = wait;
+	cmd.result = -ENODEV;
+	bttv_call_i2c_clients(btv, RDS_CMD_POLL, &cmd);
+
+	return cmd.result;
+}
+
 static struct file_operations radio_fops =
 {
 	.owner	  = THIS_MODULE,
 	.open	  = radio_open,
+	.read     = radio_read,
 	.release  = radio_release,
 	.ioctl	  = radio_ioctl,
 	.llseek	  = no_llseek,
+	.poll     = radio_poll,
 };
 
 static struct video_device radio_template =

+ 0 - 1
drivers/media/video/bttv-gpio.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-gpio.c,v 1.7 2005/02/16 12:14:10 kraxel Exp $
 
     bttv-gpio.c  --  gpio sub drivers
 

+ 1 - 1
drivers/media/video/bttv-i2c.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-i2c.c,v 1.25 2005/07/05 17:37:35 nsh Exp $
 
     bttv-i2c.c  --  all the i2c code is here
 
@@ -381,6 +380,7 @@ void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
 }
 
 static char *i2c_devs[128] = {
+	[ 0x1c >> 1 ] = "lgdt330x",
 	[ 0x30 >> 1 ] = "IR (hauppauge)",
 	[ 0x80 >> 1 ] = "msp34xx",
 	[ 0x86 >> 1 ] = "tda9887",

+ 0 - 1
drivers/media/video/bttv-if.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-if.c,v 1.4 2004/11/17 18:47:47 kraxel Exp $
 
     bttv-if.c  --  old gpio interface to other kernel modules
                    don't use in new code, will go away in 2.7

+ 0 - 1
drivers/media/video/bttv-risc.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-risc.c,v 1.10 2004/11/19 18:07:12 kraxel Exp $
 
     bttv-risc.c  --  interfaces to other kernel modules
 

+ 0 - 1
drivers/media/video/bttv-vbi.c

@@ -1,5 +1,4 @@
 /*
-    $Id: bttv-vbi.c,v 1.9 2005/01/13 17:22:33 kraxel Exp $
 
     bttv - Bt848 frame grabber driver
     vbi interface

+ 2 - 1
drivers/media/video/bttv.h

@@ -1,5 +1,4 @@
 /*
- * $Id: bttv.h,v 1.22 2005/07/28 18:41:21 mchehab Exp $
  *
  *  bttv - Bt848 frame grabber driver
  *
@@ -218,6 +217,8 @@ struct tvcard
 #define PLL_35   2
 
 	unsigned int tuner_type;
+	unsigned int tuner_addr;
+
 	unsigned int has_radio;
 	void (*audio_hook)(struct bttv *btv, struct video_audio *v, int set);
 	void (*muxsel_hook)(struct bttv *btv, unsigned int input);

+ 1 - 2
drivers/media/video/bttvp.h

@@ -1,5 +1,4 @@
 /*
-    $Id: bttvp.h,v 1.21 2005/07/15 21:44:14 mchehab Exp $
 
     bttv - Bt848 frame grabber driver
 
@@ -26,7 +25,7 @@
 #ifndef _BTTVP_H_
 #define _BTTVP_H_
 
-#include <linux/version.h>
+#include <linux/utsname.h>
 #define BTTV_VERSION_CODE KERNEL_VERSION(0,9,16)
 
 #include <linux/types.h>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott