V4L/DVB (3408): DViCO FusionHDTV DVB-T Hybrid and ZL10353-based FusionHDTV DVB-T...
[safe/jmp/linux-2.6] / drivers / media / video / cx88 / cx88.h
index cc2197a..21738b6 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/pci.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <linux/kdev_t.h>
 
 #include <media/tuner.h>
@@ -35,6 +35,7 @@
 #include "cx88-reg.h"
 
 #include <linux/version.h>
+#include <linux/mutex.h>
 #define CX88_VERSION_CODE KERNEL_VERSION(0,0,5)
 
 #ifndef TRUE
@@ -148,7 +149,7 @@ extern struct sram_channel cx88_sram_channels[];
 #define CX88_BOARD_PIXELVIEW                3
 #define CX88_BOARD_ATI_WONDER_PRO           4
 #define CX88_BOARD_WINFAST2000XP_EXPERT     5
-#define CX88_BOARD_AVERTV_303               6
+#define CX88_BOARD_AVERTV_STUDIO_303        6
 #define CX88_BOARD_MSI_TVANYWHERE_MASTER    7
 #define CX88_BOARD_WINFAST_DV2000           8
 #define CX88_BOARD_LEADTEK_PVR2000          9
@@ -177,6 +178,18 @@ extern struct sram_channel cx88_sram_channels[];
 #define CX88_BOARD_AVERMEDIA_ULTRATV_MC_550 32
 #define CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD 33
 #define CX88_BOARD_ATI_HDTVWONDER          34
+#define CX88_BOARD_WINFAST_DTV1000         35
+#define CX88_BOARD_AVERTV_303              36
+#define CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1  37
+#define CX88_BOARD_HAUPPAUGE_NOVASE2_S1    38
+#define CX88_BOARD_KWORLD_DVBS_100         39
+#define CX88_BOARD_HAUPPAUGE_HVR1100       40
+#define CX88_BOARD_HAUPPAUGE_HVR1100LP     41
+#define CX88_BOARD_DNTV_LIVE_DVB_T_PRO     42
+#define CX88_BOARD_KWORLD_DVB_T_CX22702    43
+#define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL 44
+#define CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT 45
+#define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID 46
 
 enum cx88_itype {
        CX88_VMUX_COMPOSITE1 = 1,
@@ -258,8 +271,8 @@ struct cx88_core {
        /* pci stuff */
        int                        pci_bus;
        int                        pci_slot;
-        u32                        __iomem *lmmio;
-        u8                         __iomem *bmmio;
+       u32                        __iomem *lmmio;
+       u8                         __iomem *bmmio;
        u32                        shadow[SHADOW_MAX];
        int                        pci_irqmask;
 
@@ -278,6 +291,9 @@ struct cx88_core {
        unsigned int               tda9887_conf;
        unsigned int               has_radio;
 
+       /* Supported V4L _STD_ tuner formats */
+       unsigned int               tuner_formats;
+
        /* config info -- dvb */
        struct dvb_pll_desc        *pll_desc;
        unsigned int               pll_addr;
@@ -295,10 +311,12 @@ struct cx88_core {
        /* IR remote control state */
        struct cx88_IR             *ir;
 
-       struct semaphore           lock;
-
+       struct mutex               lock;
        /* various v4l controls */
        u32                        freq;
+
+       /* cx88-video needs to access cx8802 for hybrid tuner pll access. */
+       struct cx8802_dev          *dvbdev;
 };
 
 struct cx8800_dev;
@@ -410,6 +428,7 @@ struct cx8802_dev {
        void*                      fe_handle;
        int                        (*fe_release)(void *handle);
 
+       void                       *card_priv;
        /* for switching modulation types */
        unsigned char              ts_gen_cntrl;
 
@@ -446,7 +465,6 @@ struct cx8802_dev {
 
 extern void cx88_print_irqbits(char *name, char *tag, char **strings,
                               u32 bits, u32 mask);
-extern void cx88_print_ioctl(char *name, unsigned int cmd);
 
 extern int cx88_core_irq(struct cx88_core *core, u32 status);
 extern void cx88_wakeup(struct cx88_core *core,
@@ -489,6 +507,10 @@ extern struct cx88_core* cx88_core_get(struct pci_dev *pci);
 extern void cx88_core_put(struct cx88_core *core,
                          struct pci_dev *pci);
 
+extern int cx88_start_audio_dma(struct cx88_core *core);
+extern int cx88_stop_audio_dma(struct cx88_core *core);
+
+
 /* ----------------------------------------------------------- */
 /* cx88-vbi.c                                                  */