Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / drivers / media / video / ivtv / ivtv-cards.c
blobf23c6b8d6911dee0f360c60e5c745b869df95e6e
1 /*
2 Functions to query card hardware
3 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
4 Copyright (C) 2005-2007 Hans Verkuil <hverkuil@xs4all.nl>
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"
23 #include "ivtv-i2c.h"
25 #include <media/msp3400.h>
26 #include <media/m52790.h>
27 #include <media/wm8775.h>
28 #include <media/cs53l32a.h>
29 #include <media/cx25840.h>
30 #include <media/upd64031a.h>
32 #define MSP_TUNER MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
33 MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER)
34 #define MSP_SCART1 MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \
35 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
36 #define MSP_SCART2 MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, \
37 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
38 #define MSP_SCART3 MSP_INPUT(MSP_IN_SCART3, MSP_IN_TUNER1, \
39 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
40 #define MSP_MONO MSP_INPUT(MSP_IN_MONO, MSP_IN_TUNER1, \
41 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART)
43 /* usual i2c tuner addresses to probe */
44 static struct ivtv_card_tuner_i2c ivtv_i2c_std = {
45 .radio = { I2C_CLIENT_END },
46 .demod = { 0x43, I2C_CLIENT_END },
47 .tv = { 0x61, 0x60, I2C_CLIENT_END },
50 /* as above, but with possible radio tuner */
51 static struct ivtv_card_tuner_i2c ivtv_i2c_radio = {
52 .radio = { 0x60, I2C_CLIENT_END },
53 .demod = { 0x43, I2C_CLIENT_END },
54 .tv = { 0x61, I2C_CLIENT_END },
57 /* using the tda8290+75a combo */
58 static struct ivtv_card_tuner_i2c ivtv_i2c_tda8290 = {
59 .radio = { I2C_CLIENT_END },
60 .demod = { I2C_CLIENT_END },
61 .tv = { 0x4b, I2C_CLIENT_END },
64 /********************** card configuration *******************************/
66 /* Please add new PCI IDs to: http://pci-ids.ucw.cz/iii
67 This keeps the PCI ID database up to date. Note that the entries
68 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
69 New vendor IDs should still be added to the vendor ID list. */
71 /* Hauppauge PVR-250 cards */
73 /* Note: for Hauppauge cards the tveeprom information is used instead of PCI IDs */
74 static const struct ivtv_card ivtv_card_pvr250 = {
75 .type = IVTV_CARD_PVR_250,
76 .name = "Hauppauge WinTV PVR-250",
77 .v4l2_capabilities = IVTV_CAP_ENCODER,
78 .hw_video = IVTV_HW_SAA7115,
79 .hw_audio = IVTV_HW_MSP34XX,
80 .hw_audio_ctrl = IVTV_HW_MSP34XX,
81 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
82 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
83 .video_inputs = {
84 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
85 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
86 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
87 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
88 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
89 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
91 .audio_inputs = {
92 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
93 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
94 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
96 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
97 .i2c = &ivtv_i2c_std,
100 /* ------------------------------------------------------------------------- */
102 /* Hauppauge PVR-350 cards */
104 /* Outputs for Hauppauge PVR350 cards */
105 static struct ivtv_card_output ivtv_pvr350_outputs[] = {
107 .name = "S-Video + Composite",
108 .video_output = 0,
109 }, {
110 .name = "Composite",
111 .video_output = 1,
112 }, {
113 .name = "S-Video",
114 .video_output = 2,
115 }, {
116 .name = "RGB",
117 .video_output = 3,
118 }, {
119 .name = "YUV C",
120 .video_output = 4,
121 }, {
122 .name = "YUV V",
123 .video_output = 5,
127 static const struct ivtv_card ivtv_card_pvr350 = {
128 .type = IVTV_CARD_PVR_350,
129 .name = "Hauppauge WinTV PVR-350",
130 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
131 .video_outputs = ivtv_pvr350_outputs,
132 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
133 .hw_video = IVTV_HW_SAA7115,
134 .hw_audio = IVTV_HW_MSP34XX,
135 .hw_audio_ctrl = IVTV_HW_MSP34XX,
136 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
137 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
138 .video_inputs = {
139 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
140 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
141 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
142 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
143 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
144 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
146 .audio_inputs = {
147 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
148 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
149 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
151 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
152 .i2c = &ivtv_i2c_std,
155 /* PVR-350 V1 boards have a different audio tuner input and use a
156 saa7114 instead of a saa7115.
157 Note that the info below comes from a pre-production model so it may
158 not be correct. Especially the audio behaves strangely (mono only it seems) */
159 static const struct ivtv_card ivtv_card_pvr350_v1 = {
160 .type = IVTV_CARD_PVR_350_V1,
161 .name = "Hauppauge WinTV PVR-350 (V1)",
162 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
163 .video_outputs = ivtv_pvr350_outputs,
164 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
165 .hw_video = IVTV_HW_SAA7114,
166 .hw_audio = IVTV_HW_MSP34XX,
167 .hw_audio_ctrl = IVTV_HW_MSP34XX,
168 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
169 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
170 .video_inputs = {
171 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
172 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
173 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
174 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
175 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
176 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
178 .audio_inputs = {
179 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
180 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
181 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
183 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
184 .i2c = &ivtv_i2c_std,
187 /* ------------------------------------------------------------------------- */
189 /* Hauppauge PVR-150/PVR-500 cards */
191 static const struct ivtv_card ivtv_card_pvr150 = {
192 .type = IVTV_CARD_PVR_150,
193 .name = "Hauppauge WinTV PVR-150",
194 .v4l2_capabilities = IVTV_CAP_ENCODER,
195 .hw_video = IVTV_HW_CX25840,
196 .hw_audio = IVTV_HW_CX25840,
197 .hw_audio_ctrl = IVTV_HW_CX25840,
198 .hw_muxer = IVTV_HW_WM8775,
199 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
200 IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
201 .video_inputs = {
202 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
203 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
204 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
205 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
206 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
208 .audio_inputs = {
209 { IVTV_CARD_INPUT_AUD_TUNER,
210 CX25840_AUDIO8, WM8775_AIN2 },
211 { IVTV_CARD_INPUT_LINE_IN1,
212 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
213 { IVTV_CARD_INPUT_LINE_IN2,
214 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
216 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
217 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
218 /* apparently needed for the IR blaster */
219 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
220 .i2c = &ivtv_i2c_std,
223 /* ------------------------------------------------------------------------- */
225 /* AVerMedia M179 cards */
227 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
228 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
229 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
230 { 0, 0, 0 }
233 static const struct ivtv_card ivtv_card_m179 = {
234 .type = IVTV_CARD_M179,
235 .name = "AVerMedia M179",
236 .v4l2_capabilities = IVTV_CAP_ENCODER,
237 .hw_video = IVTV_HW_SAA7114,
238 .hw_audio = IVTV_HW_GPIO,
239 .hw_audio_ctrl = IVTV_HW_GPIO,
240 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
241 .video_inputs = {
242 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
243 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
244 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
246 .audio_inputs = {
247 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
248 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
250 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
251 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
252 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
253 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
254 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
255 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
256 .f44100 = 0x0008, .f48000 = 0x0010 },
257 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
258 .tuners = {
259 /* As far as we know all M179 cards use this tuner */
260 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
262 .pci_list = ivtv_pci_m179,
263 .i2c = &ivtv_i2c_std,
266 /* ------------------------------------------------------------------------- */
268 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
270 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
271 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
272 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
273 { 0, 0, 0 }
276 static const struct ivtv_card ivtv_card_mpg600 = {
277 .type = IVTV_CARD_MPG600,
278 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
279 .v4l2_capabilities = IVTV_CAP_ENCODER,
280 .hw_video = IVTV_HW_SAA7115,
281 .hw_audio = IVTV_HW_GPIO,
282 .hw_audio_ctrl = IVTV_HW_GPIO,
283 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
284 .video_inputs = {
285 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
286 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
287 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
289 .audio_inputs = {
290 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
291 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
293 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
294 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
295 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
296 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
297 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
298 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
299 .tuners = {
300 /* The PAL tuner is confirmed */
301 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
302 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
304 .pci_list = ivtv_pci_mpg600,
305 .i2c = &ivtv_i2c_std,
308 /* ------------------------------------------------------------------------- */
310 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
312 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
313 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
314 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
315 { 0, 0, 0 }
318 static const struct ivtv_card ivtv_card_mpg160 = {
319 .type = IVTV_CARD_MPG160,
320 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
321 .v4l2_capabilities = IVTV_CAP_ENCODER,
322 .hw_video = IVTV_HW_SAA7114,
323 .hw_audio = IVTV_HW_GPIO,
324 .hw_audio_ctrl = IVTV_HW_GPIO,
325 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
326 .video_inputs = {
327 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
328 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
329 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
331 .audio_inputs = {
332 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
333 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
335 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
336 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
337 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
338 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
339 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
340 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
341 .tuners = {
342 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
343 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
345 .pci_list = ivtv_pci_mpg160,
346 .i2c = &ivtv_i2c_std,
349 /* ------------------------------------------------------------------------- */
351 /* Yuan PG600/Diamond PVR-550 cards */
353 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
354 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
355 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
356 { 0, 0, 0 }
359 static const struct ivtv_card ivtv_card_pg600 = {
360 .type = IVTV_CARD_PG600,
361 .name = "Yuan PG600, Diamond PVR-550",
362 .v4l2_capabilities = IVTV_CAP_ENCODER,
363 .hw_video = IVTV_HW_CX25840,
364 .hw_audio = IVTV_HW_CX25840,
365 .hw_audio_ctrl = IVTV_HW_CX25840,
366 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
367 .video_inputs = {
368 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
369 { IVTV_CARD_INPUT_SVIDEO1, 1,
370 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
371 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
373 .audio_inputs = {
374 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
375 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
377 .tuners = {
378 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FQ1216ME },
379 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
381 .pci_list = ivtv_pci_pg600,
382 .i2c = &ivtv_i2c_std,
385 /* ------------------------------------------------------------------------- */
387 /* Adaptec VideOh! AVC-2410 card */
389 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
390 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
391 { 0, 0, 0 }
394 static const struct ivtv_card ivtv_card_avc2410 = {
395 .type = IVTV_CARD_AVC2410,
396 .name = "Adaptec VideOh! AVC-2410",
397 .v4l2_capabilities = IVTV_CAP_ENCODER,
398 .hw_video = IVTV_HW_SAA7115,
399 .hw_audio = IVTV_HW_MSP34XX,
400 .hw_audio_ctrl = IVTV_HW_MSP34XX,
401 .hw_muxer = IVTV_HW_CS53L32A,
402 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
403 IVTV_HW_SAA7115 | IVTV_HW_TUNER,
404 .video_inputs = {
405 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
406 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
407 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
409 .audio_inputs = {
410 { IVTV_CARD_INPUT_AUD_TUNER,
411 MSP_TUNER, CS53L32A_IN0 },
412 { IVTV_CARD_INPUT_LINE_IN1,
413 MSP_SCART1, CS53L32A_IN2 },
415 /* This card has no eeprom and in fact the Windows driver relies
416 on the country/region setting of the user to decide which tuner
417 is available. */
418 .tuners = {
419 /* This tuner has been verified for the AVC2410 */
420 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
421 /* This is a good guess, but I'm not totally sure this is
422 the correct tuner for NTSC. */
423 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
425 .pci_list = ivtv_pci_avc2410,
426 .i2c = &ivtv_i2c_std,
429 /* ------------------------------------------------------------------------- */
431 /* Adaptec VideOh! AVC-2010 card */
433 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
434 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
435 { 0, 0, 0 }
438 static const struct ivtv_card ivtv_card_avc2010 = {
439 .type = IVTV_CARD_AVC2010,
440 .name = "Adaptec VideOh! AVC-2010",
441 .v4l2_capabilities = IVTV_CAP_ENCODER,
442 .hw_video = IVTV_HW_SAA7115,
443 .hw_audio = IVTV_HW_CS53L32A,
444 .hw_audio_ctrl = IVTV_HW_CS53L32A,
445 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
446 .video_inputs = {
447 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
448 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
450 .audio_inputs = {
451 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
453 /* Does not have a tuner */
454 .pci_list = ivtv_pci_avc2010,
457 /* ------------------------------------------------------------------------- */
459 /* Nagase Transgear 5000TV card */
461 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
462 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
463 { 0, 0, 0 }
466 static const struct ivtv_card ivtv_card_tg5000tv = {
467 .type = IVTV_CARD_TG5000TV,
468 .name = "Nagase Transgear 5000TV",
469 .v4l2_capabilities = IVTV_CAP_ENCODER,
470 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
471 IVTV_HW_GPIO,
472 .hw_audio = IVTV_HW_GPIO,
473 .hw_audio_ctrl = IVTV_HW_GPIO,
474 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
475 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
476 .video_inputs = {
477 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
478 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
479 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
481 .audio_inputs = {
482 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
483 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
485 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
486 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
487 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
488 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
489 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
490 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
491 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
492 .composite = 0x0010, .svideo = 0x0020 },
493 .tuners = {
494 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
496 .pci_list = ivtv_pci_tg5000tv,
497 .i2c = &ivtv_i2c_std,
500 /* ------------------------------------------------------------------------- */
502 /* AOpen VA2000MAX-SNT6 card */
504 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
505 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
506 { 0, 0, 0 }
509 static const struct ivtv_card ivtv_card_va2000 = {
510 .type = IVTV_CARD_VA2000MAX_SNT6,
511 .name = "AOpen VA2000MAX-SNT6",
512 .v4l2_capabilities = IVTV_CAP_ENCODER,
513 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
514 .hw_audio = IVTV_HW_MSP34XX,
515 .hw_audio_ctrl = IVTV_HW_MSP34XX,
516 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
517 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
518 .video_inputs = {
519 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
521 .audio_inputs = {
522 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
524 .tuners = {
525 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
527 .pci_list = ivtv_pci_va2000,
528 .i2c = &ivtv_i2c_std,
531 /* ------------------------------------------------------------------------- */
533 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
535 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
536 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
537 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
538 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
539 { 0, 0, 0 }
542 static const struct ivtv_card ivtv_card_cx23416gyc = {
543 .type = IVTV_CARD_CX23416GYC,
544 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
545 .v4l2_capabilities = IVTV_CAP_ENCODER,
546 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
547 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
548 .hw_audio = IVTV_HW_SAA717X,
549 .hw_audio_ctrl = IVTV_HW_SAA717X,
550 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
551 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
552 .video_inputs = {
553 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
554 IVTV_SAA717X_TUNER_FLAG },
555 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
556 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
558 .audio_inputs = {
559 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
560 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
562 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
563 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
564 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
565 .composite = 0x0020, .svideo = 0x0020 },
566 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
567 .f44100 = 0x4000, .f48000 = 0x8000 },
568 .tuners = {
569 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
570 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
572 .pci_list = ivtv_pci_cx23416gyc,
573 .i2c = &ivtv_i2c_std,
576 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
577 .type = IVTV_CARD_CX23416GYC_NOGR,
578 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
579 .v4l2_capabilities = IVTV_CAP_ENCODER,
580 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
581 .hw_audio = IVTV_HW_SAA717X,
582 .hw_audio_ctrl = IVTV_HW_SAA717X,
583 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
584 IVTV_HW_UPD6408X,
585 .video_inputs = {
586 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
587 IVTV_SAA717X_TUNER_FLAG },
588 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
589 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
591 .audio_inputs = {
592 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
593 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
595 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
596 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
597 .composite = 0x0020, .svideo = 0x0020 },
598 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
599 .f44100 = 0x4000, .f48000 = 0x8000 },
600 .tuners = {
601 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
602 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
604 .i2c = &ivtv_i2c_std,
607 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
608 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
609 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
610 .v4l2_capabilities = IVTV_CAP_ENCODER,
611 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
612 .hw_audio = IVTV_HW_SAA717X,
613 .hw_audio_ctrl = IVTV_HW_SAA717X,
614 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
615 .video_inputs = {
616 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
617 IVTV_SAA717X_TUNER_FLAG },
618 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
619 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
621 .audio_inputs = {
622 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
623 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
625 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
626 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
627 .composite = 0x0020, .svideo = 0x0020 },
628 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
629 .f44100 = 0x4000, .f48000 = 0x8000 },
630 .tuners = {
631 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
632 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
634 .i2c = &ivtv_i2c_std,
637 /* ------------------------------------------------------------------------- */
639 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
641 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
642 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
643 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
644 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
645 { 0, 0, 0 }
648 static const struct ivtv_card ivtv_card_gv_mvprx = {
649 .type = IVTV_CARD_GV_MVPRX,
650 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
651 .v4l2_capabilities = IVTV_CAP_ENCODER,
652 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
653 .hw_audio = IVTV_HW_GPIO,
654 .hw_audio_ctrl = IVTV_HW_WM8739,
655 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
656 IVTV_HW_TUNER | IVTV_HW_WM8739 |
657 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
658 .video_inputs = {
659 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
660 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
661 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
663 .audio_inputs = {
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 },
669 .tuners = {
670 /* This card has the Panasonic VP27 tuner */
671 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
673 .pci_list = ivtv_pci_gv_mvprx,
674 .i2c = &ivtv_i2c_std,
677 /* ------------------------------------------------------------------------- */
679 /* I/O Data GV-MVP/RX2E card */
681 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
682 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
683 {0, 0, 0}
686 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
687 .type = IVTV_CARD_GV_MVPRX2E,
688 .name = "I/O Data GV-MVP/RX2E",
689 .v4l2_capabilities = IVTV_CAP_ENCODER,
690 .hw_video = IVTV_HW_SAA7115,
691 .hw_audio = IVTV_HW_GPIO,
692 .hw_audio_ctrl = IVTV_HW_WM8739,
693 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
694 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
695 .video_inputs = {
696 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
697 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
698 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
700 .audio_inputs = {
701 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
702 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
704 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
705 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
706 .tuners = {
707 /* This card has the Panasonic VP27 tuner */
708 { .std = V4L2_STD_525_60, .tuner = TUNER_PANASONIC_VP27 },
710 .pci_list = ivtv_pci_gv_mvprx2e,
711 .i2c = &ivtv_i2c_std,
714 /* ------------------------------------------------------------------------- */
716 /* GotVIEW PCI DVD card */
718 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
719 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
720 { 0, 0, 0 }
723 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
724 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
725 .name = "GotView PCI DVD",
726 .v4l2_capabilities = IVTV_CAP_ENCODER,
727 .hw_video = IVTV_HW_SAA717X,
728 .hw_audio = IVTV_HW_SAA717X,
729 .hw_audio_ctrl = IVTV_HW_SAA717X,
730 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
731 .video_inputs = {
732 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
733 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
734 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
736 .audio_inputs = {
737 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
738 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
740 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
741 .tuners = {
742 /* This card has a Philips FQ1216ME MK3 tuner */
743 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
745 .pci_list = ivtv_pci_gotview_pci_dvd,
746 .i2c = &ivtv_i2c_std,
749 /* ------------------------------------------------------------------------- */
751 /* GotVIEW PCI DVD2 Deluxe card */
753 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
754 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
755 { 0, 0, 0 }
758 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
759 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
760 .name = "GotView PCI DVD2 Deluxe",
761 .v4l2_capabilities = IVTV_CAP_ENCODER,
762 .hw_video = IVTV_HW_CX25840,
763 .hw_audio = IVTV_HW_CX25840,
764 .hw_audio_ctrl = IVTV_HW_CX25840,
765 .hw_muxer = IVTV_HW_GPIO,
766 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
767 .video_inputs = {
768 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
769 { IVTV_CARD_INPUT_SVIDEO1, 1,
770 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
771 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
773 .audio_inputs = {
774 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
775 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
777 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
778 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
779 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
780 .tuners = {
781 /* This card has a Philips FQ1216ME MK5 tuner */
782 { .std = V4L2_STD_625_50, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
784 .pci_list = ivtv_pci_gotview_pci_dvd2,
785 .i2c = &ivtv_i2c_std,
788 /* ------------------------------------------------------------------------- */
790 /* Yuan MPC622 miniPCI card */
792 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
793 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
794 { 0, 0, 0 }
797 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
798 .type = IVTV_CARD_YUAN_MPC622,
799 .name = "Yuan MPC622",
800 .v4l2_capabilities = IVTV_CAP_ENCODER,
801 .hw_video = IVTV_HW_CX25840,
802 .hw_audio = IVTV_HW_CX25840,
803 .hw_audio_ctrl = IVTV_HW_CX25840,
804 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
805 .video_inputs = {
806 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
807 { IVTV_CARD_INPUT_SVIDEO1, 1,
808 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
809 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
811 .audio_inputs = {
812 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
813 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
815 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
816 .tuners = {
817 /* This card has the TDA8290/TDA8275 tuner chips */
818 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
820 .pci_list = ivtv_pci_yuan_mpc622,
821 .i2c = &ivtv_i2c_tda8290,
824 /* ------------------------------------------------------------------------- */
826 /* DIGITAL COWBOY DCT-MTVP1 card */
828 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
829 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
830 { 0, 0, 0 }
833 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
834 .type = IVTV_CARD_DCTMTVP1,
835 .name = "Digital Cowboy DCT-MTVP1",
836 .v4l2_capabilities = IVTV_CAP_ENCODER,
837 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
838 IVTV_HW_GPIO,
839 .hw_audio = IVTV_HW_GPIO,
840 .hw_audio_ctrl = IVTV_HW_GPIO,
841 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
842 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
843 .video_inputs = {
844 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
845 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
846 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
848 .audio_inputs = {
849 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
850 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
852 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
853 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
854 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
855 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
856 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
857 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
858 .composite = 0x0010, .svideo = 0x0020},
859 .tuners = {
860 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FQ1286 },
862 .pci_list = ivtv_pci_dctmvtvp1,
863 .i2c = &ivtv_i2c_std,
866 /* ------------------------------------------------------------------------- */
868 /* Yuan PG600-2/GotView PCI DVD Lite cards */
870 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
871 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
872 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
873 { 0, 0, 0 }
876 static const struct ivtv_card ivtv_card_pg600v2 = {
877 .type = IVTV_CARD_PG600V2,
878 .name = "Yuan PG600-2, GotView PCI DVD Lite",
879 .v4l2_capabilities = IVTV_CAP_ENCODER,
880 .hw_video = IVTV_HW_CX25840,
881 .hw_audio = IVTV_HW_CX25840,
882 .hw_audio_ctrl = IVTV_HW_CX25840,
883 .hw_all = IVTV_HW_CX25840,
884 .video_inputs = {
885 { IVTV_CARD_INPUT_SVIDEO1, 0,
886 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
887 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
889 .audio_inputs = {
890 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
892 .pci_list = ivtv_pci_pg600v2,
893 .i2c = &ivtv_i2c_std,
896 /* ------------------------------------------------------------------------- */
898 /* Club3D ZAP-TV1x01 cards */
900 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
901 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
902 { 0, 0, 0 }
905 static const struct ivtv_card ivtv_card_club3d = {
906 .type = IVTV_CARD_CLUB3D,
907 .name = "Club3D ZAP-TV1x01",
908 .v4l2_capabilities = IVTV_CAP_ENCODER,
909 .hw_video = IVTV_HW_CX25840,
910 .hw_audio = IVTV_HW_CX25840,
911 .hw_audio_ctrl = IVTV_HW_CX25840,
912 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
913 .video_inputs = {
914 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
915 { IVTV_CARD_INPUT_SVIDEO1, 1,
916 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
917 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
919 .audio_inputs = {
920 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
921 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
923 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
924 .gpio_init = { .direction = 0x1000, .initial_value = 0x1000 }, /* tuner reset */
925 .tuners = {
926 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
928 .pci_list = ivtv_pci_club3d,
929 .i2c = &ivtv_i2c_std,
932 /* ------------------------------------------------------------------------- */
934 /* AVerTV MCE 116 Plus (M116) card */
936 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
937 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
938 { 0, 0, 0 }
941 static const struct ivtv_card ivtv_card_avertv_mce116 = {
942 .type = IVTV_CARD_AVERTV_MCE116,
943 .name = "AVerTV MCE 116 Plus",
944 .v4l2_capabilities = IVTV_CAP_ENCODER,
945 .hw_video = IVTV_HW_CX25840,
946 .hw_audio = IVTV_HW_CX25840,
947 .hw_audio_ctrl = IVTV_HW_CX25840,
948 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
949 .video_inputs = {
950 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
951 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
953 .audio_inputs = {
954 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
956 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 }, /* enable line-in */
957 .pci_list = ivtv_pci_avertv_mce116,
958 .i2c = &ivtv_i2c_std,
961 /* ------------------------------------------------------------------------- */
963 /* AVerMedia PVR-150 Plus (M113) card */
965 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
966 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 },
967 { 0, 0, 0 }
970 static const struct ivtv_card ivtv_card_aver_pvr150 = {
971 .type = IVTV_CARD_AVER_PVR150PLUS,
972 .name = "AVerMedia PVR-150 Plus",
973 .v4l2_capabilities = IVTV_CAP_ENCODER,
974 .hw_video = IVTV_HW_CX25840,
975 .hw_audio = IVTV_HW_CX25840,
976 .hw_audio_ctrl = IVTV_HW_CX25840,
977 .hw_muxer = IVTV_HW_GPIO,
978 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
979 .video_inputs = {
980 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
981 { IVTV_CARD_INPUT_SVIDEO1, 1,
982 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
983 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
985 .audio_inputs = {
986 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
987 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
989 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
990 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
991 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
992 .tuners = {
993 /* This card has a Partsnic PTI-5NF05 tuner */
994 { .std = V4L2_STD_525_60, .tuner = TUNER_TCL_2002N },
996 .pci_list = ivtv_pci_aver_pvr150,
997 .i2c = &ivtv_i2c_radio,
1000 /* ------------------------------------------------------------------------- */
1002 /* AVerMedia EZMaker PCI Deluxe card */
1004 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1005 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1006 { 0, 0, 0 }
1009 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1010 .type = IVTV_CARD_AVER_EZMAKER,
1011 .name = "AVerMedia EZMaker PCI Deluxe",
1012 .v4l2_capabilities = IVTV_CAP_ENCODER,
1013 .hw_video = IVTV_HW_CX25840,
1014 .hw_audio = IVTV_HW_CX25840,
1015 .hw_audio_ctrl = IVTV_HW_CX25840,
1016 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1017 .video_inputs = {
1018 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1019 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1021 .audio_inputs = {
1022 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1024 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1025 /* Does not have a tuner */
1026 .pci_list = ivtv_pci_aver_ezmaker,
1029 /* ------------------------------------------------------------------------- */
1031 /* ASUS Falcon2 */
1033 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1034 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1035 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1036 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1037 { 0, 0, 0 }
1040 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1041 .type = IVTV_CARD_ASUS_FALCON2,
1042 .name = "ASUS Falcon2",
1043 .v4l2_capabilities = IVTV_CAP_ENCODER,
1044 .hw_video = IVTV_HW_CX25840,
1045 .hw_audio = IVTV_HW_CX25840,
1046 .hw_audio_ctrl = IVTV_HW_CX25840,
1047 .hw_muxer = IVTV_HW_M52790,
1048 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1049 .video_inputs = {
1050 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1051 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1052 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1054 .audio_inputs = {
1055 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1056 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1057 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1058 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1060 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1061 .tuners = {
1062 { .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1064 .pci_list = ivtv_pci_asus_falcon2,
1065 .i2c = &ivtv_i2c_std,
1068 static const struct ivtv_card *ivtv_card_list[] = {
1069 &ivtv_card_pvr250,
1070 &ivtv_card_pvr350,
1071 &ivtv_card_pvr150,
1072 &ivtv_card_m179,
1073 &ivtv_card_mpg600,
1074 &ivtv_card_mpg160,
1075 &ivtv_card_pg600,
1076 &ivtv_card_avc2410,
1077 &ivtv_card_avc2010,
1078 &ivtv_card_tg5000tv,
1079 &ivtv_card_va2000,
1080 &ivtv_card_cx23416gyc,
1081 &ivtv_card_gv_mvprx,
1082 &ivtv_card_gv_mvprx2e,
1083 &ivtv_card_gotview_pci_dvd,
1084 &ivtv_card_gotview_pci_dvd2,
1085 &ivtv_card_yuan_mpc622,
1086 &ivtv_card_dctmvtvp1,
1087 &ivtv_card_pg600v2,
1088 &ivtv_card_club3d,
1089 &ivtv_card_avertv_mce116,
1090 &ivtv_card_asus_falcon2,
1091 &ivtv_card_aver_pvr150,
1092 &ivtv_card_aver_ezmaker,
1094 /* Variations of standard cards but with the same PCI IDs.
1095 These cards must come last in this list. */
1096 &ivtv_card_pvr350_v1,
1097 &ivtv_card_cx23416gyc_nogr,
1098 &ivtv_card_cx23416gyc_nogrycs,
1101 const struct ivtv_card *ivtv_get_card(u16 index)
1103 if (index >= ARRAY_SIZE(ivtv_card_list))
1104 return NULL;
1105 return ivtv_card_list[index];
1108 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1110 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1111 static const char * const input_strs[] = {
1112 "Tuner 1",
1113 "S-Video 1",
1114 "S-Video 2",
1115 "Composite 1",
1116 "Composite 2",
1117 "Composite 3"
1120 memset(input, 0, sizeof(*input));
1121 if (index >= itv->nof_inputs)
1122 return -EINVAL;
1123 input->index = index;
1124 strcpy(input->name, input_strs[card_input->video_type - 1]);
1125 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1126 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1127 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1128 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1129 itv->tuner_std : V4L2_STD_ALL;
1130 return 0;
1133 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1135 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1137 memset(output, 0, sizeof(*output));
1138 if (index >= itv->card->nof_outputs)
1139 return -EINVAL;
1140 output->index = index;
1141 strcpy(output->name, card_output->name);
1142 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1143 output->audioset = 1;
1144 output->std = V4L2_STD_ALL;
1145 return 0;
1148 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1150 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1151 static const char * const input_strs[] = {
1152 "Tuner 1",
1153 "Line In 1",
1154 "Line In 2"
1157 memset(audio, 0, sizeof(*audio));
1158 if (index >= itv->nof_audio_inputs)
1159 return -EINVAL;
1160 strcpy(audio->name, input_strs[aud_input->audio_type - 1]);
1161 audio->index = index;
1162 audio->capability = V4L2_AUDCAP_STEREO;
1163 return 0;
1166 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1168 memset(aud_output, 0, sizeof(*aud_output));
1169 if (itv->card->video_outputs == NULL || index != 0)
1170 return -EINVAL;
1171 strcpy(aud_output->name, "A/V Audio Out");
1172 return 0;