1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 Functions to query card hardware
4 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
5 Copyright (C) 2005-2007 Hans Verkuil <hverkuil@xs4all.nl>
6
7 */
8
9 #include "ivtv-driver.h"
10 #include "ivtv-cards.h"
11 #include "ivtv-i2c.h"
12
13 #include <media/drv-intf/msp3400.h>
14 #include <media/i2c/m52790.h>
15 #include <media/i2c/wm8775.h>
16 #include <media/i2c/cs53l32a.h>
17 #include <media/drv-intf/cx25840.h>
18 #include <media/i2c/upd64031a.h>
19
20 #define MSP_TUNER MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
21 MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
22 #define MSP_SCART1 MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
23 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
24 #define MSP_SCART2 MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, \
25 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
26 #define MSP_SCART3 MSP_INPUT(MSP_IN_SCART3, MSP_IN_TUNER1, \
27 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
28 #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \
29 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
30
31 #define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
32
33 /* usual i2c tuner addresses to probe */
34 static struct ivtv_card_tuner_i2c ivtv_i2c_std = {
35 .radio = { I2C_CLIENT_END },
36 .demod = { 0x43, I2C_CLIENT_END },
37 .tv = { 0x61, 0x60, I2C_CLIENT_END },
38 };
39
40 /* as above, but with possible radio tuner */
41 static struct ivtv_card_tuner_i2c ivtv_i2c_radio = {
42 .radio = { 0x60, I2C_CLIENT_END },
43 .demod = { 0x43, I2C_CLIENT_END },
44 .tv = { 0x61, I2C_CLIENT_END },
45 };
46
47 /* using the tda8290+75a combo */
48 static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
49 .radio = { I2C_CLIENT_END },
50 .demod = { I2C_CLIENT_END },
51 .tv = { 0x4b, I2C_CLIENT_END },
52 };
53
54 /********************** card configuration *******************************/
55
56 /* Please add new PCI IDs to: https://pci-ids.ucw.cz/
57 This keeps the PCI ID database up to date. Note that the entries
58 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
59 New vendor IDs should still be added to the vendor ID list. */
60
61 /* Hauppauge PVR-250 cards */
62
63 /* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
64 static const struct ivtv_card ivtv_card_pvr250 = {
65 .type = IVTV_CARD_PVR_250,
66 .name = "Hauppauge WinTV PVR-250",
67 .v4l2_capabilities = IVTV_CAP_ENCODER,
68 .hw_video = IVTV_HW_SAA7115,
69 .hw_audio = IVTV_HW_MSP34XX,
70 .hw_audio_ctrl = IVTV_HW_MSP34XX,
71 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
72 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
73 .video_inputs = {
74 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
75 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
76 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
77 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
78 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
79 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
80 },
81 .audio_inputs = {
82 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
83 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
84 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
85 },
86 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
87 .i2c = &ivtv_i2c_std,
88 };
89
90 /* ------------------------------------------------------------------------- */
91
92 /* Hauppauge PVR-350 cards */
93
94 /* Outputs for Hauppauge PVR350 cards */
95 static struct ivtv_card_output ivtv_pvr350_outputs[] = {
96 {
97 .name = "S-Video + Composite",
98 .video_output = 0,
99 }, {
100 .name = "Composite",
101 .video_output = 1,
102 }, {
103 .name = "S-Video",
104 .video_output = 2,
105 }, {
106 .name = "RGB",
107 .video_output = 3,
108 }, {
109 .name = "YUV C",
110 .video_output = 4,
111 }, {
112 .name = "YUV V",
113 .video_output = 5,
114 }
115 };
116
117 static const struct ivtv_card ivtv_card_pvr350 = {
118 .type = IVTV_CARD_PVR_350,
119 .name = "Hauppauge WinTV PVR-350",
120 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
121 .video_outputs = ivtv_pvr350_outputs,
122 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
123 .hw_video = IVTV_HW_SAA7115,
124 .hw_audio = IVTV_HW_MSP34XX,
125 .hw_audio_ctrl = IVTV_HW_MSP34XX,
126 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
127 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER |
128 IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT,
129 .video_inputs = {
130 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
131 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
132 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
133 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
134 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
135 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
136 },
137 .audio_inputs = {
138 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
139 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
140 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
141 },
142 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
143 .i2c = &ivtv_i2c_std,
144 };
145
146 /* PVR-350 V1 boards have a different audio tuner input and use a
147 saa7114 instead of a saa7115.
148 Note that the info below comes from a pre-production model so it may
149 not be correct. Especially the audio behaves strangely (mono only it seems) */
150 static const struct ivtv_card ivtv_card_pvr350_v1 = {
151 .type = IVTV_CARD_PVR_350_V1,
152 .name = "Hauppauge WinTV PVR-350 (V1)",
153 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
154 .video_outputs = ivtv_pvr350_outputs,
155 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
156 .hw_video = IVTV_HW_SAA7114,
157 .hw_audio = IVTV_HW_MSP34XX,
158 .hw_audio_ctrl = IVTV_HW_MSP34XX,
159 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
160 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
161 .video_inputs = {
162 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
163 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
164 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
165 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
166 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
167 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
168 },
169 .audio_inputs = {
170 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
171 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
172 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
173 },
174 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
175 .i2c = &ivtv_i2c_std,
176 };
177
178 /* ------------------------------------------------------------------------- */
179
180 /* Hauppauge PVR-150/PVR-500 cards */
181
182 static const struct ivtv_card ivtv_card_pvr150 = {
183 .type = IVTV_CARD_PVR_150,
184 .name = "Hauppauge WinTV PVR-150",
185 .v4l2_capabilities = IVTV_CAP_ENCODER,
186 .hw_video = IVTV_HW_CX25840,
187 .hw_audio = IVTV_HW_CX25840,
188 .hw_audio_ctrl = IVTV_HW_CX25840,
189 .hw_muxer = IVTV_HW_WM8775,
190 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
191 IVTV_HW_TVEEPROM | IVTV_HW_TUNER |
192 IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT |
193 IVTV_HW_Z8F0811_IR_HAUP,
194 .video_inputs = {
195 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
196 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
197 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
198 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
199 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
200 },
201 .audio_inputs = {
202 { IVTV_CARD_INPUT_AUD_TUNER,
203 CX25840_AUDIO8, WM8775_AIN2 },
204 { IVTV_CARD_INPUT_LINE_IN1,
205 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
206 { IVTV_CARD_INPUT_LINE_IN2,
207 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
208 },
209 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
210 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
211 /* apparently needed for the IR blaster */
212 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
213 .i2c = &ivtv_i2c_std,
214 };
215
216 /* ------------------------------------------------------------------------- */
217
218 /* AVerMedia M179 cards */
219
220 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
221 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
222 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
223 { 0, 0, 0 }
224 };
225
226 static const struct ivtv_card ivtv_card_m179 = {
227 .type = IVTV_CARD_M179,
228 .name = "AVerMedia M179",
229 .v4l2_capabilities = IVTV_CAP_ENCODER,
230 .hw_video = IVTV_HW_SAA7114,
231 .hw_audio = IVTV_HW_GPIO,
232 .hw_audio_ctrl = IVTV_HW_GPIO,
233 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
234 .video_inputs = {
235 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
236 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
237 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
238 },
239 .audio_inputs = {
240 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
241 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
242 },
243 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
244 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
245 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
246 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
247 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
248 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
249 .f44100 = 0x0008, .f48000 = 0x0010 },
250 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
251 .tuners = {
252 /* As far as we know all M179 cards use this tuner */
253 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
254 },
255 .pci_list = ivtv_pci_m179,
256 .i2c = &ivtv_i2c_std,
257 };
258
259 /* ------------------------------------------------------------------------- */
260
261 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
262
263 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
264 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
265 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
266 { 0, 0, 0 }
267 };
268
269 static const struct ivtv_card ivtv_card_mpg600 = {
270 .type = IVTV_CARD_MPG600,
271 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
272 .v4l2_capabilities = IVTV_CAP_ENCODER,
273 .hw_video = IVTV_HW_SAA7115,
274 .hw_audio = IVTV_HW_GPIO,
275 .hw_audio_ctrl = IVTV_HW_GPIO,
276 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
277 .video_inputs = {
278 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
279 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
280 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
281 },
282 .audio_inputs = {
283 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
284 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
285 },
286 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
287 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
288 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
289 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
290 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
291 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
292 .tuners = {
293 /* The PAL tuner is confirmed */
294 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
295 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
296 },
297 .pci_list = ivtv_pci_mpg600,
298 .i2c = &ivtv_i2c_std,
299 };
300
301 /* ------------------------------------------------------------------------- */
302
303 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
304
305 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
306 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
307 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
308 { 0, 0, 0 }
309 };
310
311 static const struct ivtv_card ivtv_card_mpg160 = {
312 .type = IVTV_CARD_MPG160,
313 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
314 .v4l2_capabilities = IVTV_CAP_ENCODER,
315 .hw_video = IVTV_HW_SAA7114,
316 .hw_audio = IVTV_HW_GPIO,
317 .hw_audio_ctrl = IVTV_HW_GPIO,
318 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
319 .video_inputs = {
320 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
321 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
322 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
323 },
324 .audio_inputs = {
325 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
326 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
327 },
328 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
329 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
330 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
331 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
332 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
333 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
334 .tuners = {
335 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
336 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
337 },
338 .pci_list = ivtv_pci_mpg160,
339 .i2c = &ivtv_i2c_std,
340 };
341
342 /* ------------------------------------------------------------------------- */
343
344 /* Yuan PG600/Diamond PVR-550 cards */
345
346 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
347 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
348 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
349 { 0, 0, 0 }
350 };
351
352 static const struct ivtv_card ivtv_card_pg600 = {
353 .type = IVTV_CARD_PG600,
354 .name = "Yuan PG600, Diamond PVR-550",
355 .v4l2_capabilities = IVTV_CAP_ENCODER,
356 .hw_video = IVTV_HW_CX25840,
357 .hw_audio = IVTV_HW_CX25840,
358 .hw_audio_ctrl = IVTV_HW_CX25840,
359 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
360 .video_inputs = {
361 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
362 { IVTV_CARD_INPUT_SVIDEO1, 1,
363 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
364 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
365 },
366 .audio_inputs = {
367 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
368 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
369 },
370 .tuners = {
371 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
372 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
373 },
374 .pci_list = ivtv_pci_pg600,
375 .i2c = &ivtv_i2c_std,
376 };
377
378 /* ------------------------------------------------------------------------- */
379
380 /* Adaptec VideOh! AVC-2410 card */
381
382 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
383 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
384 { 0, 0, 0 }
385 };
386
387 static const struct ivtv_card ivtv_card_avc2410 = {
388 .type = IVTV_CARD_AVC2410,
389 .name = "Adaptec VideOh! AVC-2410",
390 .v4l2_capabilities = IVTV_CAP_ENCODER,
391 .hw_video = IVTV_HW_SAA7115,
392 .hw_audio = IVTV_HW_MSP34XX,
393 .hw_audio_ctrl = IVTV_HW_MSP34XX,
394 .hw_muxer = IVTV_HW_CS53L32A,
395 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
396 IVTV_HW_SAA7115 | IVTV_HW_TUNER |
397 IVTV_HW_I2C_IR_RX_ADAPTEC,
398 .video_inputs = {
399 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
400 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
401 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
402 },
403 .audio_inputs = {
404 { IVTV_CARD_INPUT_AUD_TUNER,
405 MSP_TUNER, CS53L32A_IN0 },
406 { IVTV_CARD_INPUT_LINE_IN1,
407 MSP_SCART1, CS53L32A_IN2 },
408 },
409 /* This card has no eeprom and in fact the Windows driver relies
410 on the country/region setting of the user to decide which tuner
411 is available. */
412 .tuners = {
413 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
414 { .std = V4L2_STD_ALL - V4L2_STD_NTSC_M_JP,
415 .tuner = TUNER_PHILIPS_FM1236_MK3 },
416 { .std = V4L2_STD_NTSC_M_JP, .tuner = TUNER_PHILIPS_FQ1286 },
417 },
418 .pci_list = ivtv_pci_avc2410,
419 .i2c = &ivtv_i2c_std,
420 };
421
422 /* ------------------------------------------------------------------------- */
423
424 /* Adaptec VideOh! AVC-2010 card */
425
426 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
427 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
428 { 0, 0, 0 }
429 };
430
431 static const struct ivtv_card ivtv_card_avc2010 = {
432 .type = IVTV_CARD_AVC2010,
433 .name = "Adaptec VideOh! AVC-2010",
434 .v4l2_capabilities = IVTV_CAP_ENCODER,
435 .hw_video = IVTV_HW_SAA7115,
436 .hw_audio = IVTV_HW_CS53L32A,
437 .hw_audio_ctrl = IVTV_HW_CS53L32A,
438 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
439 .video_inputs = {
440 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
441 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
442 },
443 .audio_inputs = {
444 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
445 },
446 /* Does not have a tuner */
447 .pci_list = ivtv_pci_avc2010,
448 };
449
450 /* ------------------------------------------------------------------------- */
451
452 /* Nagase Transgear 5000TV card */
453
454 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
455 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
456 { 0, 0, 0 }
457 };
458
459 static const struct ivtv_card ivtv_card_tg5000tv = {
460 .type = IVTV_CARD_TG5000TV,
461 .name = "Nagase Transgear 5000TV",
462 .v4l2_capabilities = IVTV_CAP_ENCODER,
463 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
464 IVTV_HW_GPIO,
465 .hw_audio = IVTV_HW_GPIO,
466 .hw_audio_ctrl = IVTV_HW_GPIO,
467 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
468 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
469 .video_inputs = {
470 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
471 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
472 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
473 },
474 .audio_inputs = {
475 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
476 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
477 },
478 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
479 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
480 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
481 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
482 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
483 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
484 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
485 .composite = 0x0010, .svideo = 0x0020 },
486 .tuners = {
487 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
488 },
489 .pci_list = ivtv_pci_tg5000tv,
490 .i2c = &ivtv_i2c_std,
491 };
492
493 /* ------------------------------------------------------------------------- */
494
495 /* AOpen VA2000MAX-SNT6 card */
496
497 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
498 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
499 { 0, 0, 0 }
500 };
501
502 static const struct ivtv_card ivtv_card_va2000 = {
503 .type = IVTV_CARD_VA2000MAX_SNT6,
504 .name = "AOpen VA2000MAX-SNT6",
505 .v4l2_capabilities = IVTV_CAP_ENCODER,
506 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
507 .hw_audio = IVTV_HW_MSP34XX,
508 .hw_audio_ctrl = IVTV_HW_MSP34XX,
509 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
510 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
511 .video_inputs = {
512 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
513 },
514 .audio_inputs = {
515 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
516 },
517 .tuners = {
518 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
519 },
520 .pci_list = ivtv_pci_va2000,
521 .i2c = &ivtv_i2c_std,
522 };
523
524 /* ------------------------------------------------------------------------- */
525
526 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
527
528 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
529 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
530 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
531 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
532 { 0, 0, 0 }
533 };
534
535 static const struct ivtv_card ivtv_card_cx23416gyc = {
536 .type = IVTV_CARD_CX23416GYC,
537 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
538 .v4l2_capabilities = IVTV_CAP_ENCODER,
539 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
540 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
541 .hw_audio = IVTV_HW_SAA717X,
542 .hw_audio_ctrl = IVTV_HW_SAA717X,
543 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
544 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
545 .video_inputs = {
546 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
547 IVTV_SAA717X_TUNER_FLAG },
548 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
549 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
550 },
551 .audio_inputs = {
552 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
553 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
554 },
555 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
556 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
557 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
558 .composite = 0x0020, .svideo = 0x0020 },
559 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
560 .f44100 = 0x4000, .f48000 = 0x8000 },
561 .tuners = {
562 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
563 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
564 },
565 .pci_list = ivtv_pci_cx23416gyc,
566 .i2c = &ivtv_i2c_std,
567 };
568
569 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
570 .type = IVTV_CARD_CX23416GYC_NOGR,
571 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
572 .v4l2_capabilities = IVTV_CAP_ENCODER,
573 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
574 .hw_audio = IVTV_HW_SAA717X,
575 .hw_audio_ctrl = IVTV_HW_SAA717X,
576 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
577 IVTV_HW_UPD6408X,
578 .video_inputs = {
579 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
580 IVTV_SAA717X_TUNER_FLAG },
581 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
582 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
583 },
584 .audio_inputs = {
585 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
586 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
587 },
588 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
589 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
590 .composite = 0x0020, .svideo = 0x0020 },
591 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
592 .f44100 = 0x4000, .f48000 = 0x8000 },
593 .tuners = {
594 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
595 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
596 },
597 .i2c = &ivtv_i2c_std,
598 };
599
600 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
601 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
602 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
603 .v4l2_capabilities = IVTV_CAP_ENCODER,
604 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
605 .hw_audio = IVTV_HW_SAA717X,
606 .hw_audio_ctrl = IVTV_HW_SAA717X,
607 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
608 .video_inputs = {
609 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
610 IVTV_SAA717X_TUNER_FLAG },
611 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
612 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
613 },
614 .audio_inputs = {
615 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
616 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
617 },
618 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
619 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
620 .composite = 0x0020, .svideo = 0x0020 },
621 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
622 .f44100 = 0x4000, .f48000 = 0x8000 },
623 .tuners = {
624 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
625 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
626 },
627 .i2c = &ivtv_i2c_std,
628 };
629
630 /* ------------------------------------------------------------------------- */
631
632 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
633
634 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
635 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
636 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
637 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
638 { 0, 0, 0 }
639 };
640
641 static const struct ivtv_card ivtv_card_gv_mvprx = {
642 .type = IVTV_CARD_GV_MVPRX,
643 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
644 .v4l2_capabilities = IVTV_CAP_ENCODER,
645 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
646 .hw_audio = IVTV_HW_GPIO,
647 .hw_audio_ctrl = IVTV_HW_WM8739,
648 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
649 IVTV_HW_TUNER | IVTV_HW_WM8739 |
650 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
651 .video_inputs = {
652 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
653 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
654 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
655 },
656 .audio_inputs = {
657 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
658 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
659 },
660 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
661 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
662 .tuners = {
663 /* This card has the Panasonic VP27 tuner */
664 { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
665 },
666 .pci_list = ivtv_pci_gv_mvprx,
667 .i2c = &ivtv_i2c_std,
668 };
669
670 /* ------------------------------------------------------------------------- */
671
672 /* I/O Data GV-MVP/RX2E card */
673
674 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
675 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
676 {0, 0, 0}
677 };
678
679 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
680 .type = IVTV_CARD_GV_MVPRX2E,
681 .name = "I/O Data GV-MVP/RX2E",
682 .v4l2_capabilities = IVTV_CAP_ENCODER,
683 .hw_video = IVTV_HW_SAA7115,
684 .hw_audio = IVTV_HW_GPIO,
685 .hw_audio_ctrl = IVTV_HW_WM8739,
686 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
687 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
688 .video_inputs = {
689 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
690 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
691 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
692 },
693 .audio_inputs = {
694 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
695 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
696 },
697 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
698 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
699 .tuners = {
700 /* This card has the Panasonic VP27 tuner */
701 { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
702 },
703 .pci_list = ivtv_pci_gv_mvprx2e,
704 .i2c = &ivtv_i2c_std,
705 };
706
707 /* ------------------------------------------------------------------------- */
708
709 /* GotVIEW PCI DVD card */
710
711 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
712 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
713 { 0, 0, 0 }
714 };
715
716 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
717 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
718 .name = "GotView PCI DVD",
719 .v4l2_capabilities = IVTV_CAP_ENCODER,
720 .hw_video = IVTV_HW_SAA717X,
721 .hw_audio = IVTV_HW_SAA717X,
722 .hw_audio_ctrl = IVTV_HW_SAA717X,
723 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
724 .video_inputs = {
725 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
726 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
727 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
728 },
729 .audio_inputs = {
730 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
731 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
732 },
733 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
734 .tuners = {
735 /* This card has a Philips FQ1216ME MK3 tuner */
736 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
737 },
738 .pci_list = ivtv_pci_gotview_pci_dvd,
739 .i2c = &ivtv_i2c_std,
740 };
741
742 /* ------------------------------------------------------------------------- */
743
744 /* GotVIEW PCI DVD2 Deluxe card */
745
746 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
747 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
748 { 0, 0, 0 }
749 };
750
751 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
752 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
753 .name = "GotView PCI DVD2 Deluxe",
754 .v4l2_capabilities = IVTV_CAP_ENCODER,
755 .hw_video = IVTV_HW_CX25840,
756 .hw_audio = IVTV_HW_CX25840,
757 .hw_audio_ctrl = IVTV_HW_CX25840,
758 .hw_muxer = IVTV_HW_GPIO,
759 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
760 .video_inputs = {
761 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
762 { IVTV_CARD_INPUT_SVIDEO1, 1,
763 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
764 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
765 },
766 .audio_inputs = {
767 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
768 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
769 },
770 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
771 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
772 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
773 .tuners = {
774 /* This card has a Philips FQ1216ME MK5 tuner */
775 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
776 },
777 .pci_list = ivtv_pci_gotview_pci_dvd2,
778 .i2c = &ivtv_i2c_std,
779 };
780
781 /* ------------------------------------------------------------------------- */
782
783 /* Yuan MPC622 miniPCI card */
784
785 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
786 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
787 { 0, 0, 0 }
788 };
789
790 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
791 .type = IVTV_CARD_YUAN_MPC622,
792 .name = "Yuan MPC622",
793 .v4l2_capabilities = IVTV_CAP_ENCODER,
794 .hw_video = IVTV_HW_CX25840,
795 .hw_audio = IVTV_HW_CX25840,
796 .hw_audio_ctrl = IVTV_HW_CX25840,
797 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
798 .video_inputs = {
799 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
800 { IVTV_CARD_INPUT_SVIDEO1, 1,
801 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
802 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
803 },
804 .audio_inputs = {
805 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
806 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
807 },
808 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
809 .tuners = {
810 /* This card has the TDA8290/TDA8275 tuner chips */
811 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
812 },
813 .pci_list = ivtv_pci_yuan_mpc622,
814 .i2c = &ivtv_i2c_tda8290,
815 };
816
817 /* ------------------------------------------------------------------------- */
818
819 /* DIGITAL COWBOY DCT-MTVP1 card */
820
821 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
822 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
823 { 0, 0, 0 }
824 };
825
826 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
827 .type = IVTV_CARD_DCTMTVP1,
828 .name = "Digital Cowboy DCT-MTVP1",
829 .v4l2_capabilities = IVTV_CAP_ENCODER,
830 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
831 IVTV_HW_GPIO,
832 .hw_audio = IVTV_HW_GPIO,
833 .hw_audio_ctrl = IVTV_HW_GPIO,
834 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
835 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
836 .video_inputs = {
837 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
838 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
839 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
840 },
841 .audio_inputs = {
842 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
843 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
844 },
845 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
846 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
847 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
848 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
849 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
850 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
851 .composite = 0x0010, .svideo = 0x0020},
852 .tuners = {
853 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
854 },
855 .pci_list = ivtv_pci_dctmvtvp1,
856 .i2c = &ivtv_i2c_std,
857 };
858
859 /* ------------------------------------------------------------------------- */
860
861 /* Yuan PG600-2/GotView PCI DVD Lite cards */
862
863 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
864 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
865 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
866 { 0, 0, 0 }
867 };
868
869 static const struct ivtv_card ivtv_card_pg600v2 = {
870 .type = IVTV_CARD_PG600V2,
871 .name = "Yuan PG600-2, GotView PCI DVD Lite",
872 .v4l2_capabilities = IVTV_CAP_ENCODER,
873 .hw_video = IVTV_HW_CX25840,
874 .hw_audio = IVTV_HW_CX25840,
875 .hw_audio_ctrl = IVTV_HW_CX25840,
876 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
877 /* XC2028 support apparently works for the Yuan, it's still
878 uncertain whether it also works with the GotView. */
879 .video_inputs = {
880 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
881 { IVTV_CARD_INPUT_SVIDEO1, 1,
882 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
883 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
884 },
885 .audio_inputs = {
886 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
887 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
888 },
889 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
890 .xceive_pin = 12,
891 .tuners = {
892 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
893 },
894 .pci_list = ivtv_pci_pg600v2,
895 .i2c = &ivtv_i2c_std,
896 };
897
898 /* ------------------------------------------------------------------------- */
899
900 /* Club3D ZAP-TV1x01 cards */
901
902 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
903 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
904 { 0, 0, 0 }
905 };
906
907 static const struct ivtv_card ivtv_card_club3d = {
908 .type = IVTV_CARD_CLUB3D,
909 .name = "Club3D ZAP-TV1x01",
910 .v4l2_capabilities = IVTV_CAP_ENCODER,
911 .hw_video = IVTV_HW_CX25840,
912 .hw_audio = IVTV_HW_CX25840,
913 .hw_audio_ctrl = IVTV_HW_CX25840,
914 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
915 .video_inputs = {
916 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
917 { IVTV_CARD_INPUT_SVIDEO1, 1,
918 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
919 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
920 },
921 .audio_inputs = {
922 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
923 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
924 },
925 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
926 .xceive_pin = 12,
927 .tuners = {
928 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
929 },
930 .pci_list = ivtv_pci_club3d,
931 .i2c = &ivtv_i2c_std,
932 };
933
934 /* ------------------------------------------------------------------------- */
935
936 /* AVerTV MCE 116 Plus (M116) card */
937
938 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
939 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
940 { 0, 0, 0 }
941 };
942
943 static const struct ivtv_card ivtv_card_avertv_mce116 = {
944 .type = IVTV_CARD_AVERTV_MCE116,
945 .name = "AVerTV MCE 116 Plus",
946 .v4l2_capabilities = IVTV_CAP_ENCODER,
947 .hw_video = IVTV_HW_CX25840,
948 .hw_audio = IVTV_HW_CX25840,
949 .hw_audio_ctrl = IVTV_HW_CX25840,
950 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739 |
951 IVTV_HW_I2C_IR_RX_AVER,
952 .video_inputs = {
953 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
954 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
955 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
956 },
957 .audio_inputs = {
958 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
959 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
960 },
961 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
962 /* enable line-in */
963 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
964 .xceive_pin = 10,
965 .tuners = {
966 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
967 },
968 .pci_list = ivtv_pci_avertv_mce116,
969 .i2c = &ivtv_i2c_std,
970 };
971
972 /* ------------------------------------------------------------------------- */
973
974 /* AVerMedia PVR-150 Plus / AVerTV M113 cards with a Daewoo/Partsnic Tuner */
975
976 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
977 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc034 }, /* NTSC */
978 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 }, /* NTSC FM */
979 { 0, 0, 0 }
980 };
981
982 static const struct ivtv_card ivtv_card_aver_pvr150 = {
983 .type = IVTV_CARD_AVER_PVR150PLUS,
984 .name = "AVerMedia PVR-150 Plus / AVerTV M113 Partsnic (Daewoo) Tuner",
985 .v4l2_capabilities = IVTV_CAP_ENCODER,
986 .hw_video = IVTV_HW_CX25840,
987 .hw_audio = IVTV_HW_CX25840,
988 .hw_audio_ctrl = IVTV_HW_CX25840,
989 .hw_muxer = IVTV_HW_GPIO,
990 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
991 IVTV_HW_WM8739 | IVTV_HW_GPIO,
992 .video_inputs = {
993 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
994 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
995 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
996 },
997 .audio_inputs = {
998 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
999 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1000 },
1001 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1002 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1003 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1004 .gpio_audio_input = { .mask = 0xc000,
1005 .tuner = 0x0000,
1006 .linein = 0x4000,
1007 .radio = 0x8000 },
1008 .tuners = {
1009 /* Subsystem ID's 0xc03[45] have a Partsnic PTI-5NF05 tuner */
1010 { .std = V4L2_STD_MN, .tuner = TUNER_PARTSNIC_PTI_5NF05 },
1011 },
1012 .pci_list = ivtv_pci_aver_pvr150,
1013 /* Subsystem ID 0xc035 has a TEA5767(?) FM tuner, 0xc034 does not */
1014 .i2c = &ivtv_i2c_radio,
1015 };
1016
1017 /* ------------------------------------------------------------------------- */
1018
1019 /* AVerMedia UltraTV 1500 MCE (newer non-cx88 version, M113 variant) card */
1020
1021 static const struct ivtv_card_pci_info ivtv_pci_aver_ultra1500mce[] = {
1022 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc019 }, /* NTSC */
1023 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc01b }, /* PAL/SECAM */
1024 { 0, 0, 0 }
1025 };
1026
1027 static const struct ivtv_card ivtv_card_aver_ultra1500mce = {
1028 .type = IVTV_CARD_AVER_ULTRA1500MCE,
1029 .name = "AVerMedia UltraTV 1500 MCE / AVerTV M113 Philips Tuner",
1030 .comment = "For non-NTSC tuners, use the pal= or secam= module options",
1031 .v4l2_capabilities = IVTV_CAP_ENCODER,
1032 .hw_video = IVTV_HW_CX25840,
1033 .hw_audio = IVTV_HW_CX25840,
1034 .hw_audio_ctrl = IVTV_HW_CX25840,
1035 .hw_muxer = IVTV_HW_GPIO,
1036 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1037 IVTV_HW_WM8739 | IVTV_HW_GPIO,
1038 .video_inputs = {
1039 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1040 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1041 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1042 },
1043 .audio_inputs = {
1044 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1045 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1046 },
1047 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1048 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1049 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1050 .gpio_audio_input = { .mask = 0xc000,
1051 .tuner = 0x0000,
1052 .linein = 0x4000,
1053 .radio = 0x8000 },
1054 .tuners = {
1055 /* The UltraTV 1500 MCE has a Philips FM1236 MK5 TV/FM tuner */
1056 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1057 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216MK5 },
1058 },
1059 .pci_list = ivtv_pci_aver_ultra1500mce,
1060 .i2c = &ivtv_i2c_std,
1061 };
1062
1063 /* ------------------------------------------------------------------------- */
1064
1065 /* AVerMedia EZMaker PCI Deluxe card */
1066
1067 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1068 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1069 { 0, 0, 0 }
1070 };
1071
1072 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1073 .type = IVTV_CARD_AVER_EZMAKER,
1074 .name = "AVerMedia EZMaker PCI Deluxe",
1075 .v4l2_capabilities = IVTV_CAP_ENCODER,
1076 .hw_video = IVTV_HW_CX25840,
1077 .hw_audio = IVTV_HW_CX25840,
1078 .hw_audio_ctrl = IVTV_HW_CX25840,
1079 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1080 .video_inputs = {
1081 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1082 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1083 },
1084 .audio_inputs = {
1085 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1086 },
1087 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1088 /* Does not have a tuner */
1089 .pci_list = ivtv_pci_aver_ezmaker,
1090 };
1091
1092 /* ------------------------------------------------------------------------- */
1093
1094 /* ASUS Falcon2 */
1095
1096 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1097 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1098 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1099 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1100 { 0, 0, 0 }
1101 };
1102
1103 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1104 .type = IVTV_CARD_ASUS_FALCON2,
1105 .name = "ASUS Falcon2",
1106 .v4l2_capabilities = IVTV_CAP_ENCODER,
1107 .hw_video = IVTV_HW_CX25840,
1108 .hw_audio = IVTV_HW_CX25840,
1109 .hw_audio_ctrl = IVTV_HW_CX25840,
1110 .hw_muxer = IVTV_HW_M52790,
1111 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1112 .video_inputs = {
1113 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1114 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1115 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1116 },
1117 .audio_inputs = {
1118 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1119 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1120 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1121 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1122 },
1123 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1124 .tuners = {
1125 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1126 },
1127 .pci_list = ivtv_pci_asus_falcon2,
1128 .i2c = &ivtv_i2c_std,
1129 };
1130
1131 /* ------------------------------------------------------------------------- */
1132
1133 /* AVerMedia M104 miniPCI card */
1134
1135 static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1136 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1137 { 0, 0, 0 }
1138 };
1139
1140 static const struct ivtv_card ivtv_card_aver_m104 = {
1141 .type = IVTV_CARD_AVER_M104,
1142 .name = "AVerMedia M104",
1143 .comment = "Not yet supported!\n",
1144 .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1145 .hw_video = IVTV_HW_CX25840,
1146 .hw_audio = IVTV_HW_CX25840,
1147 .hw_audio_ctrl = IVTV_HW_CX25840,
1148 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1149 .video_inputs = {
1150 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1151 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1152 },
1153 .audio_inputs = {
1154 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1155 },
1156 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1157 /* enable line-in + reset tuner */
1158 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
1159 .xceive_pin = 10,
1160 .tuners = {
1161 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1162 },
1163 .pci_list = ivtv_pci_aver_m104,
1164 .i2c = &ivtv_i2c_std,
1165 };
1166
1167 /* ------------------------------------------------------------------------- */
1168
1169 /* Buffalo PC-MV5L/PCI cards */
1170
1171 static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1172 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1173 { 0, 0, 0 }
1174 };
1175
1176 static const struct ivtv_card ivtv_card_buffalo = {
1177 .type = IVTV_CARD_BUFFALO_MV5L,
1178 .name = "Buffalo PC-MV5L/PCI",
1179 .v4l2_capabilities = IVTV_CAP_ENCODER,
1180 .hw_video = IVTV_HW_CX25840,
1181 .hw_audio = IVTV_HW_CX25840,
1182 .hw_audio_ctrl = IVTV_HW_CX25840,
1183 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1184 .video_inputs = {
1185 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1186 { IVTV_CARD_INPUT_SVIDEO1, 1,
1187 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1188 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1189 },
1190 .audio_inputs = {
1191 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
1192 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
1193 },
1194 .xceive_pin = 12,
1195 .tuners = {
1196 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1197 },
1198 .pci_list = ivtv_pci_buffalo,
1199 .i2c = &ivtv_i2c_std,
1200 };
1201
1202 /* ------------------------------------------------------------------------- */
1203 /* Sony Kikyou */
1204
1205 static const struct ivtv_card_pci_info ivtv_pci_kikyou[] = {
1206 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_SONY, 0x813d },
1207 { 0, 0, 0 }
1208 };
1209
1210 static const struct ivtv_card ivtv_card_kikyou = {
1211 .type = IVTV_CARD_KIKYOU,
1212 .name = "Sony VAIO Giga Pocket (ENX Kikyou)",
1213 .v4l2_capabilities = IVTV_CAP_ENCODER,
1214 .hw_video = IVTV_HW_SAA7115,
1215 .hw_audio = IVTV_HW_GPIO,
1216 .hw_audio_ctrl = IVTV_HW_GPIO,
1217 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
1218 .video_inputs = {
1219 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 },
1220 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE1 },
1221 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
1222 },
1223 .audio_inputs = {
1224 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
1225 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
1226 { IVTV_CARD_INPUT_LINE_IN2, IVTV_GPIO_LINE_IN },
1227 },
1228 .gpio_init = { .direction = 0x03e1, .initial_value = 0x0320 },
1229 .gpio_audio_input = { .mask = 0x0060,
1230 .tuner = 0x0020,
1231 .linein = 0x0000,
1232 .radio = 0x0060 },
1233 .gpio_audio_mute = { .mask = 0x0000,
1234 .mute = 0x0000 }, /* 0x200? Disable for now. */
1235 .gpio_audio_mode = { .mask = 0x0080,
1236 .mono = 0x0000,
1237 .stereo = 0x0000, /* SAP */
1238 .lang1 = 0x0080,
1239 .lang2 = 0x0000,
1240 .both = 0x0080 },
1241 .tuners = {
1242 { .std = V4L2_STD_ALL, .tuner = TUNER_SONY_BTF_PXN01Z },
1243 },
1244 .pci_list = ivtv_pci_kikyou,
1245 .i2c = &ivtv_i2c_std,
1246 };
1247
1248
1249 static const struct ivtv_card *ivtv_card_list[] = {
1250 &ivtv_card_pvr250,
1251 &ivtv_card_pvr350,
1252 &ivtv_card_pvr150,
1253 &ivtv_card_m179,
1254 &ivtv_card_mpg600,
1255 &ivtv_card_mpg160,
1256 &ivtv_card_pg600,
1257 &ivtv_card_avc2410,
1258 &ivtv_card_avc2010,
1259 &ivtv_card_tg5000tv,
1260 &ivtv_card_va2000,
1261 &ivtv_card_cx23416gyc,
1262 &ivtv_card_gv_mvprx,
1263 &ivtv_card_gv_mvprx2e,
1264 &ivtv_card_gotview_pci_dvd,
1265 &ivtv_card_gotview_pci_dvd2,
1266 &ivtv_card_yuan_mpc622,
1267 &ivtv_card_dctmvtvp1,
1268 &ivtv_card_pg600v2,
1269 &ivtv_card_club3d,
1270 &ivtv_card_avertv_mce116,
1271 &ivtv_card_asus_falcon2,
1272 &ivtv_card_aver_pvr150,
1273 &ivtv_card_aver_ezmaker,
1274 &ivtv_card_aver_m104,
1275 &ivtv_card_buffalo,
1276 &ivtv_card_aver_ultra1500mce,
1277 &ivtv_card_kikyou,
1278
1279 /* Variations of standard cards but with the same PCI IDs.
1280 These cards must come last in this list. */
1281 &ivtv_card_pvr350_v1,
1282 &ivtv_card_cx23416gyc_nogr,
1283 &ivtv_card_cx23416gyc_nogrycs,
1284 };
1285
ivtv_get_card(u16 index)1286 const struct ivtv_card *ivtv_get_card(u16 index)
1287 {
1288 if (index >= ARRAY_SIZE(ivtv_card_list))
1289 return NULL;
1290 return ivtv_card_list[index];
1291 }
1292
ivtv_get_input(struct ivtv * itv,u16 index,struct v4l2_input * input)1293 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1294 {
1295 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1296 static const char * const input_strs[] = {
1297 "Tuner 1",
1298 "S-Video 1",
1299 "S-Video 2",
1300 "Composite 1",
1301 "Composite 2",
1302 "Composite 3"
1303 };
1304
1305 if (index >= itv->nof_inputs)
1306 return -EINVAL;
1307 input->index = index;
1308 strscpy(input->name, input_strs[card_input->video_type - 1],
1309 sizeof(input->name));
1310 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1311 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1312 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1313 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1314 itv->tuner_std : V4L2_STD_ALL;
1315 return 0;
1316 }
1317
ivtv_get_output(struct ivtv * itv,u16 index,struct v4l2_output * output)1318 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1319 {
1320 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1321
1322 if (index >= itv->card->nof_outputs)
1323 return -EINVAL;
1324 output->index = index;
1325 strscpy(output->name, card_output->name, sizeof(output->name));
1326 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1327 output->audioset = 1;
1328 output->std = V4L2_STD_ALL;
1329 return 0;
1330 }
1331
ivtv_get_audio_input(struct ivtv * itv,u16 index,struct v4l2_audio * audio)1332 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1333 {
1334 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1335 static const char * const input_strs[] = {
1336 "Tuner 1",
1337 "Line In 1",
1338 "Line In 2"
1339 };
1340
1341 memset(audio, 0, sizeof(*audio));
1342 if (index >= itv->nof_audio_inputs)
1343 return -EINVAL;
1344 strscpy(audio->name, input_strs[aud_input->audio_type - 1],
1345 sizeof(audio->name));
1346 audio->index = index;
1347 audio->capability = V4L2_AUDCAP_STEREO;
1348 return 0;
1349 }
1350
ivtv_get_audio_output(struct ivtv * itv,u16 index,struct v4l2_audioout * aud_output)1351 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1352 {
1353 memset(aud_output, 0, sizeof(*aud_output));
1354 if (itv->card->video_outputs == NULL || index != 0)
1355 return -EINVAL;
1356 strscpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
1357 return 0;
1358 }
1359