summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:48:00 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:48:00 -0300
commit5253757b29d1cd54ddd9d2f874794c907430acc8 (patch)
treeddfdf79aec8343055eb239e07b3e4a23e03f8437 /linux/drivers/media/video/em28xx/em28xx.h
parentacc7837ba9c6b89823348b699aae4e995cdb45fc (diff)
downloadmediapointer-dvb-s2-5253757b29d1cd54ddd9d2f874794c907430acc8.tar.gz
mediapointer-dvb-s2-5253757b29d1cd54ddd9d2f874794c907430acc8.tar.bz2
em28xx: Provide the proper support for switching between analog/digital
From: Mauro Carvalho Chehab <mchehab@infradead.org> Before this patch, HVR900/HVR950 were incorreclty going back to analog. The result is that only digital were working. This patch provides the proper setup for analog/digital and tuner callback. It also properly resets analog into a sane state at open(). Thanks to Steven Toth <stoth@linuxtv.org> and Michael Krufky <mkrufky@linuxtv.org> for helping to set the proper parameters to GPO/GPIO em2883 ports. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx.h')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 9350ca2ee..f2bd9aa30 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -113,6 +113,7 @@
#define EM2800_I2C_WRITE_TIMEOUT 20
enum em28xx_mode {
+ EM28XX_MODE_UNDEFINED,
EM28XX_ANALOG_MODE,
EM28XX_DIGITAL_MODE,
};
@@ -231,7 +232,7 @@ enum em28xx_decoder {
struct em28xx_reg_seq {
int reg;
- unsigned char val;
+ unsigned char val, mask;
int sleep;
};
@@ -277,12 +278,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 */
@@ -346,9 +341,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;
@@ -430,6 +428,9 @@ struct em28xx {
enum em28xx_mode mode;
+ /* Caches GPO and GPIO registers */
+ unsigned char reg_gpo, reg_gpio;
+
struct em28xx_dvb *dvb;
};
@@ -470,9 +471,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);