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>
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.
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.
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
21 #include "ivtv-driver.h"
22 #include "ivtv-cards.h"
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>
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)
43 /* usual i2c tuner addresses to probe */
44 static struct ivtv_card_tuner_i2c ivtv_i2c_std = {
45 .radio = { I2C_CLIENT_END },
46 .demod = { 0x43, I2C_CLIENT_END },
47 .tv = { 0x61, 0x60, I2C_CLIENT_END },
50 /* as above, but with possible radio tuner */
51 static struct ivtv_card_tuner_i2c ivtv_i2c_radio = {
52 .radio = { 0x60, I2C_CLIENT_END },
53 .demod = { 0x43, I2C_CLIENT_END },
54 .tv = { 0x61, I2C_CLIENT_END },
57 /* using the tda8290+75a combo */
58 static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
59 .radio = { I2C_CLIENT_END },
60 .demod = { I2C_CLIENT_END },
61 .tv = { 0x4b, I2C_CLIENT_END },
64 /********************** card configuration *******************************/
66 /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii
67 This keeps the PCI ID database up to date. Note that the entries
68 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
69 New vendor IDs should still be added to the vendor ID list. */
71 /* Hauppauge PVR-250 cards */
73 /* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
74 static const struct ivtv_card ivtv_card_pvr250 = {
75 .type = IVTV_CARD_PVR_250,
76 .name = "Hauppauge WinTV PVR-250",
77 .v4l2_capabilities = IVTV_CAP_ENCODER,
78 .hw_video = IVTV_HW_SAA7115,
79 .hw_audio = IVTV_HW_MSP34XX,
80 .hw_audio_ctrl = IVTV_HW_MSP34XX,
81 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
82 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
84 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
85 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
86 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
87 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
88 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
89 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
92 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
93 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
94 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
96 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
100 /* ------------------------------------------------------------------------- */
102 /* Hauppauge PVR-350 cards */
104 /* Outputs for Hauppauge PVR350 cards */
105 static struct ivtv_card_output ivtv_pvr350_outputs[] = {
107 .name = "S-Video + Composite",
127 static const struct ivtv_card ivtv_card_pvr350 = {
128 .type = IVTV_CARD_PVR_350,
129 .name = "Hauppauge WinTV PVR-350",
130 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
131 .video_outputs = ivtv_pvr350_outputs,
132 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
133 .hw_video = IVTV_HW_SAA7115,
134 .hw_audio = IVTV_HW_MSP34XX,
135 .hw_audio_ctrl = IVTV_HW_MSP34XX,
136 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
137 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
139 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
140 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
141 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
142 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
143 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
144 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
147 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
148 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
149 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
151 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
152 .i2c = &ivtv_i2c_std,
155 /* PVR-350 V1 boards have a different audio tuner input and use a
156 saa7114 instead of a saa7115.
157 Note that the info below comes from a pre-production model so it may
158 not be correct. Especially the audio behaves strangely (mono only it seems) */
159 static const struct ivtv_card ivtv_card_pvr350_v1 = {
160 .type = IVTV_CARD_PVR_350_V1,
161 .name = "Hauppauge WinTV PVR-350 (V1)",
162 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
163 .video_outputs = ivtv_pvr350_outputs,
164 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
165 .hw_video = IVTV_HW_SAA7114,
166 .hw_audio = IVTV_HW_MSP34XX,
167 .hw_audio_ctrl = IVTV_HW_MSP34XX,
168 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
169 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
171 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
172 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
173 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
174 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
175 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
176 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
179 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
180 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
181 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
183 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
184 .i2c = &ivtv_i2c_std,
187 /* ------------------------------------------------------------------------- */
189 /* Hauppauge PVR-150/PVR-500 cards */
191 static const struct ivtv_card ivtv_card_pvr150 = {
192 .type = IVTV_CARD_PVR_150,
193 .name = "Hauppauge WinTV PVR-150",
194 .v4l2_capabilities = IVTV_CAP_ENCODER,
195 .hw_video = IVTV_HW_CX25840,
196 .hw_audio = IVTV_HW_CX25840,
197 .hw_audio_ctrl = IVTV_HW_CX25840,
198 .hw_muxer = IVTV_HW_WM8775,
199 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
200 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
202 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
203 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
204 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
205 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
206 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
209 { IVTV_CARD_INPUT_AUD_TUNER,
210 CX25840_AUDIO8, WM8775_AIN2 },
211 { IVTV_CARD_INPUT_LINE_IN1,
212 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
213 { IVTV_CARD_INPUT_LINE_IN2,
214 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
216 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
217 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
218 /* apparently needed for the IR blaster */
219 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
220 .i2c = &ivtv_i2c_std,
223 /* ------------------------------------------------------------------------- */
225 /* AVerMedia M179 cards */
227 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
228 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
229 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
233 static const struct ivtv_card ivtv_card_m179 = {
234 .type = IVTV_CARD_M179,
235 .name = "AVerMedia M179",
236 .v4l2_capabilities = IVTV_CAP_ENCODER,
237 .hw_video = IVTV_HW_SAA7114,
238 .hw_audio = IVTV_HW_GPIO,
239 .hw_audio_ctrl = IVTV_HW_GPIO,
240 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
242 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
243 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
244 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
247 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
248 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
250 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
251 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
252 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
253 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
254 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
255 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
256 .f44100 = 0x0008, .f48000 = 0x0010 },
257 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
259 /* As far as we know all M179 cards use this tuner */
260 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
262 .pci_list = ivtv_pci_m179,
263 .i2c = &ivtv_i2c_std,
266 /* ------------------------------------------------------------------------- */
268 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
270 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
271 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
272 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
276 static const struct ivtv_card ivtv_card_mpg600 = {
277 .type = IVTV_CARD_MPG600,
278 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
279 .v4l2_capabilities = IVTV_CAP_ENCODER,
280 .hw_video = IVTV_HW_SAA7115,
281 .hw_audio = IVTV_HW_GPIO,
282 .hw_audio_ctrl = IVTV_HW_GPIO,
283 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
285 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
286 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
287 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
290 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
291 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
293 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
294 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
295 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
296 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
297 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
298 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
300 /* The PAL tuner is confirmed */
301 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
302 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
304 .pci_list = ivtv_pci_mpg600,
305 .i2c = &ivtv_i2c_std,
308 /* ------------------------------------------------------------------------- */
310 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
312 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
313 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
314 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
318 static const struct ivtv_card ivtv_card_mpg160 = {
319 .type = IVTV_CARD_MPG160,
320 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
321 .v4l2_capabilities = IVTV_CAP_ENCODER,
322 .hw_video = IVTV_HW_SAA7114,
323 .hw_audio = IVTV_HW_GPIO,
324 .hw_audio_ctrl = IVTV_HW_GPIO,
325 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
327 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
328 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
329 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
332 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
333 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
335 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
336 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
337 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
338 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
339 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
340 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
342 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
343 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
345 .pci_list = ivtv_pci_mpg160,
346 .i2c = &ivtv_i2c_std,
349 /* ------------------------------------------------------------------------- */
351 /* Yuan PG600/Diamond PVR-550 cards */
353 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
354 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
355 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
359 static const struct ivtv_card ivtv_card_pg600 = {
360 .type = IVTV_CARD_PG600,
361 .name = "Yuan PG600, Diamond PVR-550",
362 .v4l2_capabilities = IVTV_CAP_ENCODER,
363 .hw_video = IVTV_HW_CX25840,
364 .hw_audio = IVTV_HW_CX25840,
365 .hw_audio_ctrl = IVTV_HW_CX25840,
366 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
368 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
369 { IVTV_CARD_INPUT_SVIDEO1, 1,
370 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
371 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
374 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
375 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
378 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
379 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
381 .pci_list = ivtv_pci_pg600,
382 .i2c = &ivtv_i2c_std,
385 /* ------------------------------------------------------------------------- */
387 /* Adaptec VideOh! AVC-2410 card */
389 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
390 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
394 static const struct ivtv_card ivtv_card_avc2410 = {
395 .type = IVTV_CARD_AVC2410,
396 .name = "Adaptec VideOh! AVC-2410",
397 .v4l2_capabilities = IVTV_CAP_ENCODER,
398 .hw_video = IVTV_HW_SAA7115,
399 .hw_audio = IVTV_HW_MSP34XX,
400 .hw_audio_ctrl = IVTV_HW_MSP34XX,
401 .hw_muxer = IVTV_HW_CS53L32A,
402 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
403 IVTV_HW_SAA7115 | IVTV_HW_TUNER,
405 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
406 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
407 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
410 { IVTV_CARD_INPUT_AUD_TUNER,
411 MSP_TUNER, CS53L32A_IN0 },
412 { IVTV_CARD_INPUT_LINE_IN1,
413 MSP_SCART1, CS53L32A_IN2 },
415 /* This card has no eeprom and in fact the Windows driver relies
416 on the country/region setting of the user to decide which tuner
419 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
420 { .std = V4L2_STD_ALL - V4L2_STD_NTSC_M_JP,
421 .tuner = TUNER_PHILIPS_FM1236_MK3 },
422 { .std = V4L2_STD_NTSC_M_JP, .tuner = TUNER_PHILIPS_FQ1286 },
424 .pci_list = ivtv_pci_avc2410,
425 .i2c = &ivtv_i2c_std,
428 /* ------------------------------------------------------------------------- */
430 /* Adaptec VideOh! AVC-2010 card */
432 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
433 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
437 static const struct ivtv_card ivtv_card_avc2010 = {
438 .type = IVTV_CARD_AVC2010,
439 .name = "Adaptec VideOh! AVC-2010",
440 .v4l2_capabilities = IVTV_CAP_ENCODER,
441 .hw_video = IVTV_HW_SAA7115,
442 .hw_audio = IVTV_HW_CS53L32A,
443 .hw_audio_ctrl = IVTV_HW_CS53L32A,
444 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
446 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
447 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
450 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
452 /* Does not have a tuner */
453 .pci_list = ivtv_pci_avc2010,
456 /* ------------------------------------------------------------------------- */
458 /* Nagase Transgear 5000TV card */
460 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
461 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
465 static const struct ivtv_card ivtv_card_tg5000tv = {
466 .type = IVTV_CARD_TG5000TV,
467 .name = "Nagase Transgear 5000TV",
468 .v4l2_capabilities = IVTV_CAP_ENCODER,
469 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
471 .hw_audio = IVTV_HW_GPIO,
472 .hw_audio_ctrl = IVTV_HW_GPIO,
473 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
474 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
476 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
477 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
478 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
481 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
482 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
484 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
485 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
486 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
487 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
488 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
489 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
490 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
491 .composite = 0x0010, .svideo = 0x0020 },
493 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
495 .pci_list = ivtv_pci_tg5000tv,
496 .i2c = &ivtv_i2c_std,
499 /* ------------------------------------------------------------------------- */
501 /* AOpen VA2000MAX-SNT6 card */
503 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
504 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
508 static const struct ivtv_card ivtv_card_va2000 = {
509 .type = IVTV_CARD_VA2000MAX_SNT6,
510 .name = "AOpen VA2000MAX-SNT6",
511 .v4l2_capabilities = IVTV_CAP_ENCODER,
512 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
513 .hw_audio = IVTV_HW_MSP34XX,
514 .hw_audio_ctrl = IVTV_HW_MSP34XX,
515 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
516 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
518 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
521 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
524 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
526 .pci_list = ivtv_pci_va2000,
527 .i2c = &ivtv_i2c_std,
530 /* ------------------------------------------------------------------------- */
532 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
534 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
535 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
536 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
537 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
541 static const struct ivtv_card ivtv_card_cx23416gyc = {
542 .type = IVTV_CARD_CX23416GYC,
543 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
544 .v4l2_capabilities = IVTV_CAP_ENCODER,
545 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
546 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
547 .hw_audio = IVTV_HW_SAA717X,
548 .hw_audio_ctrl = IVTV_HW_SAA717X,
549 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
550 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
552 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
553 IVTV_SAA717X_TUNER_FLAG },
554 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
555 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
558 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
559 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
561 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
562 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
563 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
564 .composite = 0x0020, .svideo = 0x0020 },
565 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
566 .f44100 = 0x4000, .f48000 = 0x8000 },
568 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
569 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
571 .pci_list = ivtv_pci_cx23416gyc,
572 .i2c = &ivtv_i2c_std,
575 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
576 .type = IVTV_CARD_CX23416GYC_NOGR,
577 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
578 .v4l2_capabilities = IVTV_CAP_ENCODER,
579 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
580 .hw_audio = IVTV_HW_SAA717X,
581 .hw_audio_ctrl = IVTV_HW_SAA717X,
582 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
585 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
586 IVTV_SAA717X_TUNER_FLAG },
587 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
588 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
591 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
592 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
594 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
595 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
596 .composite = 0x0020, .svideo = 0x0020 },
597 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
598 .f44100 = 0x4000, .f48000 = 0x8000 },
600 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
601 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
603 .i2c = &ivtv_i2c_std,
606 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
607 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
608 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
609 .v4l2_capabilities = IVTV_CAP_ENCODER,
610 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
611 .hw_audio = IVTV_HW_SAA717X,
612 .hw_audio_ctrl = IVTV_HW_SAA717X,
613 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
615 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
616 IVTV_SAA717X_TUNER_FLAG },
617 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
618 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
621 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
622 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
624 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
625 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
626 .composite = 0x0020, .svideo = 0x0020 },
627 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
628 .f44100 = 0x4000, .f48000 = 0x8000 },
630 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
631 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
633 .i2c = &ivtv_i2c_std,
636 /* ------------------------------------------------------------------------- */
638 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
640 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
641 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
642 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
643 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
647 static const struct ivtv_card ivtv_card_gv_mvprx = {
648 .type = IVTV_CARD_GV_MVPRX,
649 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
650 .v4l2_capabilities = IVTV_CAP_ENCODER,
651 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
652 .hw_audio = IVTV_HW_GPIO,
653 .hw_audio_ctrl = IVTV_HW_WM8739,
654 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
655 IVTV_HW_TUNER | IVTV_HW_WM8739 |
656 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
658 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
659 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
660 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
663 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
664 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
666 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
667 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
669 /* This card has the Panasonic VP27 tuner */
670 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
672 .pci_list = ivtv_pci_gv_mvprx,
673 .i2c = &ivtv_i2c_std,
676 /* ------------------------------------------------------------------------- */
678 /* I/O Data GV-MVP/RX2E card */
680 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
681 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
685 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
686 .type = IVTV_CARD_GV_MVPRX2E,
687 .name = "I/O Data GV-MVP/RX2E",
688 .v4l2_capabilities = IVTV_CAP_ENCODER,
689 .hw_video = IVTV_HW_SAA7115,
690 .hw_audio = IVTV_HW_GPIO,
691 .hw_audio_ctrl = IVTV_HW_WM8739,
692 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
693 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
695 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
696 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
697 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
700 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
701 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
703 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
704 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
706 /* This card has the Panasonic VP27 tuner */
707 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
709 .pci_list = ivtv_pci_gv_mvprx2e,
710 .i2c = &ivtv_i2c_std,
713 /* ------------------------------------------------------------------------- */
715 /* GotVIEW PCI DVD card */
717 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
718 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
722 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
723 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
724 .name = "GotView PCI DVD",
725 .v4l2_capabilities = IVTV_CAP_ENCODER,
726 .hw_video = IVTV_HW_SAA717X,
727 .hw_audio = IVTV_HW_SAA717X,
728 .hw_audio_ctrl = IVTV_HW_SAA717X,
729 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
731 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
732 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
733 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
736 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
737 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
739 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
741 /* This card has a Philips FQ1216ME MK3 tuner */
742 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
744 .pci_list = ivtv_pci_gotview_pci_dvd,
745 .i2c = &ivtv_i2c_std,
748 /* ------------------------------------------------------------------------- */
750 /* GotVIEW PCI DVD2 Deluxe card */
752 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
753 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
757 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
758 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
759 .name = "GotView PCI DVD2 Deluxe",
760 .v4l2_capabilities = IVTV_CAP_ENCODER,
761 .hw_video = IVTV_HW_CX25840,
762 .hw_audio = IVTV_HW_CX25840,
763 .hw_audio_ctrl = IVTV_HW_CX25840,
764 .hw_muxer = IVTV_HW_GPIO,
765 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
767 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
768 { IVTV_CARD_INPUT_SVIDEO1, 1,
769 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
770 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
773 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
774 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
776 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
777 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
778 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
780 /* This card has a Philips FQ1216ME MK5 tuner */
781 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
783 .pci_list = ivtv_pci_gotview_pci_dvd2,
784 .i2c = &ivtv_i2c_std,
787 /* ------------------------------------------------------------------------- */
789 /* Yuan MPC622 miniPCI card */
791 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
792 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
796 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
797 .type = IVTV_CARD_YUAN_MPC622,
798 .name = "Yuan MPC622",
799 .v4l2_capabilities = IVTV_CAP_ENCODER,
800 .hw_video = IVTV_HW_CX25840,
801 .hw_audio = IVTV_HW_CX25840,
802 .hw_audio_ctrl = IVTV_HW_CX25840,
803 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
805 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
806 { IVTV_CARD_INPUT_SVIDEO1, 1,
807 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
808 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
811 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
812 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
814 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
816 /* This card has the TDA8290/TDA8275 tuner chips */
817 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
819 .pci_list = ivtv_pci_yuan_mpc622,
820 .i2c = &ivtv_i2c_tda8290,
823 /* ------------------------------------------------------------------------- */
825 /* DIGITAL COWBOY DCT-MTVP1 card */
827 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
828 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
832 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
833 .type = IVTV_CARD_DCTMTVP1,
834 .name = "Digital Cowboy DCT-MTVP1",
835 .v4l2_capabilities = IVTV_CAP_ENCODER,
836 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
838 .hw_audio = IVTV_HW_GPIO,
839 .hw_audio_ctrl = IVTV_HW_GPIO,
840 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
841 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
843 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
844 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
845 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
848 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
849 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
851 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
852 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
853 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
854 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
855 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
856 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
857 .composite = 0x0010, .svideo = 0x0020},
859 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
861 .pci_list = ivtv_pci_dctmvtvp1,
862 .i2c = &ivtv_i2c_std,
865 /* ------------------------------------------------------------------------- */
867 /* Yuan PG600-2/GotView PCI DVD Lite cards */
869 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
870 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
871 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
875 static const struct ivtv_card ivtv_card_pg600v2 = {
876 .type = IVTV_CARD_PG600V2,
877 .name = "Yuan PG600-2, GotView PCI DVD Lite",
878 .comment = "only Composite and S-Video inputs are supported, not the tuner\n",
879 .v4l2_capabilities = IVTV_CAP_ENCODER,
880 .hw_video = IVTV_HW_CX25840,
881 .hw_audio = IVTV_HW_CX25840,
882 .hw_audio_ctrl = IVTV_HW_CX25840,
883 .hw_all = IVTV_HW_CX25840,
885 { IVTV_CARD_INPUT_SVIDEO1, 0,
886 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
887 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
890 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
892 .pci_list = ivtv_pci_pg600v2,
893 .i2c = &ivtv_i2c_std,
896 /* ------------------------------------------------------------------------- */
898 /* Club3D ZAP-TV1x01 cards */
900 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
901 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
905 static const struct ivtv_card ivtv_card_club3d = {
906 .type = IVTV_CARD_CLUB3D,
907 .name = "Club3D ZAP-TV1x01",
908 .v4l2_capabilities = IVTV_CAP_ENCODER,
909 .hw_video = IVTV_HW_CX25840,
910 .hw_audio = IVTV_HW_CX25840,
911 .hw_audio_ctrl = IVTV_HW_CX25840,
912 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
914 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
915 { IVTV_CARD_INPUT_SVIDEO1, 1,
916 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
917 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
920 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
921 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
923 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
924 .gpio_init = { .direction = 0x1000, .initial_value = 0x1000 }, /* tuner reset */
926 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
928 .pci_list = ivtv_pci_club3d,
929 .i2c = &ivtv_i2c_std,
932 /* ------------------------------------------------------------------------- */
934 /* AVerTV MCE 116 Plus (M116) card */
936 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
937 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
941 static const struct ivtv_card ivtv_card_avertv_mce116 = {
942 .type = IVTV_CARD_AVERTV_MCE116,
943 .name = "AVerTV MCE 116 Plus",
944 .comment = "only Composite and S-Video inputs are supported, not the tuner\n",
945 .v4l2_capabilities = IVTV_CAP_ENCODER,
946 .hw_video = IVTV_HW_CX25840,
947 .hw_audio = IVTV_HW_CX25840,
948 .hw_audio_ctrl = IVTV_HW_CX25840,
949 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
951 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
952 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
955 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
957 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 }, /* enable line-in */
958 .pci_list = ivtv_pci_avertv_mce116,
959 .i2c = &ivtv_i2c_std,
962 /* ------------------------------------------------------------------------- */
964 /* AVerMedia PVR-150 Plus (M113) card */
966 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
967 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 },
971 static const struct ivtv_card ivtv_card_aver_pvr150 = {
972 .type = IVTV_CARD_AVER_PVR150PLUS,
973 .name = "AVerMedia PVR-150 Plus",
974 .v4l2_capabilities = IVTV_CAP_ENCODER,
975 .hw_video = IVTV_HW_CX25840,
976 .hw_audio = IVTV_HW_CX25840,
977 .hw_audio_ctrl = IVTV_HW_CX25840,
978 .hw_muxer = IVTV_HW_GPIO,
979 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
981 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
982 { IVTV_CARD_INPUT_SVIDEO1, 1,
983 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
984 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
987 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
988 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
990 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
991 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
992 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
994 /* This card has a Partsnic PTI-5NF05 tuner */
995 { .std = V4L2_STD_525_60, .tuner = TUNER_TCL_2002N },
997 .pci_list = ivtv_pci_aver_pvr150,
998 .i2c = &ivtv_i2c_radio,
1001 /* ------------------------------------------------------------------------- */
1003 /* AVerMedia EZMaker PCI Deluxe card */
1005 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1006 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1010 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1011 .type = IVTV_CARD_AVER_EZMAKER,
1012 .name = "AVerMedia EZMaker PCI Deluxe",
1013 .v4l2_capabilities = IVTV_CAP_ENCODER,
1014 .hw_video = IVTV_HW_CX25840,
1015 .hw_audio = IVTV_HW_CX25840,
1016 .hw_audio_ctrl = IVTV_HW_CX25840,
1017 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1019 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1020 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1023 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1025 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1026 /* Does not have a tuner */
1027 .pci_list = ivtv_pci_aver_ezmaker,
1030 /* ------------------------------------------------------------------------- */
1034 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1035 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1036 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1037 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1041 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1042 .type = IVTV_CARD_ASUS_FALCON2,
1043 .name = "ASUS Falcon2",
1044 .v4l2_capabilities = IVTV_CAP_ENCODER,
1045 .hw_video = IVTV_HW_CX25840,
1046 .hw_audio = IVTV_HW_CX25840,
1047 .hw_audio_ctrl = IVTV_HW_CX25840,
1048 .hw_muxer = IVTV_HW_M52790,
1049 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1051 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1052 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1053 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1056 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1057 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1058 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1059 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1061 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1063 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1065 .pci_list = ivtv_pci_asus_falcon2,
1066 .i2c = &ivtv_i2c_std,
1069 static const struct ivtv_card *ivtv_card_list[] = {
1079 &ivtv_card_tg5000tv,
1081 &ivtv_card_cx23416gyc,
1082 &ivtv_card_gv_mvprx,
1083 &ivtv_card_gv_mvprx2e,
1084 &ivtv_card_gotview_pci_dvd,
1085 &ivtv_card_gotview_pci_dvd2,
1086 &ivtv_card_yuan_mpc622,
1087 &ivtv_card_dctmvtvp1,
1090 &ivtv_card_avertv_mce116,
1091 &ivtv_card_asus_falcon2,
1092 &ivtv_card_aver_pvr150,
1093 &ivtv_card_aver_ezmaker,
1095 /* Variations of standard cards but with the same PCI IDs.
1096 These cards must come last in this list. */
1097 &ivtv_card_pvr350_v1,
1098 &ivtv_card_cx23416gyc_nogr,
1099 &ivtv_card_cx23416gyc_nogrycs,
1102 const struct ivtv_card *ivtv_get_card(u16 index)
1104 if (index >= ARRAY_SIZE(ivtv_card_list))
1106 return ivtv_card_list[index];
1109 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1111 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1112 static const char * const input_strs[] = {
1121 memset(input, 0, sizeof(*input));
1122 if (index >= itv->nof_inputs)
1124 input->index = index;
1125 strcpy(input->name, input_strs[card_input->video_type - 1]);
1126 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1127 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1128 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1129 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1130 itv->tuner_std : V4L2_STD_ALL;
1134 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1136 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1138 memset(output, 0, sizeof(*output));
1139 if (index >= itv->card->nof_outputs)
1141 output->index = index;
1142 strcpy(output->name, card_output->name);
1143 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1144 output->audioset = 1;
1145 output->std = V4L2_STD_ALL;
1149 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1151 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1152 static const char * const input_strs[] = {
1158 memset(audio, 0, sizeof(*audio));
1159 if (index >= itv->nof_audio_inputs)
1161 strcpy(audio->name, input_strs[aud_input->audio_type - 1]);
1162 audio->index = index;
1163 audio->capability = V4L2_AUDCAP_STEREO;
1167 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1169 memset(aud_output, 0, sizeof(*aud_output));
1170 if (itv->card->video_outputs == NULL || index != 0)
1172 strcpy(aud_output->name, "A/V Audio Out");