diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 0080a09860d9..96a56faeb77b 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -31,6 +31,32 @@ | |||
31 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
32 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
33 | #include <media/ir-kbd-i2c.h> | 33 | #include <media/ir-kbd-i2c.h> |
34 | #if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE) | ||
35 | #include <media/videobuf-dvb.h> | ||
36 | #endif | ||
37 | |||
38 | /* Boards supported by driver */ | ||
39 | #define EM2800_BOARD_UNKNOWN 0 | ||
40 | #define EM2820_BOARD_UNKNOWN 1 | ||
41 | #define EM2820_BOARD_TERRATEC_CINERGY_250 2 | ||
42 | #define EM2820_BOARD_PINNACLE_USB_2 3 | ||
43 | #define EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 4 | ||
44 | #define EM2820_BOARD_MSI_VOX_USB_2 5 | ||
45 | #define EM2800_BOARD_TERRATEC_CINERGY_200 6 | ||
46 | #define EM2800_BOARD_LEADTEK_WINFAST_USBII 7 | ||
47 | #define EM2800_BOARD_KWORLD_USB2800 8 | ||
48 | #define EM2820_BOARD_PINNACLE_DVC_90 9 | ||
49 | #define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 10 | ||
50 | #define EM2880_BOARD_TERRATEC_HYBRID_XS 11 | ||
51 | #define EM2820_BOARD_KWORLD_PVRTV2800RF 12 | ||
52 | #define EM2880_BOARD_TERRATEC_PRODIGY_XS 13 | ||
53 | #define EM2820_BOARD_PROLINK_PLAYTV_USB2 14 | ||
54 | #define EM2800_BOARD_VGEAR_POCKETTV 15 | ||
55 | #define EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 16 | ||
56 | |||
57 | /* Limits minimum and default number of buffers */ | ||
58 | #define EM28XX_MIN_BUF 4 | ||
59 | #define EM28XX_DEF_BUF 8 | ||
34 | 60 | ||
35 | /* maximum number of em28xx boards */ | 61 | /* maximum number of em28xx boards */ |
36 | #define EM28XX_MAXBOARDS 4 /*FIXME: should be bigger */ | 62 | #define EM28XX_MAXBOARDS 4 /*FIXME: should be bigger */ |
@@ -81,6 +107,11 @@ | |||
81 | /* time in msecs to wait for i2c writes to finish */ | 107 | /* time in msecs to wait for i2c writes to finish */ |
82 | #define EM2800_I2C_WRITE_TIMEOUT 20 | 108 | #define EM2800_I2C_WRITE_TIMEOUT 20 |
83 | 109 | ||
110 | enum em28xx_mode { | ||
111 | EM28XX_ANALOG_MODE, | ||
112 | EM28XX_DIGITAL_MODE, | ||
113 | }; | ||
114 | |||
84 | enum em28xx_stream_state { | 115 | enum em28xx_stream_state { |
85 | STREAM_OFF, | 116 | STREAM_OFF, |
86 | STREAM_INTERRUPT, | 117 | STREAM_INTERRUPT, |
@@ -200,6 +231,7 @@ struct em28xx_board { | |||
200 | unsigned int mts_firmware:1; | 231 | unsigned int mts_firmware:1; |
201 | unsigned int has_12mhz_i2s:1; | 232 | unsigned int has_12mhz_i2s:1; |
202 | unsigned int max_range_640_480:1; | 233 | unsigned int max_range_640_480:1; |
234 | unsigned int has_dvb:1; | ||
203 | 235 | ||
204 | unsigned int analog_gpio; | 236 | unsigned int analog_gpio; |
205 | 237 | ||
@@ -234,7 +266,10 @@ enum em28xx_dev_state { | |||
234 | #define EM28XX_NUM_AUDIO_PACKETS 64 | 266 | #define EM28XX_NUM_AUDIO_PACKETS 64 |
235 | #define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */ | 267 | #define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */ |
236 | #define EM28XX_CAPTURE_STREAM_EN 1 | 268 | #define EM28XX_CAPTURE_STREAM_EN 1 |
269 | |||
270 | /* em28xx extensions */ | ||
237 | #define EM28XX_AUDIO 0x10 | 271 | #define EM28XX_AUDIO 0x10 |
272 | #define EM28XX_DVB 0x20 | ||
238 | 273 | ||
239 | struct em28xx_audio { | 274 | struct em28xx_audio { |
240 | char name[50]; | 275 | char name[50]; |
@@ -266,6 +301,7 @@ struct em28xx { | |||
266 | unsigned int has_audio_class:1; | 301 | unsigned int has_audio_class:1; |
267 | unsigned int has_12mhz_i2s:1; | 302 | unsigned int has_12mhz_i2s:1; |
268 | unsigned int max_range_640_480:1; | 303 | unsigned int max_range_640_480:1; |
304 | unsigned int has_dvb:1; | ||
269 | 305 | ||
270 | int video_inputs; /* number of video inputs */ | 306 | int video_inputs; /* number of video inputs */ |
271 | struct list_head devlist; | 307 | struct list_head devlist; |
@@ -340,6 +376,13 @@ struct em28xx { | |||
340 | int (*em28xx_write_regs_req) (struct em28xx * dev, u8 req, u16 reg, | 376 | int (*em28xx_write_regs_req) (struct em28xx * dev, u8 req, u16 reg, |
341 | char *buf, int len); | 377 | char *buf, int len); |
342 | int (*em28xx_read_reg_req) (struct em28xx * dev, u8 req, u16 reg); | 378 | int (*em28xx_read_reg_req) (struct em28xx * dev, u8 req, u16 reg); |
379 | |||
380 | enum em28xx_mode mode; | ||
381 | |||
382 | #if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE) | ||
383 | struct videobuf_dvb dvb; | ||
384 | struct videobuf_queue_ops *qops; | ||
385 | #endif | ||
343 | }; | 386 | }; |
344 | 387 | ||
345 | struct em28xx_fh { | 388 | struct em28xx_fh { |