Go to the documentation of this file.
22 #include <linux/pci.h>
23 #include <linux/i2c.h>
24 #include <linux/kdev_t.h>
25 #include <linux/slab.h>
40 #define CX23885_VERSION "0.0.3"
44 #define CX23885_MAXBOARDS 8
47 #define MAX_CX23885_INPUT 8
48 #define INPUT(nr) (&cx23885_boards[dev->board].input[nr])
49 #define RESOURCE_OVERLAY 1
50 #define RESOURCE_VIDEO 2
51 #define RESOURCE_VBI 4
53 #define BUFFER_TIMEOUT (HZ)
55 #define CX23885_BOARD_NOAUTO UNSET
56 #define CX23885_BOARD_UNKNOWN 0
57 #define CX23885_BOARD_HAUPPAUGE_HVR1800lp 1
58 #define CX23885_BOARD_HAUPPAUGE_HVR1800 2
59 #define CX23885_BOARD_HAUPPAUGE_HVR1250 3
60 #define CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP 4
61 #define CX23885_BOARD_HAUPPAUGE_HVR1500Q 5
62 #define CX23885_BOARD_HAUPPAUGE_HVR1500 6
63 #define CX23885_BOARD_HAUPPAUGE_HVR1200 7
64 #define CX23885_BOARD_HAUPPAUGE_HVR1700 8
65 #define CX23885_BOARD_HAUPPAUGE_HVR1400 9
66 #define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10
67 #define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11
68 #define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H 12
69 #define CX23885_BOARD_COMPRO_VIDEOMATE_E650F 13
70 #define CX23885_BOARD_TBS_6920 14
71 #define CX23885_BOARD_TEVII_S470 15
72 #define CX23885_BOARD_DVBWORLD_2005 16
73 #define CX23885_BOARD_NETUP_DUAL_DVBS2_CI 17
74 #define CX23885_BOARD_HAUPPAUGE_HVR1270 18
75 #define CX23885_BOARD_HAUPPAUGE_HVR1275 19
76 #define CX23885_BOARD_HAUPPAUGE_HVR1255 20
77 #define CX23885_BOARD_HAUPPAUGE_HVR1210 21
78 #define CX23885_BOARD_MYGICA_X8506 22
79 #define CX23885_BOARD_MAGICPRO_PROHDTVE2 23
80 #define CX23885_BOARD_HAUPPAUGE_HVR1850 24
81 #define CX23885_BOARD_COMPRO_VIDEOMATE_E800 25
82 #define CX23885_BOARD_HAUPPAUGE_HVR1290 26
83 #define CX23885_BOARD_MYGICA_X8558PRO 27
84 #define CX23885_BOARD_LEADTEK_WINFAST_PXTV1200 28
85 #define CX23885_BOARD_GOTVIEW_X5_3D_HYBRID 29
86 #define CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF 30
87 #define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000 31
88 #define CX23885_BOARD_MPX885 32
89 #define CX23885_BOARD_MYGICA_X8507 33
90 #define CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL 34
91 #define CX23885_BOARD_TEVII_S471 35
92 #define CX23885_BOARD_HAUPPAUGE_HVR1255_22111 36
93 #define CX23885_BOARD_PROF_8000 37
95 #define GPIO_0 0x00000001
96 #define GPIO_1 0x00000002
97 #define GPIO_2 0x00000004
98 #define GPIO_3 0x00000008
99 #define GPIO_4 0x00000010
100 #define GPIO_5 0x00000020
101 #define GPIO_6 0x00000040
102 #define GPIO_7 0x00000080
103 #define GPIO_8 0x00000100
104 #define GPIO_9 0x00000200
105 #define GPIO_10 0x00000400
106 #define GPIO_11 0x00000800
107 #define GPIO_12 0x00001000
108 #define GPIO_13 0x00002000
109 #define GPIO_14 0x00004000
110 #define GPIO_15 0x00008000
113 #define CX23885_NORMS (\
114 V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_443 | \
115 V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_I | \
116 V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | \
117 V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK)
452 #define call_all(dev, o, f, args...) \
453 v4l2_device_call_all(&dev->v4l2_dev, 0, o, f, ##args)
455 #define CX23885_HW_888_IR (1 << 0)
456 #define CX23885_HW_AV_CORE (1 << 1)
458 #define call_hw(dev, grpid, o, f, args...) \
459 v4l2_device_call_all(&dev->v4l2_dev, grpid, o, f, ##args)
495 #define cx_read(reg) readl(dev->lmmio + ((reg)>>2))
496 #define cx_write(reg, value) writel((value), dev->lmmio + ((reg)>>2))
498 #define cx_andor(reg, mask, value) \
499 writel((readl(dev->lmmio+((reg)>>2)) & ~(mask)) |\
500 ((value) & (mask)), dev->lmmio+((reg)>>2))
502 #define cx_set(reg, bit) cx_andor((reg), (bit), (bit))
503 #define cx_clear(reg, bit) cx_andor((reg), (bit), 0)
510 unsigned int bpl,
u32 risc);
520 unsigned int top_offset,
unsigned int bottom_offset,
521 unsigned int bpl,
unsigned int padding,
unsigned int lines);
525 unsigned int top_offset,
unsigned int bottom_offset,
526 unsigned int bpl,
unsigned int padding,
unsigned int lines);
651 static inline unsigned int norm_swidth(
v4l2_std_id norm)