aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-11-09 00:37:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 10:56:17 -0500
commit596d92d5128d308b5a79f21c3e72c87f5fc7e58b (patch)
tree3957529296b0765e7979f205a9dd0bce7de1eb7a /drivers/media/video/em28xx/em28xx.h
parent2b5200a7b19a53969db68c97d379339592ca6a4f (diff)
[PATCH] v4l: 767: included support for em2800
- Included support for em2800. 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/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 7779121a3dea..4115938a1731 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -1,5 +1,5 @@
1/* 1/*
2 em2820-cards.c - driver for Empia EM2820/2840 USB video capture devices 2 em2820-cards.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
3 3
4 Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com> 4 Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
5 Ludovico Cavedon <cavedon@sssup.it> 5 Ludovico Cavedon <cavedon@sssup.it>
@@ -28,6 +28,23 @@
28#include <linux/videodev.h> 28#include <linux/videodev.h>
29#include <linux/i2c.h> 29#include <linux/i2c.h>
30 30
31/* Boards supported by driver */
32
33#define EM2800_BOARD_UNKNOWN 0
34#define EM2820_BOARD_UNKNOWN 1
35#define EM2820_BOARD_TERRATEC_CINERGY_250 2
36#define EM2820_BOARD_PINNACLE_USB_2 3
37#define EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 4
38#define EM2820_BOARD_MSI_VOX_USB_2 5
39#define EM2800_BOARD_TERRATEC_CINERGY_200 6
40#define EM2800_BOARD_LEADTEK_WINFAST_USBII 7
41#define EM2800_BOARD_KWORLD_USB2800 8
42
43#define UNSET -1
44
45/* maximum number of em28xx boards */
46#define EM2820_MAXBOARDS 1 /*FIXME: should be bigger */
47
31/* maximum number of frames that can be queued */ 48/* maximum number of frames that can be queued */
32#define EM2820_NUM_FRAMES 5 49#define EM2820_NUM_FRAMES 5
33/* number of frames that get used for v4l2_read() */ 50/* number of frames that get used for v4l2_read() */
@@ -79,6 +96,9 @@
79/* time to wait when stopping the isoc transfer */ 96/* time to wait when stopping the isoc transfer */
80#define EM2820_URB_TIMEOUT msecs_to_jiffies(EM2820_NUM_BUFS * EM2820_NUM_PACKETS) 97#define EM2820_URB_TIMEOUT msecs_to_jiffies(EM2820_NUM_BUFS * EM2820_NUM_PACKETS)
81 98
99/* time in msecs to wait for i2c writes to finish */
100#define EM2800_I2C_WRITE_TIMEOUT 20
101
82/* the various frame states */ 102/* the various frame states */
83enum em2820_frame_state { 103enum em2820_frame_state {
84 F_UNUSED = 0, 104 F_UNUSED = 0,
@@ -145,12 +165,13 @@ enum em2820_decoder {
145 165
146struct em2820_board { 166struct em2820_board {
147 char *name; 167 char *name;
148 168 unsigned char chip_id;
149 int vchannels; 169 int vchannels;
150 int norm; 170 int norm;
151 int tuner_type; 171 int tuner_type;
152 172
153 /* i2c flags */ 173 /* i2c flags */
174 unsigned int is_em2800;
154 unsigned int tda9887_conf; 175 unsigned int tda9887_conf;
155 176
156 unsigned int has_tuner:1; 177 unsigned int has_tuner:1;
@@ -195,6 +216,7 @@ struct em2820 {
195 /* generic device properties */ 216 /* generic device properties */
196 char name[30]; /* name (including minor) of the device */ 217 char name[30]; /* name (including minor) of the device */
197 int model; /* index in the device_data struct */ 218 int model; /* index in the device_data struct */
219 unsigned int is_em2800;
198 int video_inputs; /* number of video inputs */ 220 int video_inputs; /* number of video inputs */
199 unsigned int has_tuner:1; 221 unsigned int has_tuner:1;
200 unsigned int has_msp34xx:1; 222 unsigned int has_msp34xx:1;
@@ -304,11 +326,14 @@ void em2820_uninit_isoc(struct em2820 *dev);
304int em2820_set_alternate(struct em2820 *dev); 326int em2820_set_alternate(struct em2820 *dev);
305 327
306/* Provided by em2820-cards.c */ 328/* Provided by em2820-cards.c */
329extern int em2800_variant_detect(struct usb_device* udev,int model);
307extern void em2820_card_setup(struct em2820 *dev); 330extern void em2820_card_setup(struct em2820 *dev);
308extern struct em2820_board em2820_boards[]; 331extern struct em2820_board em2820_boards[];
309extern struct usb_device_id em2820_id_table[]; 332extern struct usb_device_id em2820_id_table[];
333extern const unsigned int em2820_bcount;
310 334
311/* em2820 registers */ 335/* em2820 registers */
336#define CHIPID_REG 0x0a
312#define USBSUSP_REG 0x0c /* */ 337#define USBSUSP_REG 0x0c /* */
313 338
314#define AUDIOSRC_REG 0x0e 339#define AUDIOSRC_REG 0x0e