summaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-18 00:48:00 (GMT)
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 17:09:42 (GMT)
commitc67ec53f8f4e90ebd482789e2f6d121f41a0bd90 (patch)
tree7c5c242cb50e8b1bfdeab4157370c7dbfda34bf9 /drivers/media/video/em28xx/em28xx.h
parent82ac4f876505615ba9dc6a73cd9a584bad8fe23f (diff)
downloadlinux-fsl-qoriq-c67ec53f8f4e90ebd482789e2f6d121f41a0bd90.tar.xz
V4L/DVB (7615): em28xx: Provide the proper support for switching between analog/digital
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 '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 e4a56d8..e0d119c 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);