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_PAL_SECAM (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_PAL_SECAM, .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_PAL_SECAM, .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_PAL_SECAM, .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_PAL_SECAM, .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_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_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_PAL_SECAM, .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_PAL_SECAM, .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_PAL_SECAM, .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_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_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_PAL_SECAM, .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_PAL_SECAM, .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_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 .v4l2_capabilities = IVTV_CAP_ENCODER,
881 .hw_video = IVTV_HW_CX25840,
882 .hw_audio = IVTV_HW_CX25840,
883 .hw_audio_ctrl = IVTV_HW_CX25840,
884 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
885 /* XC2028 support apparently works for the Yuan, it's still
886 uncertain whether it also works with the GotView. */
888 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
889 { IVTV_CARD_INPUT_SVIDEO1, 1,
890 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
891 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
894 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
895 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
897 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
900 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
902 .pci_list = ivtv_pci_pg600v2,
903 .i2c = &ivtv_i2c_std,
906 /* ------------------------------------------------------------------------- */
908 /* Club3D ZAP-TV1x01 cards */
910 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
911 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
915 static const struct ivtv_card ivtv_card_club3d = {
916 .type = IVTV_CARD_CLUB3D,
917 .name = "Club3D ZAP-TV1x01",
918 .v4l2_capabilities = IVTV_CAP_ENCODER,
919 .hw_video = IVTV_HW_CX25840,
920 .hw_audio = IVTV_HW_CX25840,
921 .hw_audio_ctrl = IVTV_HW_CX25840,
922 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
924 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
925 { IVTV_CARD_INPUT_SVIDEO1, 1,
926 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
927 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
930 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
931 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
933 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
936 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
938 .pci_list = ivtv_pci_club3d,
939 .i2c = &ivtv_i2c_std,
942 /* ------------------------------------------------------------------------- */
944 /* AVerTV MCE 116 Plus (M116) card */
946 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
947 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
951 static const struct ivtv_card ivtv_card_avertv_mce116 = {
952 .type = IVTV_CARD_AVERTV_MCE116,
953 .name = "AVerTV MCE 116 Plus",
954 .v4l2_capabilities = IVTV_CAP_ENCODER,
955 .hw_video = IVTV_HW_CX25840,
956 .hw_audio = IVTV_HW_CX25840,
957 .hw_audio_ctrl = IVTV_HW_CX25840,
958 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
960 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
961 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
962 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
965 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
966 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
969 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
972 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
974 .pci_list = ivtv_pci_avertv_mce116,
975 .i2c = &ivtv_i2c_std,
978 /* ------------------------------------------------------------------------- */
980 /* AVerMedia PVR-150 Plus (M113) card */
982 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
983 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 },
987 static const struct ivtv_card ivtv_card_aver_pvr150 = {
988 .type = IVTV_CARD_AVER_PVR150PLUS,
989 .name = "AVerMedia PVR-150 Plus",
990 .v4l2_capabilities = IVTV_CAP_ENCODER,
991 .hw_video = IVTV_HW_CX25840,
992 .hw_audio = IVTV_HW_CX25840,
993 .hw_audio_ctrl = IVTV_HW_CX25840,
994 .hw_muxer = IVTV_HW_GPIO,
995 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
997 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
998 { IVTV_CARD_INPUT_SVIDEO1, 1,
999 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1000 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1003 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1004 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1006 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1007 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
1008 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
1010 /* This card has a Partsnic PTI-5NF05 tuner */
1011 { .std = V4L2_STD_MN, .tuner = TUNER_TCL_2002N },
1013 .pci_list = ivtv_pci_aver_pvr150,
1014 .i2c = &ivtv_i2c_radio,
1017 /* ------------------------------------------------------------------------- */
1019 /* AVerMedia EZMaker PCI Deluxe card */
1021 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1022 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1026 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1027 .type = IVTV_CARD_AVER_EZMAKER,
1028 .name = "AVerMedia EZMaker PCI Deluxe",
1029 .v4l2_capabilities = IVTV_CAP_ENCODER,
1030 .hw_video = IVTV_HW_CX25840,
1031 .hw_audio = IVTV_HW_CX25840,
1032 .hw_audio_ctrl = IVTV_HW_CX25840,
1033 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1035 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1036 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1039 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1041 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1042 /* Does not have a tuner */
1043 .pci_list = ivtv_pci_aver_ezmaker,
1046 /* ------------------------------------------------------------------------- */
1050 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1051 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1052 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1053 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1057 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1058 .type = IVTV_CARD_ASUS_FALCON2,
1059 .name = "ASUS Falcon2",
1060 .v4l2_capabilities = IVTV_CAP_ENCODER,
1061 .hw_video = IVTV_HW_CX25840,
1062 .hw_audio = IVTV_HW_CX25840,
1063 .hw_audio_ctrl = IVTV_HW_CX25840,
1064 .hw_muxer = IVTV_HW_M52790,
1065 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1067 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1068 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1069 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1072 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1073 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1074 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1075 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1077 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1079 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1081 .pci_list = ivtv_pci_asus_falcon2,
1082 .i2c = &ivtv_i2c_std,
1085 /* ------------------------------------------------------------------------- */
1087 /* AVerMedia M104 miniPCI card */
1089 static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1090 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1094 static const struct ivtv_card ivtv_card_aver_m104 = {
1095 .type = IVTV_CARD_AVER_M104,
1096 .name = "AVerMedia M104",
1097 .comment = "Not yet supported!\n",
1098 .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1099 .hw_video = IVTV_HW_CX25840,
1100 .hw_audio = IVTV_HW_CX25840,
1101 .hw_audio_ctrl = IVTV_HW_CX25840,
1102 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1104 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1105 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1108 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1110 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1111 /* enable line-in + reset tuner */
1112 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
1115 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1117 .pci_list = ivtv_pci_aver_m104,
1118 .i2c = &ivtv_i2c_std,
1121 /* ------------------------------------------------------------------------- */
1123 /* Buffalo PC-MV5L/PCI cards */
1125 static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1126 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1130 static const struct ivtv_card ivtv_card_buffalo = {
1131 .type = IVTV_CARD_BUFFALO_MV5L,
1132 .name = "Buffalo PC-MV5L/PCI",
1133 .v4l2_capabilities = IVTV_CAP_ENCODER,
1134 .hw_video = IVTV_HW_CX25840,
1135 .hw_audio = IVTV_HW_CX25840,
1136 .hw_audio_ctrl = IVTV_HW_CX25840,
1137 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1139 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1140 { IVTV_CARD_INPUT_SVIDEO1, 1,
1141 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1142 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1145 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
1146 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
1150 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1152 .pci_list = ivtv_pci_buffalo,
1153 .i2c = &ivtv_i2c_std,
1156 static const struct ivtv_card *ivtv_card_list[] = {
1166 &ivtv_card_tg5000tv,
1168 &ivtv_card_cx23416gyc,
1169 &ivtv_card_gv_mvprx,
1170 &ivtv_card_gv_mvprx2e,
1171 &ivtv_card_gotview_pci_dvd,
1172 &ivtv_card_gotview_pci_dvd2,
1173 &ivtv_card_yuan_mpc622,
1174 &ivtv_card_dctmvtvp1,
1177 &ivtv_card_avertv_mce116,
1178 &ivtv_card_asus_falcon2,
1179 &ivtv_card_aver_pvr150,
1180 &ivtv_card_aver_ezmaker,
1181 &ivtv_card_aver_m104,
1184 /* Variations of standard cards but with the same PCI IDs.
1185 These cards must come last in this list. */
1186 &ivtv_card_pvr350_v1,
1187 &ivtv_card_cx23416gyc_nogr,
1188 &ivtv_card_cx23416gyc_nogrycs,
1191 const struct ivtv_card *ivtv_get_card(u16 index)
1193 if (index >= ARRAY_SIZE(ivtv_card_list))
1195 return ivtv_card_list[index];
1198 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1200 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1201 static const char * const input_strs[] = {
1210 memset(input, 0, sizeof(*input));
1211 if (index >= itv->nof_inputs)
1213 input->index = index;
1214 strlcpy(input->name, input_strs[card_input->video_type - 1],
1215 sizeof(input->name));
1216 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1217 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1218 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1219 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1220 itv->tuner_std : V4L2_STD_ALL;
1224 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1226 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1228 memset(output, 0, sizeof(*output));
1229 if (index >= itv->card->nof_outputs)
1231 output->index = index;
1232 strlcpy(output->name, card_output->name, sizeof(output->name));
1233 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1234 output->audioset = 1;
1235 output->std = V4L2_STD_ALL;
1239 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1241 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1242 static const char * const input_strs[] = {
1248 memset(audio, 0, sizeof(*audio));
1249 if (index >= itv->nof_audio_inputs)
1251 strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1252 sizeof(audio->name));
1253 audio->index = index;
1254 audio->capability = V4L2_AUDCAP_STEREO;
1258 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1260 memset(aud_output, 0, sizeof(*aud_output));
1261 if (itv->card->video_outputs == NULL || index != 0)
1263 strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));