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