aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index e4a56d8dfcf..e0d119c2281 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -110,6 +110,7 @@
#define EM2800_I2C_WRITE_TIMEOUT 20
enum em28xx_mode {
+ EM28XX_MODE_UNDEFINED,
EM28XX_ANALOG_MODE,
EM28XX_DIGITAL_MODE,
};
@@ -228,7 +229,7 @@ enum em28xx_decoder {
struct em28xx_reg_seq {
int reg;
- unsigned char val;
+ unsigned char val, mask;
int sleep;
};
@@ -274,12 +275,6 @@ enum em28xx_dev_state {
DEV_MISCONFIGURED = 0x04,
};
-enum em28xx_capture_mode {
- EM28XX_CAPTURE_OFF = 0,
- EM28XX_ANALOG_CAPTURE,
- EM28XX_DIGITAL_CAPTURE,
-};
-
#define EM28XX_AUDIO_BUFS 5
#define EM28XX_NUM_AUDIO_PACKETS 64
#define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */
@@ -335,9 +330,12 @@ struct em28xx {
/* Some older em28xx chips needs a waiting time after writing */
unsigned int wait_after_write;
- /* GPIO sequences for tuner callback */
+ /* GPIO sequences for analog and digital mode */
struct em28xx_reg_seq *analog_gpio, *digital_gpio;
+ /* GPIO sequences for tuner callbacks */
+ struct em28xx_reg_seq *tun_analog_gpio, *tun_digital_gpio;
+
int video_inputs; /* number of video inputs */
struct list_head devlist;
@@ -415,6 +413,9 @@ struct em28xx {
enum em28xx_mode mode;
+ /* Caches GPO and GPIO registers */
+ unsigned char reg_gpo, reg_gpio;
+
struct em28xx_dvb *dvb;
};
@@ -455,9 +456,10 @@ int em28xx_resolution_set(struct em28xx *dev);
int em28xx_set_alternate(struct em28xx *dev);
int em28xx_init_isoc(struct em28xx *dev, int max_packets,
int num_bufs, int max_pkt_size,
- int (*isoc_copy) (struct em28xx *dev, struct urb *urb),
- int cap_type);
+ int (*isoc_copy) (struct em28xx *dev, struct urb *urb));
void em28xx_uninit_isoc(struct em28xx *dev);
+int em28xx_set_mode(struct em28xx *dev, enum em28xx_mode set_mode);
+int em28xx_gpio_set(struct em28xx *dev, struct em28xx_reg_seq *gpio);
/* Provided by em28xx-video.c */
int em28xx_register_extension(struct em28xx_ops *dev);