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/wm8775.h>
27 #include <media/cs53l32a.h>
28 #include <media/cx25840.h>
29 #include <media/upd64031a.h>
31 #define MSP_TUNER MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
32 MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
33 #define MSP_SCART1 MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
34 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
35 #define MSP_SCART2 MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, \
36 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
37 #define MSP_SCART3 MSP_INPUT(MSP_IN_SCART3, MSP_IN_TUNER1, \
38 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
39 #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \
40 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
42 /********************** card configuration *******************************/
44 /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii
45 This keeps the PCI ID database up to date. Note that the entries
46 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
47 New vendor IDs should still be added to the vendor ID list. */
49 /* Hauppauge PVR-250 cards */
51 /* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
52 static const struct ivtv_card ivtv_card_pvr250 = {
53 .type = IVTV_CARD_PVR_250,
54 .name = "Hauppauge WinTV PVR-250",
55 .v4l2_capabilities = IVTV_CAP_ENCODER,
56 .hw_video = IVTV_HW_SAA7115,
57 .hw_audio = IVTV_HW_MSP34XX,
58 .hw_audio_ctrl = IVTV_HW_MSP34XX,
59 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
60 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
62 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
63 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
64 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
65 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
66 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
67 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
70 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
71 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
72 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
74 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
77 /* ------------------------------------------------------------------------- */
79 /* Hauppauge PVR-350 cards */
81 /* Outputs for Hauppauge PVR350 cards */
82 static struct ivtv_card_output ivtv_pvr350_outputs[] = {
84 .name = "S-Video + Composite",
104 static const struct ivtv_card ivtv_card_pvr350 = {
105 .type = IVTV_CARD_PVR_350,
106 .name = "Hauppauge WinTV PVR-350",
107 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
108 .video_outputs = ivtv_pvr350_outputs,
109 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
110 .hw_video = IVTV_HW_SAA7115,
111 .hw_audio = IVTV_HW_MSP34XX,
112 .hw_audio_ctrl = IVTV_HW_MSP34XX,
113 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
114 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
116 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
117 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
118 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
119 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
120 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
121 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
124 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
125 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
126 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
128 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
131 /* PVR-350 V1 boards have a different audio tuner input and use a
132 saa7114 instead of a saa7115.
133 Note that the info below comes from a pre-production model so it may
134 not be correct. Especially the audio behaves strangely (mono only it seems) */
135 static const struct ivtv_card ivtv_card_pvr350_v1 = {
136 .type = IVTV_CARD_PVR_350_V1,
137 .name = "Hauppauge WinTV PVR-350 (V1)",
138 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
139 .video_outputs = ivtv_pvr350_outputs,
140 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
141 .hw_video = IVTV_HW_SAA7114,
142 .hw_audio = IVTV_HW_MSP34XX,
143 .hw_audio_ctrl = IVTV_HW_MSP34XX,
144 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
145 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
147 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
148 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
149 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
150 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
151 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
152 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
155 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
156 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
157 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
159 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
162 /* ------------------------------------------------------------------------- */
164 /* Hauppauge PVR-150/PVR-500 cards */
166 static const struct ivtv_card ivtv_card_pvr150 = {
167 .type = IVTV_CARD_PVR_150,
168 .name = "Hauppauge WinTV PVR-150",
169 .v4l2_capabilities = IVTV_CAP_ENCODER,
170 .hw_video = IVTV_HW_CX25840,
171 .hw_audio = IVTV_HW_CX25840,
172 .hw_audio_ctrl = IVTV_HW_CX25840,
173 .hw_muxer = IVTV_HW_WM8775,
174 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
175 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
177 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
178 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
179 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
180 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
181 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
184 { IVTV_CARD_INPUT_AUD_TUNER,
185 CX25840_AUDIO8, WM8775_AIN2 },
186 { IVTV_CARD_INPUT_LINE_IN1,
187 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
188 { IVTV_CARD_INPUT_LINE_IN2,
189 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
191 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
192 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
193 /* apparently needed for the IR blaster */
194 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
197 /* ------------------------------------------------------------------------- */
199 /* AVerMedia M179 cards */
201 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
202 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
203 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
207 static const struct ivtv_card ivtv_card_m179 = {
208 .type = IVTV_CARD_M179,
209 .name = "AVerMedia M179",
210 .v4l2_capabilities = IVTV_CAP_ENCODER,
211 .hw_video = IVTV_HW_SAA7114,
212 .hw_audio = IVTV_HW_GPIO,
213 .hw_audio_ctrl = IVTV_HW_GPIO,
214 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
216 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
217 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
218 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
221 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
222 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
224 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
225 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
226 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
227 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
228 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
229 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
230 .f44100 = 0x0008, .f48000 = 0x0010 },
231 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
233 /* As far as we know all M179 cards use this tuner */
234 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
236 .pci_list = ivtv_pci_m179,
239 /* ------------------------------------------------------------------------- */
241 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
243 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
244 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
245 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
249 static const struct ivtv_card ivtv_card_mpg600 = {
250 .type = IVTV_CARD_MPG600,
251 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
252 .v4l2_capabilities = IVTV_CAP_ENCODER,
253 .hw_video = IVTV_HW_SAA7115,
254 .hw_audio = IVTV_HW_GPIO,
255 .hw_audio_ctrl = IVTV_HW_GPIO,
256 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
258 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
259 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
260 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
263 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
264 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
266 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
267 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
268 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
269 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
270 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
271 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
273 /* The PAL tuner is confirmed */
274 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
275 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
277 .pci_list = ivtv_pci_mpg600,
280 /* ------------------------------------------------------------------------- */
282 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
284 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
285 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
286 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
290 static const struct ivtv_card ivtv_card_mpg160 = {
291 .type = IVTV_CARD_MPG160,
292 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
293 .v4l2_capabilities = IVTV_CAP_ENCODER,
294 .hw_video = IVTV_HW_SAA7114,
295 .hw_audio = IVTV_HW_GPIO,
296 .hw_audio_ctrl = IVTV_HW_GPIO,
297 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
299 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
300 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
301 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
304 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
305 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
307 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
308 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
309 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
310 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
311 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
312 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
314 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
315 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
317 .pci_list = ivtv_pci_mpg160,
320 /* ------------------------------------------------------------------------- */
322 /* Yuan PG600/Diamond PVR-550 cards */
324 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
325 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
326 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
330 static const struct ivtv_card ivtv_card_pg600 = {
331 .type = IVTV_CARD_PG600,
332 .name = "Yuan PG600, Diamond PVR-550",
333 .v4l2_capabilities = IVTV_CAP_ENCODER,
334 .hw_video = IVTV_HW_CX25840,
335 .hw_audio = IVTV_HW_CX25840,
336 .hw_audio_ctrl = IVTV_HW_CX25840,
337 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
339 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
340 { IVTV_CARD_INPUT_SVIDEO1, 1,
341 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
342 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
345 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
346 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
349 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
350 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
352 .pci_list = ivtv_pci_pg600,
355 /* ------------------------------------------------------------------------- */
357 /* Adaptec VideOh! AVC-2410 card */
359 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
360 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
364 static const struct ivtv_card ivtv_card_avc2410 = {
365 .type = IVTV_CARD_AVC2410,
366 .name = "Adaptec VideOh! AVC-2410",
367 .v4l2_capabilities = IVTV_CAP_ENCODER,
368 .hw_video = IVTV_HW_SAA7115,
369 .hw_audio = IVTV_HW_MSP34XX,
370 .hw_audio_ctrl = IVTV_HW_MSP34XX,
371 .hw_muxer = IVTV_HW_CS53L32A,
372 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
373 IVTV_HW_SAA7115 | IVTV_HW_TUNER,
375 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
376 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
377 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
380 { IVTV_CARD_INPUT_AUD_TUNER,
381 MSP_TUNER, CS53L32A_IN0 },
382 { IVTV_CARD_INPUT_LINE_IN1,
383 MSP_SCART1, CS53L32A_IN2 },
385 /* This card has no eeprom and in fact the Windows driver relies
386 on the country/region setting of the user to decide which tuner
389 /* This tuner has been verified for the AVC2410 */
390 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
391 /* This is a good guess, but I'm not totally sure this is
392 the correct tuner for NTSC. */
393 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
395 .pci_list = ivtv_pci_avc2410,
398 /* ------------------------------------------------------------------------- */
400 /* Adaptec VideOh! AVC-2010 card */
402 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
403 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
407 static const struct ivtv_card ivtv_card_avc2010 = {
408 .type = IVTV_CARD_AVC2010,
409 .name = "Adaptec VideOh! AVC-2010",
410 .v4l2_capabilities = IVTV_CAP_ENCODER,
411 .hw_video = IVTV_HW_SAA7115,
412 .hw_audio = IVTV_HW_CS53L32A,
413 .hw_audio_ctrl = IVTV_HW_CS53L32A,
414 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
416 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
417 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
420 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
422 /* Does not have a tuner */
423 .pci_list = ivtv_pci_avc2010,
426 /* ------------------------------------------------------------------------- */
428 /* Nagase Transgear 5000TV card */
430 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
431 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
435 static const struct ivtv_card ivtv_card_tg5000tv = {
436 .type = IVTV_CARD_TG5000TV,
437 .name = "Nagase Transgear 5000TV",
438 .v4l2_capabilities = IVTV_CAP_ENCODER,
439 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
441 .hw_audio = IVTV_HW_GPIO,
442 .hw_audio_ctrl = IVTV_HW_GPIO,
443 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
444 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
446 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
447 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
448 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
451 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
452 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
454 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
455 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
456 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
457 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
458 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
459 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
460 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
461 .composite = 0x0010, .svideo = 0x0020 },
463 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
465 .pci_list = ivtv_pci_tg5000tv,
468 /* ------------------------------------------------------------------------- */
470 /* AOpen VA2000MAX-SNT6 card */
472 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
473 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
477 static const struct ivtv_card ivtv_card_va2000 = {
478 .type = IVTV_CARD_VA2000MAX_SNT6,
479 .name = "AOpen VA2000MAX-SNT6",
480 .v4l2_capabilities = IVTV_CAP_ENCODER,
481 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
482 .hw_audio = IVTV_HW_MSP34XX,
483 .hw_audio_ctrl = IVTV_HW_MSP34XX,
484 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
485 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
487 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
490 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
493 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
495 .pci_list = ivtv_pci_va2000,
498 /* ------------------------------------------------------------------------- */
500 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
502 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
503 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
504 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
505 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
509 static const struct ivtv_card ivtv_card_cx23416gyc = {
510 .type = IVTV_CARD_CX23416GYC,
511 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
512 .v4l2_capabilities = IVTV_CAP_ENCODER,
513 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
514 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
515 .hw_audio = IVTV_HW_SAA717X,
516 .hw_audio_ctrl = IVTV_HW_SAA717X,
517 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
518 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
520 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
521 IVTV_SAA717X_TUNER_FLAG },
522 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
523 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
526 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
527 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
529 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
530 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
531 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
532 .composite = 0x0020, .svideo = 0x0020 },
533 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
534 .f44100 = 0x4000, .f48000 = 0x8000 },
536 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
537 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
539 .pci_list = ivtv_pci_cx23416gyc,
542 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
543 .type = IVTV_CARD_CX23416GYC_NOGR,
544 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
545 .v4l2_capabilities = IVTV_CAP_ENCODER,
546 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | 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 |
552 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
553 IVTV_SAA717X_TUNER_FLAG },
554 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
555 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
558 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
559 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
561 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
562 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
563 .composite = 0x0020, .svideo = 0x0020 },
564 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
565 .f44100 = 0x4000, .f48000 = 0x8000 },
567 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
568 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
572 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
573 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
574 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
575 .v4l2_capabilities = IVTV_CAP_ENCODER,
576 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
577 .hw_audio = IVTV_HW_SAA717X,
578 .hw_audio_ctrl = IVTV_HW_SAA717X,
579 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
581 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
582 IVTV_SAA717X_TUNER_FLAG },
583 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
584 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
587 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
588 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
590 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
591 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
592 .composite = 0x0020, .svideo = 0x0020 },
593 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
594 .f44100 = 0x4000, .f48000 = 0x8000 },
596 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
597 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
601 /* ------------------------------------------------------------------------- */
603 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
605 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
606 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
607 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
608 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
612 static const struct ivtv_card ivtv_card_gv_mvprx = {
613 .type = IVTV_CARD_GV_MVPRX,
614 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
615 .v4l2_capabilities = IVTV_CAP_ENCODER,
616 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
617 .hw_audio = IVTV_HW_GPIO,
618 .hw_audio_ctrl = IVTV_HW_WM8739,
619 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
620 IVTV_HW_TUNER | IVTV_HW_WM8739 |
621 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
623 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
624 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
625 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
628 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
629 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
631 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
632 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
634 /* This card has the Panasonic VP27 tuner */
635 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
637 .pci_list = ivtv_pci_gv_mvprx,
640 /* ------------------------------------------------------------------------- */
642 /* I/O Data GV-MVP/RX2E card */
644 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
645 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
649 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
650 .type = IVTV_CARD_GV_MVPRX2E,
651 .name = "I/O Data GV-MVP/RX2E",
652 .v4l2_capabilities = IVTV_CAP_ENCODER,
653 .hw_video = IVTV_HW_SAA7115,
654 .hw_audio = IVTV_HW_GPIO,
655 .hw_audio_ctrl = IVTV_HW_WM8739,
656 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
657 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
659 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
660 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
661 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
664 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
665 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
667 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
668 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
670 /* This card has the Panasonic VP27 tuner */
671 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
673 .pci_list = ivtv_pci_gv_mvprx2e,
676 /* ------------------------------------------------------------------------- */
678 /* GotVIEW PCI DVD card */
680 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
681 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
685 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
686 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
687 .name = "GotView PCI DVD",
688 .v4l2_capabilities = IVTV_CAP_ENCODER,
689 .hw_video = IVTV_HW_SAA717X,
690 .hw_audio = IVTV_HW_SAA717X,
691 .hw_audio_ctrl = IVTV_HW_SAA717X,
692 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
694 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
695 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
696 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
699 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
700 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
702 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
704 /* This card has a Philips FQ1216ME MK3 tuner */
705 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
707 .pci_list = ivtv_pci_gotview_pci_dvd,
710 /* ------------------------------------------------------------------------- */
712 /* GotVIEW PCI DVD2 Deluxe card */
714 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
715 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
719 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
720 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
721 .name = "GotView PCI DVD2 Deluxe",
722 .v4l2_capabilities = IVTV_CAP_ENCODER,
723 .hw_video = IVTV_HW_CX25840,
724 .hw_audio = IVTV_HW_CX25840,
725 .hw_audio_ctrl = IVTV_HW_CX25840,
726 .hw_muxer = IVTV_HW_GPIO,
727 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
729 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
730 { IVTV_CARD_INPUT_SVIDEO1, 1,
731 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
732 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
735 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
736 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
738 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
739 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
740 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
742 /* This card has a Philips FQ1216ME MK5 tuner */
743 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
745 .pci_list = ivtv_pci_gotview_pci_dvd2,
748 /* ------------------------------------------------------------------------- */
750 /* Yuan MPC622 miniPCI card */
752 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
753 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
757 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
758 .type = IVTV_CARD_YUAN_MPC622,
759 .name = "Yuan MPC622",
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_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
766 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
767 { IVTV_CARD_INPUT_SVIDEO1, 1,
768 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
769 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
772 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
773 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
775 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
777 /* This card has the TDA8290/TDA8275 tuner chips */
778 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
780 .pci_list = ivtv_pci_yuan_mpc622,
783 /* ------------------------------------------------------------------------- */
785 /* DIGITAL COWBOY DCT-MTVP1 card */
787 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
788 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
792 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
793 .type = IVTV_CARD_DCTMTVP1,
794 .name = "Digital Cowboy DCT-MTVP1",
795 .v4l2_capabilities = IVTV_CAP_ENCODER,
796 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
798 .hw_audio = IVTV_HW_GPIO,
799 .hw_audio_ctrl = IVTV_HW_GPIO,
800 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
801 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
803 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
804 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
805 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
808 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
809 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
811 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
812 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
813 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
814 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
815 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
816 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
817 .composite = 0x0010, .svideo = 0x0020},
819 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
821 .pci_list = ivtv_pci_dctmvtvp1,
824 /* ------------------------------------------------------------------------- */
826 /* Yuan PG600-2/GotView PCI DVD Lite cards */
828 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
829 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
830 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
834 static const struct ivtv_card ivtv_card_pg600v2 = {
835 .type = IVTV_CARD_PG600V2,
836 .name = "Yuan PG600-2, GotView PCI DVD Lite",
837 .v4l2_capabilities = IVTV_CAP_ENCODER,
838 .hw_video = IVTV_HW_CX25840,
839 .hw_audio = IVTV_HW_CX25840,
840 .hw_audio_ctrl = IVTV_HW_CX25840,
841 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
843 { IVTV_CARD_INPUT_SVIDEO1, 0,
844 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
845 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
848 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
851 { .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },
853 .pci_list = ivtv_pci_pg600v2,
856 /* ------------------------------------------------------------------------- */
858 /* Club3D ZAP-TV1x01 cards */
860 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
861 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
865 static const struct ivtv_card ivtv_card_club3d = {
866 .type = IVTV_CARD_CLUB3D,
867 .name = "Club3D ZAP-TV1x01",
868 .v4l2_capabilities = IVTV_CAP_ENCODER,
869 .hw_video = IVTV_HW_CX25840,
870 .hw_audio = IVTV_HW_CX25840,
871 .hw_audio_ctrl = IVTV_HW_CX25840,
872 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
874 { IVTV_CARD_INPUT_SVIDEO1, 0,
875 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
876 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE3 },
879 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
882 { .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },
884 .pci_list = ivtv_pci_club3d,
887 /* ------------------------------------------------------------------------- */
889 /* AVerTV MCE 116 Plus (M116) card */
891 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
892 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
896 static const struct ivtv_card ivtv_card_avertv_mce116 = {
897 .type = IVTV_CARD_AVERTV_MCE116,
898 .name = "AVerTV MCE 116 Plus",
899 .v4l2_capabilities = IVTV_CAP_ENCODER,
900 .hw_video = IVTV_HW_CX25840,
901 .hw_audio = IVTV_HW_CX25840,
902 .hw_audio_ctrl = IVTV_HW_CX25840,
903 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
905 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
906 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
909 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
911 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 }, /* enable line-in */
913 { .std = V4L2_STD_ALL, .tuner = TUNER_XCEIVE_XC3028 },
915 .pci_list = ivtv_pci_avertv_mce116,
918 static const struct ivtv_card *ivtv_card_list[] = {
930 &ivtv_card_cx23416gyc,
932 &ivtv_card_gv_mvprx2e,
933 &ivtv_card_gotview_pci_dvd,
934 &ivtv_card_gotview_pci_dvd2,
935 &ivtv_card_yuan_mpc622,
936 &ivtv_card_dctmvtvp1,
939 &ivtv_card_avertv_mce116,
941 /* Variations of standard cards but with the same PCI IDs.
942 These cards must come last in this list. */
943 &ivtv_card_pvr350_v1,
944 &ivtv_card_cx23416gyc_nogr,
945 &ivtv_card_cx23416gyc_nogrycs,
948 const struct ivtv_card *ivtv_get_card(u16 index)
950 if (index >= ARRAY_SIZE(ivtv_card_list))
952 return ivtv_card_list[index];
955 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
957 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
958 static const char * const input_strs[] = {
967 memset(input, 0, sizeof(*input));
968 if (index >= itv->nof_inputs)
970 input->index = index;
971 strcpy(input->name, input_strs[card_input->video_type - 1]);
972 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
973 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
974 input->audioset = (1 << itv->nof_audio_inputs) - 1;
975 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
976 itv->tuner_std : V4L2_STD_ALL;
980 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
982 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
984 memset(output, 0, sizeof(*output));
985 if (index >= itv->card->nof_outputs)
987 output->index = index;
988 strcpy(output->name, card_output->name);
989 output->type = V4L2_OUTPUT_TYPE_ANALOG;
990 output->audioset = 1;
991 output->std = V4L2_STD_ALL;
995 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
997 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
998 static const char * const input_strs[] = {
1004 memset(audio, 0, sizeof(*audio));
1005 if (index >= itv->nof_audio_inputs)
1007 strcpy(audio->name, input_strs[aud_input->audio_type - 1]);
1008 audio->index = index;
1009 audio->capability = V4L2_AUDCAP_STEREO;
1013 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1015 memset(aud_output, 0, sizeof(*aud_output));
1016 if (itv->card->video_outputs == NULL || index != 0)
1018 strcpy(aud_output->name, "A/V Audio Out");