Full support for Ginger Console
[linux-ginger.git] / drivers / media / video / ivtv / ivtv-cards.c
blob4873b6ca580109e43dbd783f4fe47bdb095f2a8c
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 #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,
85 .video_inputs = {
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 },
93 .audio_inputs = {
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 },
99 .i2c = &ivtv_i2c_std,
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",
110 .video_output = 0,
111 }, {
112 .name = "Composite",
113 .video_output = 1,
114 }, {
115 .name = "S-Video",
116 .video_output = 2,
117 }, {
118 .name = "RGB",
119 .video_output = 3,
120 }, {
121 .name = "YUV C",
122 .video_output = 4,
123 }, {
124 .name = "YUV V",
125 .video_output = 5,
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,
140 .video_inputs = {
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 },
148 .audio_inputs = {
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,
172 .video_inputs = {
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 },
180 .audio_inputs = {
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,
203 .video_inputs = {
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 },
210 .audio_inputs = {
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 },
232 { 0, 0, 0 }
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,
243 .video_inputs = {
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 },
248 .audio_inputs = {
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 },
260 .tuners = {
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 },
275 { 0, 0, 0 }
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,
286 .video_inputs = {
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 },
291 .audio_inputs = {
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 },
301 .tuners = {
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 },
317 { 0, 0, 0 }
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,
328 .video_inputs = {
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 },
333 .audio_inputs = {
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 },
343 .tuners = {
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 },
358 { 0, 0, 0 }
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,
369 .video_inputs = {
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 },
375 .audio_inputs = {
376 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
377 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
379 .tuners = {
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 },
393 { 0, 0, 0 }
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,
406 .video_inputs = {
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 },
411 .audio_inputs = {
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
419 is available. */
420 .tuners = {
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 },
436 { 0, 0, 0 }
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,
447 .video_inputs = {
448 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
449 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
451 .audio_inputs = {
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 },
464 { 0, 0, 0 }
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 |
472 IVTV_HW_GPIO,
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,
477 .video_inputs = {
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 },
482 .audio_inputs = {
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 },
494 .tuners = {
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 },
507 { 0, 0, 0 }
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,
519 .video_inputs = {
520 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
522 .audio_inputs = {
523 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
525 .tuners = {
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 },
540 { 0, 0, 0 }
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,
553 .video_inputs = {
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 },
559 .audio_inputs = {
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 },
569 .tuners = {
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 |
585 IVTV_HW_UPD6408X,
586 .video_inputs = {
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 },
592 .audio_inputs = {
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 },
601 .tuners = {
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,
616 .video_inputs = {
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 },
622 .audio_inputs = {
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 },
631 .tuners = {
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 */
646 { 0, 0, 0 }
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,
659 .video_inputs = {
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 },
664 .audio_inputs = {
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 },
670 .tuners = {
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 },
684 {0, 0, 0}
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,
696 .video_inputs = {
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 },
701 .audio_inputs = {
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 },
707 .tuners = {
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 },
721 { 0, 0, 0 }
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,
732 .video_inputs = {
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 */
737 .audio_inputs = {
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 },
742 .tuners = {
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 },
756 { 0, 0, 0 }
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,
768 .video_inputs = {
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 },
774 .audio_inputs = {
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 },
781 .tuners = {
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 },
795 { 0, 0, 0 }
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,
806 .video_inputs = {
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 },
812 .audio_inputs = {
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 },
817 .tuners = {
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 },
831 { 0, 0, 0 }
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 |
839 IVTV_HW_GPIO,
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,
844 .video_inputs = {
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 },
849 .audio_inputs = {
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},
860 .tuners = {
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 },
874 { 0, 0, 0 }
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. */
887 .video_inputs = {
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 },
893 .audio_inputs = {
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 },
898 .xceive_pin = 12,
899 .tuners = {
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 },
912 { 0, 0, 0 }
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,
923 .video_inputs = {
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 },
929 .audio_inputs = {
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 },
934 .xceive_pin = 12,
935 .tuners = {
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 },
948 { 0, 0, 0 }
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,
959 .video_inputs = {
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 },
964 .audio_inputs = {
965 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
966 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
968 /* enable line-in */
969 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
970 .xceive_pin = 10,
971 .tuners = {
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 / AVerTV M113 cards with a Daewoo/Partsnic Tuner */
982 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
983 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc034 }, /* NTSC */
984 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 }, /* NTSC FM */
985 { 0, 0, 0 }
988 static const struct ivtv_card ivtv_card_aver_pvr150 = {
989 .type = IVTV_CARD_AVER_PVR150PLUS,
990 .name = "AVerMedia PVR-150 Plus / AVerTV M113 Partsnic (Daewoo) Tuner",
991 .v4l2_capabilities = IVTV_CAP_ENCODER,
992 .hw_video = IVTV_HW_CX25840,
993 .hw_audio = IVTV_HW_CX25840,
994 .hw_audio_ctrl = IVTV_HW_CX25840,
995 .hw_muxer = IVTV_HW_GPIO,
996 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
997 IVTV_HW_WM8739 | IVTV_HW_GPIO,
998 .video_inputs = {
999 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1000 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1001 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1003 .audio_inputs = {
1004 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1005 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1007 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1008 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1009 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1010 .gpio_audio_input = { .mask = 0xc000,
1011 .tuner = 0x0000,
1012 .linein = 0x4000,
1013 .radio = 0x8000 },
1014 .tuners = {
1015 /* Subsystem ID's 0xc03[45] have a Partsnic PTI-5NF05 tuner */
1016 { .std = V4L2_STD_MN, .tuner = TUNER_PARTSNIC_PTI_5NF05 },
1018 .pci_list = ivtv_pci_aver_pvr150,
1019 /* Subsystem ID 0xc035 has a TEA5767(?) FM tuner, 0xc034 does not */
1020 .i2c = &ivtv_i2c_radio,
1023 /* ------------------------------------------------------------------------- */
1025 /* AVerMedia UltraTV 1500 MCE (newer non-cx88 version, M113 variant) card */
1027 static const struct ivtv_card_pci_info ivtv_pci_aver_ultra1500mce[] = {
1028 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc019 },
1029 { 0, 0, 0 }
1032 static const struct ivtv_card ivtv_card_aver_ultra1500mce = {
1033 .type = IVTV_CARD_AVER_ULTRA1500MCE,
1034 .name = "AVerMedia UltraTV 1500 MCE / AVerTV M113 Philips Tuner",
1035 .v4l2_capabilities = IVTV_CAP_ENCODER,
1036 .hw_video = IVTV_HW_CX25840,
1037 .hw_audio = IVTV_HW_CX25840,
1038 .hw_audio_ctrl = IVTV_HW_CX25840,
1039 .hw_muxer = IVTV_HW_GPIO,
1040 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1041 IVTV_HW_WM8739 | IVTV_HW_GPIO,
1042 .video_inputs = {
1043 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1044 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1045 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1047 .audio_inputs = {
1048 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1049 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1051 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1052 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1053 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1054 .gpio_audio_input = { .mask = 0xc000,
1055 .tuner = 0x0000,
1056 .linein = 0x4000,
1057 .radio = 0x8000 },
1058 .tuners = {
1059 /* The UltraTV 1500 MCE has a Philips FM1236 MK5 TV/FM tuner */
1060 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1062 .pci_list = ivtv_pci_aver_ultra1500mce,
1063 .i2c = &ivtv_i2c_std,
1066 /* ------------------------------------------------------------------------- */
1068 /* AVerMedia EZMaker PCI Deluxe card */
1070 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1071 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1072 { 0, 0, 0 }
1075 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1076 .type = IVTV_CARD_AVER_EZMAKER,
1077 .name = "AVerMedia EZMaker PCI Deluxe",
1078 .v4l2_capabilities = IVTV_CAP_ENCODER,
1079 .hw_video = IVTV_HW_CX25840,
1080 .hw_audio = IVTV_HW_CX25840,
1081 .hw_audio_ctrl = IVTV_HW_CX25840,
1082 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1083 .video_inputs = {
1084 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1085 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1087 .audio_inputs = {
1088 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1090 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1091 /* Does not have a tuner */
1092 .pci_list = ivtv_pci_aver_ezmaker,
1095 /* ------------------------------------------------------------------------- */
1097 /* ASUS Falcon2 */
1099 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1100 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1101 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1102 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1103 { 0, 0, 0 }
1106 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1107 .type = IVTV_CARD_ASUS_FALCON2,
1108 .name = "ASUS Falcon2",
1109 .v4l2_capabilities = IVTV_CAP_ENCODER,
1110 .hw_video = IVTV_HW_CX25840,
1111 .hw_audio = IVTV_HW_CX25840,
1112 .hw_audio_ctrl = IVTV_HW_CX25840,
1113 .hw_muxer = IVTV_HW_M52790,
1114 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1115 .video_inputs = {
1116 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1117 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1118 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1120 .audio_inputs = {
1121 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1122 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1123 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1124 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1126 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1127 .tuners = {
1128 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1130 .pci_list = ivtv_pci_asus_falcon2,
1131 .i2c = &ivtv_i2c_std,
1134 /* ------------------------------------------------------------------------- */
1136 /* AVerMedia M104 miniPCI card */
1138 static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1139 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1140 { 0, 0, 0 }
1143 static const struct ivtv_card ivtv_card_aver_m104 = {
1144 .type = IVTV_CARD_AVER_M104,
1145 .name = "AVerMedia M104",
1146 .comment = "Not yet supported!\n",
1147 .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1148 .hw_video = IVTV_HW_CX25840,
1149 .hw_audio = IVTV_HW_CX25840,
1150 .hw_audio_ctrl = IVTV_HW_CX25840,
1151 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1152 .video_inputs = {
1153 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1154 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1156 .audio_inputs = {
1157 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1159 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1160 /* enable line-in + reset tuner */
1161 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
1162 .xceive_pin = 10,
1163 .tuners = {
1164 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1166 .pci_list = ivtv_pci_aver_m104,
1167 .i2c = &ivtv_i2c_std,
1170 /* ------------------------------------------------------------------------- */
1172 /* Buffalo PC-MV5L/PCI cards */
1174 static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1175 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1176 { 0, 0, 0 }
1179 static const struct ivtv_card ivtv_card_buffalo = {
1180 .type = IVTV_CARD_BUFFALO_MV5L,
1181 .name = "Buffalo PC-MV5L/PCI",
1182 .v4l2_capabilities = IVTV_CAP_ENCODER,
1183 .hw_video = IVTV_HW_CX25840,
1184 .hw_audio = IVTV_HW_CX25840,
1185 .hw_audio_ctrl = IVTV_HW_CX25840,
1186 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1187 .video_inputs = {
1188 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1189 { IVTV_CARD_INPUT_SVIDEO1, 1,
1190 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1191 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1193 .audio_inputs = {
1194 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
1195 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
1197 .xceive_pin = 12,
1198 .tuners = {
1199 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1201 .pci_list = ivtv_pci_buffalo,
1202 .i2c = &ivtv_i2c_std,
1205 static const struct ivtv_card *ivtv_card_list[] = {
1206 &ivtv_card_pvr250,
1207 &ivtv_card_pvr350,
1208 &ivtv_card_pvr150,
1209 &ivtv_card_m179,
1210 &ivtv_card_mpg600,
1211 &ivtv_card_mpg160,
1212 &ivtv_card_pg600,
1213 &ivtv_card_avc2410,
1214 &ivtv_card_avc2010,
1215 &ivtv_card_tg5000tv,
1216 &ivtv_card_va2000,
1217 &ivtv_card_cx23416gyc,
1218 &ivtv_card_gv_mvprx,
1219 &ivtv_card_gv_mvprx2e,
1220 &ivtv_card_gotview_pci_dvd,
1221 &ivtv_card_gotview_pci_dvd2,
1222 &ivtv_card_yuan_mpc622,
1223 &ivtv_card_dctmvtvp1,
1224 &ivtv_card_pg600v2,
1225 &ivtv_card_club3d,
1226 &ivtv_card_avertv_mce116,
1227 &ivtv_card_asus_falcon2,
1228 &ivtv_card_aver_pvr150,
1229 &ivtv_card_aver_ezmaker,
1230 &ivtv_card_aver_m104,
1231 &ivtv_card_buffalo,
1232 &ivtv_card_aver_ultra1500mce,
1234 /* Variations of standard cards but with the same PCI IDs.
1235 These cards must come last in this list. */
1236 &ivtv_card_pvr350_v1,
1237 &ivtv_card_cx23416gyc_nogr,
1238 &ivtv_card_cx23416gyc_nogrycs,
1241 const struct ivtv_card *ivtv_get_card(u16 index)
1243 if (index >= ARRAY_SIZE(ivtv_card_list))
1244 return NULL;
1245 return ivtv_card_list[index];
1248 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1250 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1251 static const char * const input_strs[] = {
1252 "Tuner 1",
1253 "S-Video 1",
1254 "S-Video 2",
1255 "Composite 1",
1256 "Composite 2",
1257 "Composite 3"
1260 memset(input, 0, sizeof(*input));
1261 if (index >= itv->nof_inputs)
1262 return -EINVAL;
1263 input->index = index;
1264 strlcpy(input->name, input_strs[card_input->video_type - 1],
1265 sizeof(input->name));
1266 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1267 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1268 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1269 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1270 itv->tuner_std : V4L2_STD_ALL;
1271 return 0;
1274 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1276 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1278 memset(output, 0, sizeof(*output));
1279 if (index >= itv->card->nof_outputs)
1280 return -EINVAL;
1281 output->index = index;
1282 strlcpy(output->name, card_output->name, sizeof(output->name));
1283 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1284 output->audioset = 1;
1285 output->std = V4L2_STD_ALL;
1286 return 0;
1289 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1291 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1292 static const char * const input_strs[] = {
1293 "Tuner 1",
1294 "Line In 1",
1295 "Line In 2"
1298 memset(audio, 0, sizeof(*audio));
1299 if (index >= itv->nof_audio_inputs)
1300 return -EINVAL;
1301 strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1302 sizeof(audio->name));
1303 audio->index = index;
1304 audio->capability = V4L2_AUDCAP_STEREO;
1305 return 0;
1308 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1310 memset(aud_output, 0, sizeof(*aud_output));
1311 if (itv->card->video_outputs == NULL || index != 0)
1312 return -EINVAL;
1313 strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
1314 return 0;