summaryrefslogtreecommitdiffstats
path: root/drivers/char/bttv.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /drivers/char/bttv.h
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'drivers/char/bttv.h')
-rw-r--r--drivers/char/bttv.h52
1 files changed, 40 insertions, 12 deletions
diff --git a/drivers/char/bttv.h b/drivers/char/bttv.h
index f780de12b..ba6c52af4 100644
--- a/drivers/char/bttv.h
+++ b/drivers/char/bttv.h
@@ -21,7 +21,7 @@
#ifndef _BTTV_H_
#define _BTTV_H_
-#define TEST_VBI
+#define BTTV_VERSION_CODE 0x000523
#include <linux/types.h>
#include <linux/wait.h>
@@ -31,8 +31,13 @@
#include "bt848.h"
#include <linux/videodev.h>
+#ifndef O_NONCAP
+#define O_NONCAP O_TRUNC
+#endif
+
#define MAX_GBUFFERS 2
#define RISCMEM_LEN (32744*2)
+#define VBIBUF_SIZE 65536
/* maximum needed buffer size for extended VBI frame mode capturing */
#define BTTV_MAX_FBUF 0x190000
@@ -56,11 +61,20 @@ struct bttv_window
};
struct bttv_pll_info {
- unsigned int pll_ifreq; /* PLL input frequency */
- unsigned int pll_ofreq; /* PLL output frequency */
- unsigned int pll_crystal; /* Crystal used for input */
- unsigned int pll_current; /* Current programmed ofrq*/
+ unsigned int pll_ifreq; /* PLL input frequency */
+ unsigned int pll_ofreq; /* PLL output frequency */
+ unsigned int pll_crystal; /* Crystal used for input */
+ unsigned int pll_current; /* Currently programmed ofreq */
+};
+
+/* Per-open data for handling multiple opens on one device */
+struct device_open
+{
+ int isopen;
+ int noncapturing;
+ struct bttv *dev;
};
+#define MAX_OPENS 3
struct bttv
{
@@ -70,6 +84,10 @@ struct bttv
struct video_picture picture; /* Current picture params */
struct video_audio audio_dev; /* Current audio params */
+ int user;
+ int capuser;
+ struct device_open open_data[MAX_OPENS];
+
struct i2c_bus i2c;
int have_msp3400;
int have_tuner;
@@ -78,9 +96,12 @@ struct bttv
unsigned int nr;
unsigned short id;
+#if LINUX_VERSION_CODE < 0x020100
unsigned char bus; /* PCI bus the Bt848 is on */
unsigned char devfn;
+#else
struct pci_dev *dev;
+#endif
unsigned char irq; /* IRQ used by Bt848 card */
unsigned char revision;
unsigned int bt848_adr; /* bus address of IO mem returned by PCI BIOS */
@@ -92,7 +113,6 @@ struct bttv
struct bttv_window win;
int type; /* card type */
int audio; /* audio mode */
- int user;
int audio_chip;
int radio;
@@ -115,7 +135,7 @@ struct bttv
struct gbuffer *ogbuffers;
struct gbuffer *egbuffers;
u16 gwidth, gheight, gfmt;
- u16 gwidth_next, gheight_next, gfmt_next;
+ u16 gwidth_next, gheight_next, gfmt_next;
u32 *grisc;
unsigned long gro;
@@ -143,7 +163,6 @@ struct bttv
int i2c_command;
int triton1;
};
-
#endif
/*The following should be done in more portable way. It depends on define
@@ -165,12 +184,11 @@ struct bttv
#define BTTV_READEE _IOW('v', BASE_VIDIOCPRIVATE+0, char [256])
#define BTTV_WRITEE _IOR('v', BASE_VIDIOCPRIVATE+1, char [256])
-#define BTTV_GRAB _IOR('v' , BASE_VIDIOCPRIVATE+2, struct gbuf)
#define BTTV_FIELDNR _IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int)
#define BTTV_PLLSET _IOW('v' , BASE_VIDIOCPRIVATE+3, struct bttv_pll_info)
-#define BTTV_BURST_ON _IOR('v' , BASE_VIDIOCPRIVATE+4, int)
-#define BTTV_BURST_OFF _IOR('v' , BASE_VIDIOCPRIVATE+5, int)
-#define BTTV_NAGRAVERSION _IOR('v' , BASE_VIDIOCPRIVATE+6, int)
+#define BTTV_BURST_ON _IOR('v' , BASE_VIDIOCPRIVATE+4, int)
+#define BTTV_BURST_OFF _IOR('v' , BASE_VIDIOCPRIVATE+5, int)
+#define BTTV_VERSION _IOR('v' , BASE_VIDIOCPRIVATE+6, int)
#define BTTV_PICNR _IOR('v' , BASE_VIDIOCPRIVATE+7, int)
@@ -187,6 +205,8 @@ struct bttv
#define BTTV_HAUPPAUGE878 0x0a
#define BTTV_MIROPRO 0x0b
#define BTTV_ADSTECH_TV 0x0c
+#define BTTV_AVERMEDIA98 0x0d
+#define BTTV_VHX 0x0e
#define AUDIO_TUNER 0x00
#define AUDIO_RADIO 0x01
@@ -199,12 +219,20 @@ struct bttv
#define TDA9850 0x01
#define TDA8425 0x02
+#define TDA9840 0x03
#define I2C_TSA5522 0xc2
+#define I2C_TDA9840 0x84
#define I2C_TDA9850 0xb6
#define I2C_TDA8425 0x82
#define I2C_HAUPEE 0xa0
#define I2C_STBEE 0xae
+#define I2C_VHX 0xc0
+
+#define TDA9840_SW 0x00
+#define TDA9840_LVADJ 0x02
+#define TDA9840_STADJ 0x03
+#define TDA9840_TEST 0x04
#define TDA9850_CON1 0x04
#define TDA9850_CON2 0x05