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 #define V4L2_STD_NOT_MN (V4L2_STD_PAL|V4L2_STD_SECAM)
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 },
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 },
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 },
66 /********************** card configuration *******************************/
68 /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii
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. */
73 /* Hauppauge PVR-250 cards */
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,
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 },
94 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
95 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
96 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
98 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
102 /* ------------------------------------------------------------------------- */
104 /* Hauppauge PVR-350 cards */
106 /* Outputs for Hauppauge PVR350 cards */
107 static struct ivtv_card_output ivtv_pvr350_outputs[] = {
109 .name = "S-Video + Composite",
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,
141 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
142 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
143 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
144 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
145 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
146 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
149 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
150 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
151 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
153 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
154 .i2c = &ivtv_i2c_std,
157 /* PVR-350 V1 boards have a different audio tuner input and use a
158 saa7114 instead of a saa7115.
159 Note that the info below comes from a pre-production model so it may
160 not be correct. Especially the audio behaves strangely (mono only it seems) */
161 static const struct ivtv_card ivtv_card_pvr350_v1 = {
162 .type = IVTV_CARD_PVR_350_V1,
163 .name = "Hauppauge WinTV PVR-350 (V1)",
164 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
165 .video_outputs = ivtv_pvr350_outputs,
166 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
167 .hw_video = IVTV_HW_SAA7114,
168 .hw_audio = IVTV_HW_MSP34XX,
169 .hw_audio_ctrl = IVTV_HW_MSP34XX,
170 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
171 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
173 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
174 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
175 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
176 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
177 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
178 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
181 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
182 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
183 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
185 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
186 .i2c = &ivtv_i2c_std,
189 /* ------------------------------------------------------------------------- */
191 /* Hauppauge PVR-150/PVR-500 cards */
193 static const struct ivtv_card ivtv_card_pvr150 = {
194 .type = IVTV_CARD_PVR_150,
195 .name = "Hauppauge WinTV PVR-150",
196 .v4l2_capabilities = IVTV_CAP_ENCODER,
197 .hw_video = IVTV_HW_CX25840,
198 .hw_audio = IVTV_HW_CX25840,
199 .hw_audio_ctrl = IVTV_HW_CX25840,
200 .hw_muxer = IVTV_HW_WM8775,
201 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
202 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
204 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
205 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
206 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
207 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
208 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
211 { IVTV_CARD_INPUT_AUD_TUNER,
212 CX25840_AUDIO8, WM8775_AIN2 },
213 { IVTV_CARD_INPUT_LINE_IN1,
214 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
215 { IVTV_CARD_INPUT_LINE_IN2,
216 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
218 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
219 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
220 /* apparently needed for the IR blaster */
221 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
222 .i2c = &ivtv_i2c_std,
225 /* ------------------------------------------------------------------------- */
227 /* AVerMedia M179 cards */
229 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
230 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
231 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
235 static const struct ivtv_card ivtv_card_m179 = {
236 .type = IVTV_CARD_M179,
237 .name = "AVerMedia M179",
238 .v4l2_capabilities = IVTV_CAP_ENCODER,
239 .hw_video = IVTV_HW_SAA7114,
240 .hw_audio = IVTV_HW_GPIO,
241 .hw_audio_ctrl = IVTV_HW_GPIO,
242 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
244 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
245 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
246 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
249 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
250 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
252 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
253 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
254 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
255 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
256 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
257 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
258 .f44100 = 0x0008, .f48000 = 0x0010 },
259 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
261 /* As far as we know all M179 cards use this tuner */
262 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
264 .pci_list = ivtv_pci_m179,
265 .i2c = &ivtv_i2c_std,
268 /* ------------------------------------------------------------------------- */
270 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
272 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
273 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
274 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
278 static const struct ivtv_card ivtv_card_mpg600 = {
279 .type = IVTV_CARD_MPG600,
280 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
281 .v4l2_capabilities = IVTV_CAP_ENCODER,
282 .hw_video = IVTV_HW_SAA7115,
283 .hw_audio = IVTV_HW_GPIO,
284 .hw_audio_ctrl = IVTV_HW_GPIO,
285 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
287 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
288 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
289 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
292 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
293 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
295 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
296 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
297 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
298 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
299 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
300 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
302 /* The PAL tuner is confirmed */
303 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FQ1216ME },
304 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
306 .pci_list = ivtv_pci_mpg600,
307 .i2c = &ivtv_i2c_std,
310 /* ------------------------------------------------------------------------- */
312 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
314 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
315 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
316 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
320 static const struct ivtv_card ivtv_card_mpg160 = {
321 .type = IVTV_CARD_MPG160,
322 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
323 .v4l2_capabilities = IVTV_CAP_ENCODER,
324 .hw_video = IVTV_HW_SAA7114,
325 .hw_audio = IVTV_HW_GPIO,
326 .hw_audio_ctrl = IVTV_HW_GPIO,
327 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
329 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
330 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
331 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
334 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
335 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
337 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
338 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
339 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
340 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
341 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
342 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
344 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FQ1216ME },
345 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
347 .pci_list = ivtv_pci_mpg160,
348 .i2c = &ivtv_i2c_std,
351 /* ------------------------------------------------------------------------- */
353 /* Yuan PG600/Diamond PVR-550 cards */
355 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
356 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
357 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
361 static const struct ivtv_card ivtv_card_pg600 = {
362 .type = IVTV_CARD_PG600,
363 .name = "Yuan PG600, Diamond PVR-550",
364 .v4l2_capabilities = IVTV_CAP_ENCODER,
365 .hw_video = IVTV_HW_CX25840,
366 .hw_audio = IVTV_HW_CX25840,
367 .hw_audio_ctrl = IVTV_HW_CX25840,
368 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
370 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
371 { IVTV_CARD_INPUT_SVIDEO1, 1,
372 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
373 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
376 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
377 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
380 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FQ1216ME },
381 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
383 .pci_list = ivtv_pci_pg600,
384 .i2c = &ivtv_i2c_std,
387 /* ------------------------------------------------------------------------- */
389 /* Adaptec VideOh! AVC-2410 card */
391 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
392 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
396 static const struct ivtv_card ivtv_card_avc2410 = {
397 .type = IVTV_CARD_AVC2410,
398 .name = "Adaptec VideOh! AVC-2410",
399 .v4l2_capabilities = IVTV_CAP_ENCODER,
400 .hw_video = IVTV_HW_SAA7115,
401 .hw_audio = IVTV_HW_MSP34XX,
402 .hw_audio_ctrl = IVTV_HW_MSP34XX,
403 .hw_muxer = IVTV_HW_CS53L32A,
404 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
405 IVTV_HW_SAA7115 | IVTV_HW_TUNER,
407 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
408 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
409 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
412 { IVTV_CARD_INPUT_AUD_TUNER,
413 MSP_TUNER, CS53L32A_IN0 },
414 { IVTV_CARD_INPUT_LINE_IN1,
415 MSP_SCART1, CS53L32A_IN2 },
417 /* This card has no eeprom and in fact the Windows driver relies
418 on the country/region setting of the user to decide which tuner
421 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
422 { .std = V4L2_STD_ALL - V4L2_STD_NTSC_M_JP,
423 .tuner = TUNER_PHILIPS_FM1236_MK3 },
424 { .std = V4L2_STD_NTSC_M_JP, .tuner = TUNER_PHILIPS_FQ1286 },
426 .pci_list = ivtv_pci_avc2410,
427 .i2c = &ivtv_i2c_std,
430 /* ------------------------------------------------------------------------- */
432 /* Adaptec VideOh! AVC-2010 card */
434 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
435 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
439 static const struct ivtv_card ivtv_card_avc2010 = {
440 .type = IVTV_CARD_AVC2010,
441 .name = "Adaptec VideOh! AVC-2010",
442 .v4l2_capabilities = IVTV_CAP_ENCODER,
443 .hw_video = IVTV_HW_SAA7115,
444 .hw_audio = IVTV_HW_CS53L32A,
445 .hw_audio_ctrl = IVTV_HW_CS53L32A,
446 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
448 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
449 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
452 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
454 /* Does not have a tuner */
455 .pci_list = ivtv_pci_avc2010,
458 /* ------------------------------------------------------------------------- */
460 /* Nagase Transgear 5000TV card */
462 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
463 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
467 static const struct ivtv_card ivtv_card_tg5000tv = {
468 .type = IVTV_CARD_TG5000TV,
469 .name = "Nagase Transgear 5000TV",
470 .v4l2_capabilities = IVTV_CAP_ENCODER,
471 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
473 .hw_audio = IVTV_HW_GPIO,
474 .hw_audio_ctrl = IVTV_HW_GPIO,
475 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
476 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
478 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
479 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
480 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
483 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
484 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
486 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
487 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
488 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
489 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
490 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
491 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
492 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
493 .composite = 0x0010, .svideo = 0x0020 },
495 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
497 .pci_list = ivtv_pci_tg5000tv,
498 .i2c = &ivtv_i2c_std,
501 /* ------------------------------------------------------------------------- */
503 /* AOpen VA2000MAX-SNT6 card */
505 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
506 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
510 static const struct ivtv_card ivtv_card_va2000 = {
511 .type = IVTV_CARD_VA2000MAX_SNT6,
512 .name = "AOpen VA2000MAX-SNT6",
513 .v4l2_capabilities = IVTV_CAP_ENCODER,
514 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
515 .hw_audio = IVTV_HW_MSP34XX,
516 .hw_audio_ctrl = IVTV_HW_MSP34XX,
517 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
518 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
520 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
523 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
526 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
528 .pci_list = ivtv_pci_va2000,
529 .i2c = &ivtv_i2c_std,
532 /* ------------------------------------------------------------------------- */
534 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
536 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
537 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
538 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
539 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
543 static const struct ivtv_card ivtv_card_cx23416gyc = {
544 .type = IVTV_CARD_CX23416GYC,
545 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
546 .v4l2_capabilities = IVTV_CAP_ENCODER,
547 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
548 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
549 .hw_audio = IVTV_HW_SAA717X,
550 .hw_audio_ctrl = IVTV_HW_SAA717X,
551 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
552 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
554 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
555 IVTV_SAA717X_TUNER_FLAG },
556 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
557 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
560 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
561 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
563 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
564 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
565 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
566 .composite = 0x0020, .svideo = 0x0020 },
567 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
568 .f44100 = 0x4000, .f48000 = 0x8000 },
570 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
571 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
573 .pci_list = ivtv_pci_cx23416gyc,
574 .i2c = &ivtv_i2c_std,
577 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
578 .type = IVTV_CARD_CX23416GYC_NOGR,
579 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
580 .v4l2_capabilities = IVTV_CAP_ENCODER,
581 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
582 .hw_audio = IVTV_HW_SAA717X,
583 .hw_audio_ctrl = IVTV_HW_SAA717X,
584 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
587 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
588 IVTV_SAA717X_TUNER_FLAG },
589 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
590 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
593 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
594 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
596 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
597 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
598 .composite = 0x0020, .svideo = 0x0020 },
599 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
600 .f44100 = 0x4000, .f48000 = 0x8000 },
602 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
603 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
605 .i2c = &ivtv_i2c_std,
608 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
609 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
610 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
611 .v4l2_capabilities = IVTV_CAP_ENCODER,
612 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
613 .hw_audio = IVTV_HW_SAA717X,
614 .hw_audio_ctrl = IVTV_HW_SAA717X,
615 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
617 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
618 IVTV_SAA717X_TUNER_FLAG },
619 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
620 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
623 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
624 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
626 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
627 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
628 .composite = 0x0020, .svideo = 0x0020 },
629 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
630 .f44100 = 0x4000, .f48000 = 0x8000 },
632 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
633 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
635 .i2c = &ivtv_i2c_std,
638 /* ------------------------------------------------------------------------- */
640 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
642 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
643 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
644 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
645 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
649 static const struct ivtv_card ivtv_card_gv_mvprx = {
650 .type = IVTV_CARD_GV_MVPRX,
651 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
652 .v4l2_capabilities = IVTV_CAP_ENCODER,
653 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
654 .hw_audio = IVTV_HW_GPIO,
655 .hw_audio_ctrl = IVTV_HW_WM8739,
656 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
657 IVTV_HW_TUNER | IVTV_HW_WM8739 |
658 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
660 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
661 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
662 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
665 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
666 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
668 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
669 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
671 /* This card has the Panasonic VP27 tuner */
672 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
674 .pci_list = ivtv_pci_gv_mvprx,
675 .i2c = &ivtv_i2c_std,
678 /* ------------------------------------------------------------------------- */
680 /* I/O Data GV-MVP/RX2E card */
682 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
683 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
687 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
688 .type = IVTV_CARD_GV_MVPRX2E,
689 .name = "I/O Data GV-MVP/RX2E",
690 .v4l2_capabilities = IVTV_CAP_ENCODER,
691 .hw_video = IVTV_HW_SAA7115,
692 .hw_audio = IVTV_HW_GPIO,
693 .hw_audio_ctrl = IVTV_HW_WM8739,
694 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
695 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
697 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
698 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
699 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
702 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
703 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
705 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
706 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
708 /* This card has the Panasonic VP27 tuner */
709 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
711 .pci_list = ivtv_pci_gv_mvprx2e,
712 .i2c = &ivtv_i2c_std,
715 /* ------------------------------------------------------------------------- */
717 /* GotVIEW PCI DVD card */
719 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
720 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
724 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
725 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
726 .name = "GotView PCI DVD",
727 .v4l2_capabilities = IVTV_CAP_ENCODER,
728 .hw_video = IVTV_HW_SAA717X,
729 .hw_audio = IVTV_HW_SAA717X,
730 .hw_audio_ctrl = IVTV_HW_SAA717X,
731 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
733 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
734 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
735 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
738 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
739 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
741 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
743 /* This card has a Philips FQ1216ME MK3 tuner */
744 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
746 .pci_list = ivtv_pci_gotview_pci_dvd,
747 .i2c = &ivtv_i2c_std,
750 /* ------------------------------------------------------------------------- */
752 /* GotVIEW PCI DVD2 Deluxe card */
754 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
755 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
759 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
760 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
761 .name = "GotView PCI DVD2 Deluxe",
762 .v4l2_capabilities = IVTV_CAP_ENCODER,
763 .hw_video = IVTV_HW_CX25840,
764 .hw_audio = IVTV_HW_CX25840,
765 .hw_audio_ctrl = IVTV_HW_CX25840,
766 .hw_muxer = IVTV_HW_GPIO,
767 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
769 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
770 { IVTV_CARD_INPUT_SVIDEO1, 1,
771 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
772 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
775 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
776 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
778 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
779 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
780 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
782 /* This card has a Philips FQ1216ME MK5 tuner */
783 { .std = V4L2_STD_NOT_MN, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
785 .pci_list = ivtv_pci_gotview_pci_dvd2,
786 .i2c = &ivtv_i2c_std,
789 /* ------------------------------------------------------------------------- */
791 /* Yuan MPC622 miniPCI card */
793 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
794 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
798 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
799 .type = IVTV_CARD_YUAN_MPC622,
800 .name = "Yuan MPC622",
801 .v4l2_capabilities = IVTV_CAP_ENCODER,
802 .hw_video = IVTV_HW_CX25840,
803 .hw_audio = IVTV_HW_CX25840,
804 .hw_audio_ctrl = IVTV_HW_CX25840,
805 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
807 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
808 { IVTV_CARD_INPUT_SVIDEO1, 1,
809 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
810 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
813 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
814 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
816 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
818 /* This card has the TDA8290/TDA8275 tuner chips */
819 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
821 .pci_list = ivtv_pci_yuan_mpc622,
822 .i2c = &ivtv_i2c_tda8290,
825 /* ------------------------------------------------------------------------- */
827 /* DIGITAL COWBOY DCT-MTVP1 card */
829 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
830 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
834 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
835 .type = IVTV_CARD_DCTMTVP1,
836 .name = "Digital Cowboy DCT-MTVP1",
837 .v4l2_capabilities = IVTV_CAP_ENCODER,
838 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
840 .hw_audio = IVTV_HW_GPIO,
841 .hw_audio_ctrl = IVTV_HW_GPIO,
842 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
843 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
845 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
846 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
847 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
850 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
851 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
853 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
854 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
855 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
856 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
857 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
858 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
859 .composite = 0x0010, .svideo = 0x0020},
861 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
863 .pci_list = ivtv_pci_dctmvtvp1,
864 .i2c = &ivtv_i2c_std,
867 /* ------------------------------------------------------------------------- */
869 /* Yuan PG600-2/GotView PCI DVD Lite cards */
871 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
872 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
873 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
877 static const struct ivtv_card ivtv_card_pg600v2 = {
878 .type = IVTV_CARD_PG600V2,
879 .name = "Yuan PG600-2, GotView PCI DVD Lite",
880 .comment = "only Composite and S-Video inputs are supported, not the tuner\n",
881 .v4l2_capabilities = IVTV_CAP_ENCODER,
882 .hw_video = IVTV_HW_CX25840,
883 .hw_audio = IVTV_HW_CX25840,
884 .hw_audio_ctrl = IVTV_HW_CX25840,
885 .hw_all = IVTV_HW_CX25840,
887 { IVTV_CARD_INPUT_SVIDEO1, 0,
888 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
889 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
892 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
894 .pci_list = ivtv_pci_pg600v2,
895 .i2c = &ivtv_i2c_std,
898 /* ------------------------------------------------------------------------- */
900 /* Club3D ZAP-TV1x01 cards */
902 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
903 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
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,
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 },
922 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
923 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
925 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
926 .gpio_init = { .direction = 0x1000, .initial_value = 0x1000 }, /* tuner reset */
929 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
931 .pci_list = ivtv_pci_club3d,
932 .i2c = &ivtv_i2c_std,
935 /* ------------------------------------------------------------------------- */
937 /* AVerTV MCE 116 Plus (M116) card */
939 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
940 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
944 static const struct ivtv_card ivtv_card_avertv_mce116 = {
945 .type = IVTV_CARD_AVERTV_MCE116,
946 .name = "AVerTV MCE 116 Plus",
947 .v4l2_capabilities = IVTV_CAP_ENCODER,
948 .hw_video = IVTV_HW_CX25840,
949 .hw_audio = IVTV_HW_CX25840,
950 .hw_audio_ctrl = IVTV_HW_CX25840,
951 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
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 },
958 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
959 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
962 .gpio_init = { .direction = 0xe400, .initial_value = 0x4400 },
965 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
967 .pci_list = ivtv_pci_avertv_mce116,
968 .i2c = &ivtv_i2c_std,
971 /* ------------------------------------------------------------------------- */
973 /* AVerMedia PVR-150 Plus (M113) card */
975 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
976 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 },
980 static const struct ivtv_card ivtv_card_aver_pvr150 = {
981 .type = IVTV_CARD_AVER_PVR150PLUS,
982 .name = "AVerMedia PVR-150 Plus",
983 .v4l2_capabilities = IVTV_CAP_ENCODER,
984 .hw_video = IVTV_HW_CX25840,
985 .hw_audio = IVTV_HW_CX25840,
986 .hw_audio_ctrl = IVTV_HW_CX25840,
987 .hw_muxer = IVTV_HW_GPIO,
988 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
990 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
991 { IVTV_CARD_INPUT_SVIDEO1, 1,
992 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
993 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
996 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
997 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
999 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1000 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
1001 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
1003 /* This card has a Partsnic PTI-5NF05 tuner */
1004 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_TCL_2002N },
1006 .pci_list = ivtv_pci_aver_pvr150,
1007 .i2c = &ivtv_i2c_radio,
1010 /* ------------------------------------------------------------------------- */
1012 /* AVerMedia EZMaker PCI Deluxe card */
1014 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1015 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1019 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1020 .type = IVTV_CARD_AVER_EZMAKER,
1021 .name = "AVerMedia EZMaker PCI Deluxe",
1022 .v4l2_capabilities = IVTV_CAP_ENCODER,
1023 .hw_video = IVTV_HW_CX25840,
1024 .hw_audio = IVTV_HW_CX25840,
1025 .hw_audio_ctrl = IVTV_HW_CX25840,
1026 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1028 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1029 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1032 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1034 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1035 /* Does not have a tuner */
1036 .pci_list = ivtv_pci_aver_ezmaker,
1039 /* ------------------------------------------------------------------------- */
1043 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1044 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1045 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1046 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1050 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1051 .type = IVTV_CARD_ASUS_FALCON2,
1052 .name = "ASUS Falcon2",
1053 .v4l2_capabilities = IVTV_CAP_ENCODER,
1054 .hw_video = IVTV_HW_CX25840,
1055 .hw_audio = IVTV_HW_CX25840,
1056 .hw_audio_ctrl = IVTV_HW_CX25840,
1057 .hw_muxer = IVTV_HW_M52790,
1058 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1060 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1061 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1062 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1065 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1066 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1067 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1068 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1070 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1072 { .std = V4L2_STD_525_60|V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1074 .pci_list = ivtv_pci_asus_falcon2,
1075 .i2c = &ivtv_i2c_std,
1078 /* ------------------------------------------------------------------------- */
1080 /* AVerMedia M104 miniPCI card */
1082 static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1083 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1087 static const struct ivtv_card ivtv_card_aver_m104 = {
1088 .type = IVTV_CARD_AVER_M104,
1089 .name = "AVerMedia M104",
1090 .comment = "Not yet supported!\n",
1091 .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1092 .hw_video = IVTV_HW_CX25840,
1093 .hw_audio = IVTV_HW_CX25840,
1094 .hw_audio_ctrl = IVTV_HW_CX25840,
1095 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1097 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1098 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1101 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1103 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1104 /* enable line-in + reset tuner */
1105 .gpio_init = { .direction = 0xe400, .initial_value = 0x4000 },
1108 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1110 .pci_list = ivtv_pci_aver_m104,
1111 .i2c = &ivtv_i2c_std,
1114 /* ------------------------------------------------------------------------- */
1116 /* Buffalo PC-MV5L/PCI cards */
1118 static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1119 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1123 static const struct ivtv_card ivtv_card_buffalo = {
1124 .type = IVTV_CARD_BUFFALO_MV5L,
1125 .name = "Buffalo PC-MV5L/PCI",
1126 .v4l2_capabilities = IVTV_CAP_ENCODER,
1127 .hw_video = IVTV_HW_CX25840,
1128 .hw_audio = IVTV_HW_CX25840,
1129 .hw_audio_ctrl = IVTV_HW_CX25840,
1130 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1132 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1133 { IVTV_CARD_INPUT_SVIDEO1, 1,
1134 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1135 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1138 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
1139 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
1141 .gpio_init = { .direction = 0x1000, .initial_value = 0x1000 },
1144 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1146 .pci_list = ivtv_pci_buffalo,
1147 .i2c = &ivtv_i2c_std,
1150 static const struct ivtv_card *ivtv_card_list[] = {
1160 &ivtv_card_tg5000tv,
1162 &ivtv_card_cx23416gyc,
1163 &ivtv_card_gv_mvprx,
1164 &ivtv_card_gv_mvprx2e,
1165 &ivtv_card_gotview_pci_dvd,
1166 &ivtv_card_gotview_pci_dvd2,
1167 &ivtv_card_yuan_mpc622,
1168 &ivtv_card_dctmvtvp1,
1171 &ivtv_card_avertv_mce116,
1172 &ivtv_card_asus_falcon2,
1173 &ivtv_card_aver_pvr150,
1174 &ivtv_card_aver_ezmaker,
1175 &ivtv_card_aver_m104,
1178 /* Variations of standard cards but with the same PCI IDs.
1179 These cards must come last in this list. */
1180 &ivtv_card_pvr350_v1,
1181 &ivtv_card_cx23416gyc_nogr,
1182 &ivtv_card_cx23416gyc_nogrycs,
1185 const struct ivtv_card *ivtv_get_card(u16 index)
1187 if (index >= ARRAY_SIZE(ivtv_card_list))
1189 return ivtv_card_list[index];
1192 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1194 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1195 static const char * const input_strs[] = {
1204 memset(input, 0, sizeof(*input));
1205 if (index >= itv->nof_inputs)
1207 input->index = index;
1208 strlcpy(input->name, input_strs[card_input->video_type - 1],
1209 sizeof(input->name));
1210 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1211 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1212 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1213 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1214 itv->tuner_std : V4L2_STD_ALL;
1218 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1220 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1222 memset(output, 0, sizeof(*output));
1223 if (index >= itv->card->nof_outputs)
1225 output->index = index;
1226 strlcpy(output->name, card_output->name, sizeof(output->name));
1227 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1228 output->audioset = 1;
1229 output->std = V4L2_STD_ALL;
1233 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1235 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1236 static const char * const input_strs[] = {
1242 memset(audio, 0, sizeof(*audio));
1243 if (index >= itv->nof_audio_inputs)
1245 strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1246 sizeof(audio->name));
1247 audio->index = index;
1248 audio->capability = V4L2_AUDCAP_STEREO;
1252 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1254 memset(aud_output, 0, sizeof(*aud_output));
1255 if (itv->card->video_outputs == NULL || index != 0)
1257 strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));