1
2
3
4
5
6
7
8
9 #ifndef IVTV_CARDS_H
10 #define IVTV_CARDS_H
11
12
13 #define IVTV_CARD_PVR_250 0
14 #define IVTV_CARD_PVR_350 1
15 #define IVTV_CARD_PVR_150 2
16
17 #define IVTV_CARD_M179 3
18 #define IVTV_CARD_MPG600 4
19 #define IVTV_CARD_MPG160 5
20
21 #define IVTV_CARD_PG600 6
22 #define IVTV_CARD_AVC2410 7
23 #define IVTV_CARD_AVC2010 8
24 #define IVTV_CARD_TG5000TV 9
25 #define IVTV_CARD_VA2000MAX_SNT6 10
26 #define IVTV_CARD_CX23416GYC 11
27 #define IVTV_CARD_GV_MVPRX 12
28 #define IVTV_CARD_GV_MVPRX2E 13
29 #define IVTV_CARD_GOTVIEW_PCI_DVD 14
30 #define IVTV_CARD_GOTVIEW_PCI_DVD2 15
31 #define IVTV_CARD_YUAN_MPC622 16
32 #define IVTV_CARD_DCTMTVP1 17
33 #define IVTV_CARD_PG600V2 18
34 #define IVTV_CARD_CLUB3D 19
35 #define IVTV_CARD_AVERTV_MCE116 20
36 #define IVTV_CARD_ASUS_FALCON2 21
37 #define IVTV_CARD_AVER_PVR150PLUS 22
38 #define IVTV_CARD_AVER_EZMAKER 23
39 #define IVTV_CARD_AVER_M104 24
40 #define IVTV_CARD_BUFFALO_MV5L 25
41 #define IVTV_CARD_AVER_ULTRA1500MCE 26
42 #define IVTV_CARD_KIKYOU 27
43 #define IVTV_CARD_LAST 27
44
45
46
47
48
49
50
51
52 #define IVTV_CARD_PVR_350_V1 (IVTV_CARD_LAST+1)
53
54 #define IVTV_CARD_CX23416GYC_NOGR (IVTV_CARD_LAST+2)
55 #define IVTV_CARD_CX23416GYC_NOGRYCS (IVTV_CARD_LAST+3)
56
57
58 #define PCI_VENDOR_ID_ICOMP 0x4444
59 #define PCI_DEVICE_ID_IVTV15 0x0803
60 #define PCI_DEVICE_ID_IVTV16 0x0016
61
62
63 #define IVTV_PCI_ID_HAUPPAUGE 0x0070
64 #define IVTV_PCI_ID_HAUPPAUGE_ALT1 0x0270
65 #define IVTV_PCI_ID_HAUPPAUGE_ALT2 0x4070
66 #define IVTV_PCI_ID_ADAPTEC 0x9005
67 #define IVTV_PCI_ID_ASUSTEK 0x1043
68 #define IVTV_PCI_ID_AVERMEDIA 0x1461
69 #define IVTV_PCI_ID_YUAN1 0x12ab
70 #define IVTV_PCI_ID_YUAN2 0xff01
71 #define IVTV_PCI_ID_YUAN3 0xffab
72 #define IVTV_PCI_ID_YUAN4 0xfbab
73 #define IVTV_PCI_ID_DIAMONDMM 0xff92
74 #define IVTV_PCI_ID_IODATA 0x10fc
75 #define IVTV_PCI_ID_MELCO 0x1154
76 #define IVTV_PCI_ID_GOTVIEW1 0xffac
77 #define IVTV_PCI_ID_GOTVIEW2 0xffad
78 #define IVTV_PCI_ID_SONY 0x104d
79
80
81 #define IVTV_HW_CX25840 (1 << 0)
82 #define IVTV_HW_SAA7115 (1 << 1)
83 #define IVTV_HW_SAA7127 (1 << 2)
84 #define IVTV_HW_MSP34XX (1 << 3)
85 #define IVTV_HW_TUNER (1 << 4)
86 #define IVTV_HW_WM8775 (1 << 5)
87 #define IVTV_HW_CS53L32A (1 << 6)
88 #define IVTV_HW_TVEEPROM (1 << 7)
89 #define IVTV_HW_SAA7114 (1 << 8)
90 #define IVTV_HW_UPD64031A (1 << 9)
91 #define IVTV_HW_UPD6408X (1 << 10)
92 #define IVTV_HW_SAA717X (1 << 11)
93 #define IVTV_HW_WM8739 (1 << 12)
94 #define IVTV_HW_VP27SMPX (1 << 13)
95 #define IVTV_HW_M52790 (1 << 14)
96 #define IVTV_HW_GPIO (1 << 15)
97 #define IVTV_HW_I2C_IR_RX_AVER (1 << 16)
98 #define IVTV_HW_I2C_IR_RX_HAUP_EXT (1 << 17)
99 #define IVTV_HW_I2C_IR_RX_HAUP_INT (1 << 18)
100 #define IVTV_HW_Z8F0811_IR_HAUP (1 << 19)
101 #define IVTV_HW_I2C_IR_RX_ADAPTEC (1 << 20)
102
103 #define IVTV_HW_SAA711X (IVTV_HW_SAA7115 | IVTV_HW_SAA7114)
104
105 #define IVTV_HW_IR_ANY (IVTV_HW_I2C_IR_RX_AVER | \
106 IVTV_HW_I2C_IR_RX_HAUP_EXT | \
107 IVTV_HW_I2C_IR_RX_HAUP_INT | \
108 IVTV_HW_Z8F0811_IR_HAUP | \
109 IVTV_HW_I2C_IR_RX_ADAPTEC)
110
111
112 #define IVTV_CARD_INPUT_VID_TUNER 1
113 #define IVTV_CARD_INPUT_SVIDEO1 2
114 #define IVTV_CARD_INPUT_SVIDEO2 3
115 #define IVTV_CARD_INPUT_COMPOSITE1 4
116 #define IVTV_CARD_INPUT_COMPOSITE2 5
117 #define IVTV_CARD_INPUT_COMPOSITE3 6
118
119
120 #define IVTV_CARD_INPUT_AUD_TUNER 1
121 #define IVTV_CARD_INPUT_LINE_IN1 2
122 #define IVTV_CARD_INPUT_LINE_IN2 3
123
124 #define IVTV_CARD_MAX_VIDEO_INPUTS 6
125 #define IVTV_CARD_MAX_AUDIO_INPUTS 3
126 #define IVTV_CARD_MAX_TUNERS 3
127
128
129 #define IVTV_SAA71XX_COMPOSITE0 0
130 #define IVTV_SAA71XX_COMPOSITE1 1
131 #define IVTV_SAA71XX_COMPOSITE2 2
132 #define IVTV_SAA71XX_COMPOSITE3 3
133 #define IVTV_SAA71XX_COMPOSITE4 4
134 #define IVTV_SAA71XX_COMPOSITE5 5
135 #define IVTV_SAA71XX_SVIDEO0 6
136 #define IVTV_SAA71XX_SVIDEO1 7
137 #define IVTV_SAA71XX_SVIDEO2 8
138 #define IVTV_SAA71XX_SVIDEO3 9
139
140
141 #define IVTV_SAA717X_TUNER_FLAG 0x80
142
143
144 #define IVTV_DUMMY_AUDIO 0
145
146
147 #define IVTV_GPIO_TUNER 0
148 #define IVTV_GPIO_LINE_IN 1
149
150
151 #define IVTV_SAA717X_IN0 0
152 #define IVTV_SAA717X_IN1 1
153 #define IVTV_SAA717X_IN2 2
154
155
156 #define IVTV_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \
157 V4L2_CAP_AUDIO | V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE | \
158 V4L2_CAP_SLICED_VBI_CAPTURE)
159 #define IVTV_CAP_DECODER (V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_SLICED_VBI_OUTPUT)
160
161 struct ivtv_card_video_input {
162 u8 video_type;
163 u8 audio_index;
164 u16 video_input;
165 };
166
167 struct ivtv_card_audio_input {
168 u8 audio_type;
169 u32 audio_input;
170 u16 muxer_input;
171
172 };
173
174 struct ivtv_card_output {
175 u8 name[32];
176 u16 video_output;
177 };
178
179 struct ivtv_card_pci_info {
180 u16 device;
181 u16 subsystem_vendor;
182 u16 subsystem_device;
183 };
184
185
186
187
188
189 struct ivtv_gpio_init {
190 u16 direction;
191 u16 initial_value;
192 };
193
194 struct ivtv_gpio_video_input {
195 u16 mask;
196 u16 tuner;
197 u16 composite;
198 u16 svideo;
199 };
200
201 struct ivtv_gpio_audio_input {
202 u16 mask;
203 u16 tuner;
204 u16 linein;
205 u16 radio;
206 };
207
208 struct ivtv_gpio_audio_mute {
209 u16 mask;
210 u16 mute;
211 };
212
213 struct ivtv_gpio_audio_mode {
214 u16 mask;
215 u16 mono;
216 u16 stereo;
217 u16 lang1;
218 u16 lang2;
219 u16 both;
220 };
221
222 struct ivtv_gpio_audio_freq {
223 u16 mask;
224 u16 f32000;
225 u16 f44100;
226 u16 f48000;
227 };
228
229 struct ivtv_gpio_audio_detect {
230 u16 mask;
231 u16 stereo;
232
233 };
234
235 struct ivtv_card_tuner {
236 v4l2_std_id std;
237 int tuner;
238 };
239
240 struct ivtv_card_tuner_i2c {
241 unsigned short radio[2];
242 unsigned short demod[2];
243 unsigned short tv[4];
244 };
245
246
247 struct ivtv_card {
248 int type;
249 char *name;
250 char *comment;
251 u32 v4l2_capabilities;
252 u32 hw_video;
253 u32 hw_audio;
254 u32 hw_audio_ctrl;
255 u32 hw_muxer;
256 u32 hw_all;
257 struct ivtv_card_video_input video_inputs[IVTV_CARD_MAX_VIDEO_INPUTS];
258 struct ivtv_card_audio_input audio_inputs[IVTV_CARD_MAX_AUDIO_INPUTS];
259 struct ivtv_card_audio_input radio_input;
260 int nof_outputs;
261 const struct ivtv_card_output *video_outputs;
262 u8 gr_config;
263 u8 xceive_pin;
264
265
266 struct ivtv_gpio_init gpio_init;
267 struct ivtv_gpio_video_input gpio_video_input;
268 struct ivtv_gpio_audio_input gpio_audio_input;
269 struct ivtv_gpio_audio_mute gpio_audio_mute;
270 struct ivtv_gpio_audio_mode gpio_audio_mode;
271 struct ivtv_gpio_audio_freq gpio_audio_freq;
272 struct ivtv_gpio_audio_detect gpio_audio_detect;
273
274 struct ivtv_card_tuner tuners[IVTV_CARD_MAX_TUNERS];
275 struct ivtv_card_tuner_i2c *i2c;
276
277
278
279 const struct ivtv_card_pci_info *pci_list;
280 };
281
282 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input);
283 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output);
284 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *input);
285 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *output);
286 const struct ivtv_card *ivtv_get_card(u16 index);
287
288 #endif