Staging: strip: delete the driver
[linux/fpc-iii.git] / drivers / media / video / ivtv / ivtv-cards.c
blobca1fd3227a9332486d01610d7ff4c8508f1a5aaf
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 IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT,
141 .video_inputs = {
142 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
143 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
144 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
145 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
146 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
147 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
149 .audio_inputs = {
150 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
151 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
152 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
154 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
155 .i2c = &ivtv_i2c_std,
158 /* PVR-350 V1 boards have a different audio tuner input and use a
159 saa7114 instead of a saa7115.
160 Note that the info below comes from a pre-production model so it may
161 not be correct. Especially the audio behaves strangely (mono only it seems) */
162 static const struct ivtv_card ivtv_card_pvr350_v1 = {
163 .type = IVTV_CARD_PVR_350_V1,
164 .name = "Hauppauge WinTV PVR-350 (V1)",
165 .v4l2_capabilities = IVTV_CAP_ENCODER | IVTV_CAP_DECODER,
166 .video_outputs = ivtv_pvr350_outputs,
167 .nof_outputs = ARRAY_SIZE(ivtv_pvr350_outputs),
168 .hw_video = IVTV_HW_SAA7114,
169 .hw_audio = IVTV_HW_MSP34XX,
170 .hw_audio_ctrl = IVTV_HW_MSP34XX,
171 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7114 |
172 IVTV_HW_SAA7127 | IVTV_HW_TVEEPROM | IVTV_HW_TUNER,
173 .video_inputs = {
174 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
175 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
176 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
177 { IVTV_CARD_INPUT_SVIDEO2, 2, IVTV_SAA71XX_SVIDEO1 },
178 { IVTV_CARD_INPUT_COMPOSITE2, 2, IVTV_SAA71XX_COMPOSITE1 },
179 { IVTV_CARD_INPUT_COMPOSITE3, 1, IVTV_SAA71XX_COMPOSITE5 },
181 .audio_inputs = {
182 { IVTV_CARD_INPUT_AUD_TUNER, MSP_MONO },
183 { IVTV_CARD_INPUT_LINE_IN1, MSP_SCART1 },
184 { IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
186 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
187 .i2c = &ivtv_i2c_std,
190 /* ------------------------------------------------------------------------- */
192 /* Hauppauge PVR-150/PVR-500 cards */
194 static const struct ivtv_card ivtv_card_pvr150 = {
195 .type = IVTV_CARD_PVR_150,
196 .name = "Hauppauge WinTV PVR-150",
197 .v4l2_capabilities = IVTV_CAP_ENCODER,
198 .hw_video = IVTV_HW_CX25840,
199 .hw_audio = IVTV_HW_CX25840,
200 .hw_audio_ctrl = IVTV_HW_CX25840,
201 .hw_muxer = IVTV_HW_WM8775,
202 .hw_all = IVTV_HW_WM8775 | IVTV_HW_CX25840 |
203 IVTV_HW_TVEEPROM | IVTV_HW_TUNER |
204 IVTV_HW_I2C_IR_RX_HAUP_EXT | IVTV_HW_I2C_IR_RX_HAUP_INT |
205 IVTV_HW_Z8F0811_IR_HAUP,
206 .video_inputs = {
207 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE7 },
208 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO1 },
209 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
210 { IVTV_CARD_INPUT_SVIDEO2, 2, CX25840_SVIDEO2 },
211 { IVTV_CARD_INPUT_COMPOSITE2, 2, CX25840_COMPOSITE4 },
213 .audio_inputs = {
214 { IVTV_CARD_INPUT_AUD_TUNER,
215 CX25840_AUDIO8, WM8775_AIN2 },
216 { IVTV_CARD_INPUT_LINE_IN1,
217 CX25840_AUDIO_SERIAL, WM8775_AIN2 },
218 { IVTV_CARD_INPUT_LINE_IN2,
219 CX25840_AUDIO_SERIAL, WM8775_AIN3 },
221 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER,
222 CX25840_AUDIO_SERIAL, WM8775_AIN4 },
223 /* apparently needed for the IR blaster */
224 .gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
225 .i2c = &ivtv_i2c_std,
228 /* ------------------------------------------------------------------------- */
230 /* AVerMedia M179 cards */
232 static const struct ivtv_card_pci_info ivtv_pci_m179[] = {
233 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3cf },
234 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_AVERMEDIA, 0xa3ce },
235 { 0, 0, 0 }
238 static const struct ivtv_card ivtv_card_m179 = {
239 .type = IVTV_CARD_M179,
240 .name = "AVerMedia M179",
241 .v4l2_capabilities = IVTV_CAP_ENCODER,
242 .hw_video = IVTV_HW_SAA7114,
243 .hw_audio = IVTV_HW_GPIO,
244 .hw_audio_ctrl = IVTV_HW_GPIO,
245 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
246 .video_inputs = {
247 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
248 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
249 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
251 .audio_inputs = {
252 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
253 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
255 .gpio_init = { .direction = 0xe380, .initial_value = 0x8290 },
256 .gpio_audio_input = { .mask = 0x8040, .tuner = 0x8000, .linein = 0x0000 },
257 .gpio_audio_mute = { .mask = 0x2000, .mute = 0x2000 },
258 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
259 .lang1 = 0x0200, .lang2 = 0x0100, .both = 0x0000 },
260 .gpio_audio_freq = { .mask = 0x0018, .f32000 = 0x0000,
261 .f44100 = 0x0008, .f48000 = 0x0010 },
262 .gpio_audio_detect = { .mask = 0x4000, .stereo = 0x0000 },
263 .tuners = {
264 /* As far as we know all M179 cards use this tuner */
265 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_NTSC },
267 .pci_list = ivtv_pci_m179,
268 .i2c = &ivtv_i2c_std,
271 /* ------------------------------------------------------------------------- */
273 /* Yuan MPG600/Kuroutoshikou ITVC16-STVLP cards */
275 static const struct ivtv_card_pci_info ivtv_pci_mpg600[] = {
276 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xfff3 },
277 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0xffff },
278 { 0, 0, 0 }
281 static const struct ivtv_card ivtv_card_mpg600 = {
282 .type = IVTV_CARD_MPG600,
283 .name = "Yuan MPG600, Kuroutoshikou ITVC16-STVLP",
284 .v4l2_capabilities = IVTV_CAP_ENCODER,
285 .hw_video = IVTV_HW_SAA7115,
286 .hw_audio = IVTV_HW_GPIO,
287 .hw_audio_ctrl = IVTV_HW_GPIO,
288 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
289 .video_inputs = {
290 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
291 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
292 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
294 .audio_inputs = {
295 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
296 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
298 .gpio_init = { .direction = 0x3080, .initial_value = 0x0004 },
299 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
300 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
301 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
302 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
303 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
304 .tuners = {
305 /* The PAL tuner is confirmed */
306 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
307 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
309 .pci_list = ivtv_pci_mpg600,
310 .i2c = &ivtv_i2c_std,
313 /* ------------------------------------------------------------------------- */
315 /* Yuan MPG160/Kuroutoshikou ITVC15-STVLP cards */
317 static const struct ivtv_card_pci_info ivtv_pci_mpg160[] = {
318 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_YUAN1, 0 },
319 { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_IODATA, 0x40a0 },
320 { 0, 0, 0 }
323 static const struct ivtv_card ivtv_card_mpg160 = {
324 .type = IVTV_CARD_MPG160,
325 .name = "YUAN MPG160, Kuroutoshikou ITVC15-STVLP, I/O Data GV-M2TV/PCI",
326 .v4l2_capabilities = IVTV_CAP_ENCODER,
327 .hw_video = IVTV_HW_SAA7114,
328 .hw_audio = IVTV_HW_GPIO,
329 .hw_audio_ctrl = IVTV_HW_GPIO,
330 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER,
331 .video_inputs = {
332 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
333 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
334 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
336 .audio_inputs = {
337 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
338 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
340 .gpio_init = { .direction = 0x7080, .initial_value = 0x400c },
341 .gpio_audio_input = { .mask = 0x3000, .tuner = 0x0000, .linein = 0x2000 },
342 .gpio_audio_mute = { .mask = 0x0001, .mute = 0x0001 },
343 .gpio_audio_mode = { .mask = 0x000e, .mono = 0x0006, .stereo = 0x0004,
344 .lang1 = 0x0004, .lang2 = 0x0000, .both = 0x0008 },
345 .gpio_audio_detect = { .mask = 0x0900, .stereo = 0x0100 },
346 .tuners = {
347 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
348 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
350 .pci_list = ivtv_pci_mpg160,
351 .i2c = &ivtv_i2c_std,
354 /* ------------------------------------------------------------------------- */
356 /* Yuan PG600/Diamond PVR-550 cards */
358 static const struct ivtv_card_pci_info ivtv_pci_pg600[] = {
359 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_DIAMONDMM, 0x0070 },
360 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
361 { 0, 0, 0 }
364 static const struct ivtv_card ivtv_card_pg600 = {
365 .type = IVTV_CARD_PG600,
366 .name = "Yuan PG600, Diamond PVR-550",
367 .v4l2_capabilities = IVTV_CAP_ENCODER,
368 .hw_video = IVTV_HW_CX25840,
369 .hw_audio = IVTV_HW_CX25840,
370 .hw_audio_ctrl = IVTV_HW_CX25840,
371 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
372 .video_inputs = {
373 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
374 { IVTV_CARD_INPUT_SVIDEO1, 1,
375 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
376 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
378 .audio_inputs = {
379 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
380 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
382 .tuners = {
383 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FQ1216ME },
384 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FQ1286 },
386 .pci_list = ivtv_pci_pg600,
387 .i2c = &ivtv_i2c_std,
390 /* ------------------------------------------------------------------------- */
392 /* Adaptec VideOh! AVC-2410 card */
394 static const struct ivtv_card_pci_info ivtv_pci_avc2410[] = {
395 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
396 { 0, 0, 0 }
399 static const struct ivtv_card ivtv_card_avc2410 = {
400 .type = IVTV_CARD_AVC2410,
401 .name = "Adaptec VideOh! AVC-2410",
402 .v4l2_capabilities = IVTV_CAP_ENCODER,
403 .hw_video = IVTV_HW_SAA7115,
404 .hw_audio = IVTV_HW_MSP34XX,
405 .hw_audio_ctrl = IVTV_HW_MSP34XX,
406 .hw_muxer = IVTV_HW_CS53L32A,
407 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_CS53L32A |
408 IVTV_HW_SAA7115 | IVTV_HW_TUNER,
409 .video_inputs = {
410 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
411 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
412 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
414 .audio_inputs = {
415 { IVTV_CARD_INPUT_AUD_TUNER,
416 MSP_TUNER, CS53L32A_IN0 },
417 { IVTV_CARD_INPUT_LINE_IN1,
418 MSP_SCART1, CS53L32A_IN2 },
420 /* This card has no eeprom and in fact the Windows driver relies
421 on the country/region setting of the user to decide which tuner
422 is available. */
423 .tuners = {
424 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
425 { .std = V4L2_STD_ALL - V4L2_STD_NTSC_M_JP,
426 .tuner = TUNER_PHILIPS_FM1236_MK3 },
427 { .std = V4L2_STD_NTSC_M_JP, .tuner = TUNER_PHILIPS_FQ1286 },
429 .pci_list = ivtv_pci_avc2410,
430 .i2c = &ivtv_i2c_std,
433 /* ------------------------------------------------------------------------- */
435 /* Adaptec VideOh! AVC-2010 card */
437 static const struct ivtv_card_pci_info ivtv_pci_avc2010[] = {
438 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
439 { 0, 0, 0 }
442 static const struct ivtv_card ivtv_card_avc2010 = {
443 .type = IVTV_CARD_AVC2010,
444 .name = "Adaptec VideOh! AVC-2010",
445 .v4l2_capabilities = IVTV_CAP_ENCODER,
446 .hw_video = IVTV_HW_SAA7115,
447 .hw_audio = IVTV_HW_CS53L32A,
448 .hw_audio_ctrl = IVTV_HW_CS53L32A,
449 .hw_all = IVTV_HW_CS53L32A | IVTV_HW_SAA7115,
450 .video_inputs = {
451 { IVTV_CARD_INPUT_SVIDEO1, 0, IVTV_SAA71XX_SVIDEO0 },
452 { IVTV_CARD_INPUT_COMPOSITE1, 0, IVTV_SAA71XX_COMPOSITE3 },
454 .audio_inputs = {
455 { IVTV_CARD_INPUT_LINE_IN1, CS53L32A_IN2 },
457 /* Does not have a tuner */
458 .pci_list = ivtv_pci_avc2010,
461 /* ------------------------------------------------------------------------- */
463 /* Nagase Transgear 5000TV card */
465 static const struct ivtv_card_pci_info ivtv_pci_tg5000tv[] = {
466 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
467 { 0, 0, 0 }
470 static const struct ivtv_card ivtv_card_tg5000tv = {
471 .type = IVTV_CARD_TG5000TV,
472 .name = "Nagase Transgear 5000TV",
473 .v4l2_capabilities = IVTV_CAP_ENCODER,
474 .hw_video = IVTV_HW_SAA7114 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
475 IVTV_HW_GPIO,
476 .hw_audio = IVTV_HW_GPIO,
477 .hw_audio_ctrl = IVTV_HW_GPIO,
478 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7114 | IVTV_HW_TUNER |
479 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
480 .video_inputs = {
481 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
482 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
483 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
485 .audio_inputs = {
486 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
487 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
489 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
490 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
491 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
492 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
493 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
494 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
495 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
496 .composite = 0x0010, .svideo = 0x0020 },
497 .tuners = {
498 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
500 .pci_list = ivtv_pci_tg5000tv,
501 .i2c = &ivtv_i2c_std,
504 /* ------------------------------------------------------------------------- */
506 /* AOpen VA2000MAX-SNT6 card */
508 static const struct ivtv_card_pci_info ivtv_pci_va2000[] = {
509 { PCI_DEVICE_ID_IVTV16, 0, 0xff5f },
510 { 0, 0, 0 }
513 static const struct ivtv_card ivtv_card_va2000 = {
514 .type = IVTV_CARD_VA2000MAX_SNT6,
515 .name = "AOpen VA2000MAX-SNT6",
516 .v4l2_capabilities = IVTV_CAP_ENCODER,
517 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD6408X,
518 .hw_audio = IVTV_HW_MSP34XX,
519 .hw_audio_ctrl = IVTV_HW_MSP34XX,
520 .hw_all = IVTV_HW_MSP34XX | IVTV_HW_SAA7115 |
521 IVTV_HW_UPD6408X | IVTV_HW_TUNER,
522 .video_inputs = {
523 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
525 .audio_inputs = {
526 { IVTV_CARD_INPUT_AUD_TUNER, MSP_TUNER },
528 .tuners = {
529 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
531 .pci_list = ivtv_pci_va2000,
532 .i2c = &ivtv_i2c_std,
535 /* ------------------------------------------------------------------------- */
537 /* Yuan MPG600GR/Kuroutoshikou CX23416GYC-STVLP cards */
539 static const struct ivtv_card_pci_info ivtv_pci_cx23416gyc[] = {
540 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
541 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN4, 0x0600 },
542 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x0523 },
543 { 0, 0, 0 }
546 static const struct ivtv_card ivtv_card_cx23416gyc = {
547 .type = IVTV_CARD_CX23416GYC,
548 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP",
549 .v4l2_capabilities = IVTV_CAP_ENCODER,
550 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO |
551 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
552 .hw_audio = IVTV_HW_SAA717X,
553 .hw_audio_ctrl = IVTV_HW_SAA717X,
554 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
555 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
556 .video_inputs = {
557 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO3 |
558 IVTV_SAA717X_TUNER_FLAG },
559 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
560 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO3 },
562 .audio_inputs = {
563 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
564 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
566 .gr_config = UPD64031A_VERTICAL_EXTERNAL,
567 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
568 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
569 .composite = 0x0020, .svideo = 0x0020 },
570 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
571 .f44100 = 0x4000, .f48000 = 0x8000 },
572 .tuners = {
573 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
574 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
576 .pci_list = ivtv_pci_cx23416gyc,
577 .i2c = &ivtv_i2c_std,
580 static const struct ivtv_card ivtv_card_cx23416gyc_nogr = {
581 .type = IVTV_CARD_CX23416GYC_NOGR,
582 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR)",
583 .v4l2_capabilities = IVTV_CAP_ENCODER,
584 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO | IVTV_HW_UPD6408X,
585 .hw_audio = IVTV_HW_SAA717X,
586 .hw_audio_ctrl = IVTV_HW_SAA717X,
587 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER |
588 IVTV_HW_UPD6408X,
589 .video_inputs = {
590 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
591 IVTV_SAA717X_TUNER_FLAG },
592 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
593 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
595 .audio_inputs = {
596 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
597 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
599 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
600 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
601 .composite = 0x0020, .svideo = 0x0020 },
602 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
603 .f44100 = 0x4000, .f48000 = 0x8000 },
604 .tuners = {
605 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
606 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
608 .i2c = &ivtv_i2c_std,
611 static const struct ivtv_card ivtv_card_cx23416gyc_nogrycs = {
612 .type = IVTV_CARD_CX23416GYC_NOGRYCS,
613 .name = "Yuan MPG600GR, Kuroutoshikou CX23416GYC-STVLP (no GR/YCS)",
614 .v4l2_capabilities = IVTV_CAP_ENCODER,
615 .hw_video = IVTV_HW_SAA717X | IVTV_HW_GPIO,
616 .hw_audio = IVTV_HW_SAA717X,
617 .hw_audio_ctrl = IVTV_HW_SAA717X,
618 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA717X | IVTV_HW_TUNER,
619 .video_inputs = {
620 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 |
621 IVTV_SAA717X_TUNER_FLAG },
622 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
623 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE0 },
625 .audio_inputs = {
626 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN2 },
627 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN0 },
629 .gpio_init = { .direction = 0xf880, .initial_value = 0x8800 },
630 .gpio_video_input = { .mask = 0x0020, .tuner = 0x0000,
631 .composite = 0x0020, .svideo = 0x0020 },
632 .gpio_audio_freq = { .mask = 0xc000, .f32000 = 0x0000,
633 .f44100 = 0x4000, .f48000 = 0x8000 },
634 .tuners = {
635 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
636 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_FM1236_MK3 },
638 .i2c = &ivtv_i2c_std,
641 /* ------------------------------------------------------------------------- */
643 /* I/O Data GV-MVP/RX & GV-MVP/RX2W (dual tuner) cards */
645 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx[] = {
646 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd01e },
647 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd038 }, /* 2W unit #1 */
648 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd039 }, /* 2W unit #2 */
649 { 0, 0, 0 }
652 static const struct ivtv_card ivtv_card_gv_mvprx = {
653 .type = IVTV_CARD_GV_MVPRX,
654 .name = "I/O Data GV-MVP/RX, GV-MVP/RX2W (dual tuner)",
655 .v4l2_capabilities = IVTV_CAP_ENCODER,
656 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
657 .hw_audio = IVTV_HW_GPIO,
658 .hw_audio_ctrl = IVTV_HW_WM8739,
659 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_VP27SMPX |
660 IVTV_HW_TUNER | IVTV_HW_WM8739 |
661 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
662 .video_inputs = {
663 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
664 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
665 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
667 .audio_inputs = {
668 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
669 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
671 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
672 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
673 .tuners = {
674 /* This card has the Panasonic VP27 tuner */
675 { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
677 .pci_list = ivtv_pci_gv_mvprx,
678 .i2c = &ivtv_i2c_std,
681 /* ------------------------------------------------------------------------- */
683 /* I/O Data GV-MVP/RX2E card */
685 static const struct ivtv_card_pci_info ivtv_pci_gv_mvprx2e[] = {
686 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_IODATA, 0xd025 },
687 {0, 0, 0}
690 static const struct ivtv_card ivtv_card_gv_mvprx2e = {
691 .type = IVTV_CARD_GV_MVPRX2E,
692 .name = "I/O Data GV-MVP/RX2E",
693 .v4l2_capabilities = IVTV_CAP_ENCODER,
694 .hw_video = IVTV_HW_SAA7115,
695 .hw_audio = IVTV_HW_GPIO,
696 .hw_audio_ctrl = IVTV_HW_WM8739,
697 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
698 IVTV_HW_VP27SMPX | IVTV_HW_WM8739,
699 .video_inputs = {
700 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE4 },
701 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 },
702 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 },
704 .audio_inputs = {
705 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
706 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
708 .gpio_init = { .direction = 0xc301, .initial_value = 0x0200 },
709 .gpio_audio_input = { .mask = 0xffff, .tuner = 0x0200, .linein = 0x0300 },
710 .tuners = {
711 /* This card has the Panasonic VP27 tuner */
712 { .std = V4L2_STD_MN, .tuner = TUNER_PANASONIC_VP27 },
714 .pci_list = ivtv_pci_gv_mvprx2e,
715 .i2c = &ivtv_i2c_std,
718 /* ------------------------------------------------------------------------- */
720 /* GotVIEW PCI DVD card */
722 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd[] = {
723 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN1, 0x0600 },
724 { 0, 0, 0 }
727 static const struct ivtv_card ivtv_card_gotview_pci_dvd = {
728 .type = IVTV_CARD_GOTVIEW_PCI_DVD,
729 .name = "GotView PCI DVD",
730 .v4l2_capabilities = IVTV_CAP_ENCODER,
731 .hw_video = IVTV_HW_SAA717X,
732 .hw_audio = IVTV_HW_SAA717X,
733 .hw_audio_ctrl = IVTV_HW_SAA717X,
734 .hw_all = IVTV_HW_SAA717X | IVTV_HW_TUNER,
735 .video_inputs = {
736 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 }, /* pin 116 */
737 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO0 }, /* pin 114/109 */
738 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE3 }, /* pin 118 */
740 .audio_inputs = {
741 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_SAA717X_IN0 },
742 { IVTV_CARD_INPUT_LINE_IN1, IVTV_SAA717X_IN2 },
744 .gpio_init = { .direction = 0xf000, .initial_value = 0xA000 },
745 .tuners = {
746 /* This card has a Philips FQ1216ME MK3 tuner */
747 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
749 .pci_list = ivtv_pci_gotview_pci_dvd,
750 .i2c = &ivtv_i2c_std,
753 /* ------------------------------------------------------------------------- */
755 /* GotVIEW PCI DVD2 Deluxe card */
757 static const struct ivtv_card_pci_info ivtv_pci_gotview_pci_dvd2[] = {
758 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW1, 0x0600 },
759 { 0, 0, 0 }
762 static const struct ivtv_card ivtv_card_gotview_pci_dvd2 = {
763 .type = IVTV_CARD_GOTVIEW_PCI_DVD2,
764 .name = "GotView PCI DVD2 Deluxe",
765 .v4l2_capabilities = IVTV_CAP_ENCODER,
766 .hw_video = IVTV_HW_CX25840,
767 .hw_audio = IVTV_HW_CX25840,
768 .hw_audio_ctrl = IVTV_HW_CX25840,
769 .hw_muxer = IVTV_HW_GPIO,
770 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
771 .video_inputs = {
772 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
773 { IVTV_CARD_INPUT_SVIDEO1, 1,
774 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
775 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
777 .audio_inputs = {
778 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
779 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
781 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
782 .gpio_init = { .direction = 0x0800, .initial_value = 0 },
783 .gpio_audio_input = { .mask = 0x0800, .tuner = 0, .linein = 0, .radio = 0x0800 },
784 .tuners = {
785 /* This card has a Philips FQ1216ME MK5 tuner */
786 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
788 .pci_list = ivtv_pci_gotview_pci_dvd2,
789 .i2c = &ivtv_i2c_std,
792 /* ------------------------------------------------------------------------- */
794 /* Yuan MPC622 miniPCI card */
796 static const struct ivtv_card_pci_info ivtv_pci_yuan_mpc622[] = {
797 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN2, 0xd998 },
798 { 0, 0, 0 }
801 static const struct ivtv_card ivtv_card_yuan_mpc622 = {
802 .type = IVTV_CARD_YUAN_MPC622,
803 .name = "Yuan MPC622",
804 .v4l2_capabilities = IVTV_CAP_ENCODER,
805 .hw_video = IVTV_HW_CX25840,
806 .hw_audio = IVTV_HW_CX25840,
807 .hw_audio_ctrl = IVTV_HW_CX25840,
808 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
809 .video_inputs = {
810 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
811 { IVTV_CARD_INPUT_SVIDEO1, 1,
812 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
813 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
815 .audio_inputs = {
816 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
817 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
819 .gpio_init = { .direction = 0x00ff, .initial_value = 0x0002 },
820 .tuners = {
821 /* This card has the TDA8290/TDA8275 tuner chips */
822 { .std = V4L2_STD_ALL, .tuner = TUNER_PHILIPS_TDA8290 },
824 .pci_list = ivtv_pci_yuan_mpc622,
825 .i2c = &ivtv_i2c_tda8290,
828 /* ------------------------------------------------------------------------- */
830 /* DIGITAL COWBOY DCT-MTVP1 card */
832 static const struct ivtv_card_pci_info ivtv_pci_dctmvtvp1[] = {
833 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xbfff },
834 { 0, 0, 0 }
837 static const struct ivtv_card ivtv_card_dctmvtvp1 = {
838 .type = IVTV_CARD_DCTMTVP1,
839 .name = "Digital Cowboy DCT-MTVP1",
840 .v4l2_capabilities = IVTV_CAP_ENCODER,
841 .hw_video = IVTV_HW_SAA7115 | IVTV_HW_UPD64031A | IVTV_HW_UPD6408X |
842 IVTV_HW_GPIO,
843 .hw_audio = IVTV_HW_GPIO,
844 .hw_audio_ctrl = IVTV_HW_GPIO,
845 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER |
846 IVTV_HW_UPD64031A | IVTV_HW_UPD6408X,
847 .video_inputs = {
848 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_SVIDEO0 },
849 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO2 },
850 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_SVIDEO2 },
852 .audio_inputs = {
853 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
854 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
856 .gpio_init = { .direction = 0xe080, .initial_value = 0x8000 },
857 .gpio_audio_input = { .mask = 0x8080, .tuner = 0x8000, .linein = 0x0080 },
858 .gpio_audio_mute = { .mask = 0x6000, .mute = 0x6000 },
859 .gpio_audio_mode = { .mask = 0x4300, .mono = 0x4000, .stereo = 0x0200,
860 .lang1 = 0x0300, .lang2 = 0x0000, .both = 0x0200 },
861 .gpio_video_input = { .mask = 0x0030, .tuner = 0x0000,
862 .composite = 0x0010, .svideo = 0x0020},
863 .tuners = {
864 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FQ1286 },
866 .pci_list = ivtv_pci_dctmvtvp1,
867 .i2c = &ivtv_i2c_std,
870 /* ------------------------------------------------------------------------- */
872 /* Yuan PG600-2/GotView PCI DVD Lite cards */
874 static const struct ivtv_card_pci_info ivtv_pci_pg600v2[] = {
875 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
876 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_GOTVIEW2, 0x0600 },
877 { 0, 0, 0 }
880 static const struct ivtv_card ivtv_card_pg600v2 = {
881 .type = IVTV_CARD_PG600V2,
882 .name = "Yuan PG600-2, GotView PCI DVD Lite",
883 .v4l2_capabilities = IVTV_CAP_ENCODER,
884 .hw_video = IVTV_HW_CX25840,
885 .hw_audio = IVTV_HW_CX25840,
886 .hw_audio_ctrl = IVTV_HW_CX25840,
887 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
888 /* XC2028 support apparently works for the Yuan, it's still
889 uncertain whether it also works with the GotView. */
890 .video_inputs = {
891 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
892 { IVTV_CARD_INPUT_SVIDEO1, 1,
893 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
894 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
896 .audio_inputs = {
897 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
898 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
900 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
901 .xceive_pin = 12,
902 .tuners = {
903 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
905 .pci_list = ivtv_pci_pg600v2,
906 .i2c = &ivtv_i2c_std,
909 /* ------------------------------------------------------------------------- */
911 /* Club3D ZAP-TV1x01 cards */
913 static const struct ivtv_card_pci_info ivtv_pci_club3d[] = {
914 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_YUAN3, 0x0600 },
915 { 0, 0, 0 }
918 static const struct ivtv_card ivtv_card_club3d = {
919 .type = IVTV_CARD_CLUB3D,
920 .name = "Club3D ZAP-TV1x01",
921 .v4l2_capabilities = IVTV_CAP_ENCODER,
922 .hw_video = IVTV_HW_CX25840,
923 .hw_audio = IVTV_HW_CX25840,
924 .hw_audio_ctrl = IVTV_HW_CX25840,
925 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
926 .video_inputs = {
927 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
928 { IVTV_CARD_INPUT_SVIDEO1, 1,
929 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
930 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE3 },
932 .audio_inputs = {
933 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
934 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
936 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
937 .xceive_pin = 12,
938 .tuners = {
939 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
941 .pci_list = ivtv_pci_club3d,
942 .i2c = &ivtv_i2c_std,
945 /* ------------------------------------------------------------------------- */
947 /* AVerTV MCE 116 Plus (M116) card */
949 static const struct ivtv_card_pci_info ivtv_pci_avertv_mce116[] = {
950 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc439 },
951 { 0, 0, 0 }
954 static const struct ivtv_card ivtv_card_avertv_mce116 = {
955 .type = IVTV_CARD_AVERTV_MCE116,
956 .name = "AVerTV MCE 116 Plus",
957 .v4l2_capabilities = IVTV_CAP_ENCODER,
958 .hw_video = IVTV_HW_CX25840,
959 .hw_audio = IVTV_HW_CX25840,
960 .hw_audio_ctrl = IVTV_HW_CX25840,
961 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739 |
962 IVTV_HW_I2C_IR_RX_AVER,
963 .video_inputs = {
964 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
965 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
966 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
968 .audio_inputs = {
969 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
970 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
972 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
973 /* enable line-in */
974 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
975 .xceive_pin = 10,
976 .tuners = {
977 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
979 .pci_list = ivtv_pci_avertv_mce116,
980 .i2c = &ivtv_i2c_std,
983 /* ------------------------------------------------------------------------- */
985 /* AVerMedia PVR-150 Plus / AVerTV M113 cards with a Daewoo/Partsnic Tuner */
987 static const struct ivtv_card_pci_info ivtv_pci_aver_pvr150[] = {
988 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc034 }, /* NTSC */
989 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc035 }, /* NTSC FM */
990 { 0, 0, 0 }
993 static const struct ivtv_card ivtv_card_aver_pvr150 = {
994 .type = IVTV_CARD_AVER_PVR150PLUS,
995 .name = "AVerMedia PVR-150 Plus / AVerTV M113 Partsnic (Daewoo) Tuner",
996 .v4l2_capabilities = IVTV_CAP_ENCODER,
997 .hw_video = IVTV_HW_CX25840,
998 .hw_audio = IVTV_HW_CX25840,
999 .hw_audio_ctrl = IVTV_HW_CX25840,
1000 .hw_muxer = IVTV_HW_GPIO,
1001 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1002 IVTV_HW_WM8739 | IVTV_HW_GPIO,
1003 .video_inputs = {
1004 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1005 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1006 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1008 .audio_inputs = {
1009 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1010 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1012 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1013 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1014 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1015 .gpio_audio_input = { .mask = 0xc000,
1016 .tuner = 0x0000,
1017 .linein = 0x4000,
1018 .radio = 0x8000 },
1019 .tuners = {
1020 /* Subsystem ID's 0xc03[45] have a Partsnic PTI-5NF05 tuner */
1021 { .std = V4L2_STD_MN, .tuner = TUNER_PARTSNIC_PTI_5NF05 },
1023 .pci_list = ivtv_pci_aver_pvr150,
1024 /* Subsystem ID 0xc035 has a TEA5767(?) FM tuner, 0xc034 does not */
1025 .i2c = &ivtv_i2c_radio,
1028 /* ------------------------------------------------------------------------- */
1030 /* AVerMedia UltraTV 1500 MCE (newer non-cx88 version, M113 variant) card */
1032 static const struct ivtv_card_pci_info ivtv_pci_aver_ultra1500mce[] = {
1033 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc019 }, /* NTSC */
1034 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc01b }, /* PAL/SECAM */
1035 { 0, 0, 0 }
1038 static const struct ivtv_card ivtv_card_aver_ultra1500mce = {
1039 .type = IVTV_CARD_AVER_ULTRA1500MCE,
1040 .name = "AVerMedia UltraTV 1500 MCE / AVerTV M113 Philips Tuner",
1041 .comment = "For non-NTSC tuners, use the pal= or secam= module options",
1042 .v4l2_capabilities = IVTV_CAP_ENCODER,
1043 .hw_video = IVTV_HW_CX25840,
1044 .hw_audio = IVTV_HW_CX25840,
1045 .hw_audio_ctrl = IVTV_HW_CX25840,
1046 .hw_muxer = IVTV_HW_GPIO,
1047 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER |
1048 IVTV_HW_WM8739 | IVTV_HW_GPIO,
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, 1, CX25840_COMPOSITE1 },
1054 .audio_inputs = {
1055 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, 0 },
1056 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1058 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1059 /* The 74HC4052 Dual 4:1 multiplexer is controlled by 2 GPIO lines */
1060 .gpio_init = { .direction = 0xc000, .initial_value = 0 },
1061 .gpio_audio_input = { .mask = 0xc000,
1062 .tuner = 0x0000,
1063 .linein = 0x4000,
1064 .radio = 0x8000 },
1065 .tuners = {
1066 /* The UltraTV 1500 MCE has a Philips FM1236 MK5 TV/FM tuner */
1067 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1068 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216MK5 },
1070 .pci_list = ivtv_pci_aver_ultra1500mce,
1071 .i2c = &ivtv_i2c_std,
1074 /* ------------------------------------------------------------------------- */
1076 /* AVerMedia EZMaker PCI Deluxe card */
1078 static const struct ivtv_card_pci_info ivtv_pci_aver_ezmaker[] = {
1079 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc03f },
1080 { 0, 0, 0 }
1083 static const struct ivtv_card ivtv_card_aver_ezmaker = {
1084 .type = IVTV_CARD_AVER_EZMAKER,
1085 .name = "AVerMedia EZMaker PCI Deluxe",
1086 .v4l2_capabilities = IVTV_CAP_ENCODER,
1087 .hw_video = IVTV_HW_CX25840,
1088 .hw_audio = IVTV_HW_CX25840,
1089 .hw_audio_ctrl = IVTV_HW_CX25840,
1090 .hw_all = IVTV_HW_CX25840 | IVTV_HW_WM8739,
1091 .video_inputs = {
1092 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1093 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1095 .audio_inputs = {
1096 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 0 },
1098 .gpio_init = { .direction = 0x4000, .initial_value = 0x4000 },
1099 /* Does not have a tuner */
1100 .pci_list = ivtv_pci_aver_ezmaker,
1103 /* ------------------------------------------------------------------------- */
1105 /* ASUS Falcon2 */
1107 static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
1108 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
1109 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
1110 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
1111 { 0, 0, 0 }
1114 static const struct ivtv_card ivtv_card_asus_falcon2 = {
1115 .type = IVTV_CARD_ASUS_FALCON2,
1116 .name = "ASUS Falcon2",
1117 .v4l2_capabilities = IVTV_CAP_ENCODER,
1118 .hw_video = IVTV_HW_CX25840,
1119 .hw_audio = IVTV_HW_CX25840,
1120 .hw_audio_ctrl = IVTV_HW_CX25840,
1121 .hw_muxer = IVTV_HW_M52790,
1122 .hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
1123 .video_inputs = {
1124 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1125 { IVTV_CARD_INPUT_SVIDEO1, 1, CX25840_SVIDEO3 },
1126 { IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
1128 .audio_inputs = {
1129 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
1130 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
1131 M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
1132 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
1134 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
1135 .tuners = {
1136 { .std = V4L2_STD_MN, .tuner = TUNER_PHILIPS_FM1236_MK3 },
1138 .pci_list = ivtv_pci_asus_falcon2,
1139 .i2c = &ivtv_i2c_std,
1142 /* ------------------------------------------------------------------------- */
1144 /* AVerMedia M104 miniPCI card */
1146 static const struct ivtv_card_pci_info ivtv_pci_aver_m104[] = {
1147 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_AVERMEDIA, 0xc136 },
1148 { 0, 0, 0 }
1151 static const struct ivtv_card ivtv_card_aver_m104 = {
1152 .type = IVTV_CARD_AVER_M104,
1153 .name = "AVerMedia M104",
1154 .comment = "Not yet supported!\n",
1155 .v4l2_capabilities = 0, /*IVTV_CAP_ENCODER,*/
1156 .hw_video = IVTV_HW_CX25840,
1157 .hw_audio = IVTV_HW_CX25840,
1158 .hw_audio_ctrl = IVTV_HW_CX25840,
1159 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER | IVTV_HW_WM8739,
1160 .video_inputs = {
1161 { IVTV_CARD_INPUT_SVIDEO1, 0, CX25840_SVIDEO3 },
1162 { IVTV_CARD_INPUT_COMPOSITE1, 0, CX25840_COMPOSITE1 },
1164 .audio_inputs = {
1165 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, 1 },
1167 .radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, 2 },
1168 /* enable line-in + reset tuner */
1169 .gpio_init = { .direction = 0xe000, .initial_value = 0x4000 },
1170 .xceive_pin = 10,
1171 .tuners = {
1172 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1174 .pci_list = ivtv_pci_aver_m104,
1175 .i2c = &ivtv_i2c_std,
1178 /* ------------------------------------------------------------------------- */
1180 /* Buffalo PC-MV5L/PCI cards */
1182 static const struct ivtv_card_pci_info ivtv_pci_buffalo[] = {
1183 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_MELCO, 0x052b },
1184 { 0, 0, 0 }
1187 static const struct ivtv_card ivtv_card_buffalo = {
1188 .type = IVTV_CARD_BUFFALO_MV5L,
1189 .name = "Buffalo PC-MV5L/PCI",
1190 .v4l2_capabilities = IVTV_CAP_ENCODER,
1191 .hw_video = IVTV_HW_CX25840,
1192 .hw_audio = IVTV_HW_CX25840,
1193 .hw_audio_ctrl = IVTV_HW_CX25840,
1194 .hw_all = IVTV_HW_CX25840 | IVTV_HW_TUNER,
1195 .video_inputs = {
1196 { IVTV_CARD_INPUT_VID_TUNER, 0, CX25840_COMPOSITE2 },
1197 { IVTV_CARD_INPUT_SVIDEO1, 1,
1198 CX25840_SVIDEO_LUMA3 | CX25840_SVIDEO_CHROMA4 },
1199 { IVTV_CARD_INPUT_COMPOSITE1, 1, CX25840_COMPOSITE1 },
1201 .audio_inputs = {
1202 { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5 },
1203 { IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL },
1205 .xceive_pin = 12,
1206 .tuners = {
1207 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
1209 .pci_list = ivtv_pci_buffalo,
1210 .i2c = &ivtv_i2c_std,
1213 /* ------------------------------------------------------------------------- */
1214 /* Sony Kikyou */
1216 static const struct ivtv_card_pci_info ivtv_pci_kikyou[] = {
1217 { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_SONY, 0x813d },
1218 { 0, 0, 0 }
1221 static const struct ivtv_card ivtv_card_kikyou = {
1222 .type = IVTV_CARD_KIKYOU,
1223 .name = "Sony VAIO Giga Pocket (ENX Kikyou)",
1224 .v4l2_capabilities = IVTV_CAP_ENCODER,
1225 .hw_video = IVTV_HW_SAA7115,
1226 .hw_audio = IVTV_HW_GPIO,
1227 .hw_audio_ctrl = IVTV_HW_GPIO,
1228 .hw_all = IVTV_HW_GPIO | IVTV_HW_SAA7115 | IVTV_HW_TUNER,
1229 .video_inputs = {
1230 { IVTV_CARD_INPUT_VID_TUNER, 0, IVTV_SAA71XX_COMPOSITE1 },
1231 { IVTV_CARD_INPUT_COMPOSITE1, 1, IVTV_SAA71XX_COMPOSITE1 },
1232 { IVTV_CARD_INPUT_SVIDEO1, 1, IVTV_SAA71XX_SVIDEO1 },
1234 .audio_inputs = {
1235 { IVTV_CARD_INPUT_AUD_TUNER, IVTV_GPIO_TUNER },
1236 { IVTV_CARD_INPUT_LINE_IN1, IVTV_GPIO_LINE_IN },
1237 { IVTV_CARD_INPUT_LINE_IN2, IVTV_GPIO_LINE_IN },
1239 .gpio_init = { .direction = 0x03e1, .initial_value = 0x0320 },
1240 .gpio_audio_input = { .mask = 0x0060,
1241 .tuner = 0x0020,
1242 .linein = 0x0000,
1243 .radio = 0x0060 },
1244 .gpio_audio_mute = { .mask = 0x0000,
1245 .mute = 0x0000 }, /* 0x200? Disable for now. */
1246 .gpio_audio_mode = { .mask = 0x0080,
1247 .mono = 0x0000,
1248 .stereo = 0x0000, /* SAP */
1249 .lang1 = 0x0080,
1250 .lang2 = 0x0000,
1251 .both = 0x0080 },
1252 .tuners = {
1253 { .std = V4L2_STD_ALL, .tuner = TUNER_SONY_BTF_PXN01Z },
1255 .pci_list = ivtv_pci_kikyou,
1256 .i2c = &ivtv_i2c_std,
1260 static const struct ivtv_card *ivtv_card_list[] = {
1261 &ivtv_card_pvr250,
1262 &ivtv_card_pvr350,
1263 &ivtv_card_pvr150,
1264 &ivtv_card_m179,
1265 &ivtv_card_mpg600,
1266 &ivtv_card_mpg160,
1267 &ivtv_card_pg600,
1268 &ivtv_card_avc2410,
1269 &ivtv_card_avc2010,
1270 &ivtv_card_tg5000tv,
1271 &ivtv_card_va2000,
1272 &ivtv_card_cx23416gyc,
1273 &ivtv_card_gv_mvprx,
1274 &ivtv_card_gv_mvprx2e,
1275 &ivtv_card_gotview_pci_dvd,
1276 &ivtv_card_gotview_pci_dvd2,
1277 &ivtv_card_yuan_mpc622,
1278 &ivtv_card_dctmvtvp1,
1279 &ivtv_card_pg600v2,
1280 &ivtv_card_club3d,
1281 &ivtv_card_avertv_mce116,
1282 &ivtv_card_asus_falcon2,
1283 &ivtv_card_aver_pvr150,
1284 &ivtv_card_aver_ezmaker,
1285 &ivtv_card_aver_m104,
1286 &ivtv_card_buffalo,
1287 &ivtv_card_aver_ultra1500mce,
1288 &ivtv_card_kikyou,
1290 /* Variations of standard cards but with the same PCI IDs.
1291 These cards must come last in this list. */
1292 &ivtv_card_pvr350_v1,
1293 &ivtv_card_cx23416gyc_nogr,
1294 &ivtv_card_cx23416gyc_nogrycs,
1297 const struct ivtv_card *ivtv_get_card(u16 index)
1299 if (index >= ARRAY_SIZE(ivtv_card_list))
1300 return NULL;
1301 return ivtv_card_list[index];
1304 int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input)
1306 const struct ivtv_card_video_input *card_input = itv->card->video_inputs + index;
1307 static const char * const input_strs[] = {
1308 "Tuner 1",
1309 "S-Video 1",
1310 "S-Video 2",
1311 "Composite 1",
1312 "Composite 2",
1313 "Composite 3"
1316 memset(input, 0, sizeof(*input));
1317 if (index >= itv->nof_inputs)
1318 return -EINVAL;
1319 input->index = index;
1320 strlcpy(input->name, input_strs[card_input->video_type - 1],
1321 sizeof(input->name));
1322 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
1323 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
1324 input->audioset = (1 << itv->nof_audio_inputs) - 1;
1325 input->std = (input->type == V4L2_INPUT_TYPE_TUNER) ?
1326 itv->tuner_std : V4L2_STD_ALL;
1327 return 0;
1330 int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output)
1332 const struct ivtv_card_output *card_output = itv->card->video_outputs + index;
1334 memset(output, 0, sizeof(*output));
1335 if (index >= itv->card->nof_outputs)
1336 return -EINVAL;
1337 output->index = index;
1338 strlcpy(output->name, card_output->name, sizeof(output->name));
1339 output->type = V4L2_OUTPUT_TYPE_ANALOG;
1340 output->audioset = 1;
1341 output->std = V4L2_STD_ALL;
1342 return 0;
1345 int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio)
1347 const struct ivtv_card_audio_input *aud_input = itv->card->audio_inputs + index;
1348 static const char * const input_strs[] = {
1349 "Tuner 1",
1350 "Line In 1",
1351 "Line In 2"
1354 memset(audio, 0, sizeof(*audio));
1355 if (index >= itv->nof_audio_inputs)
1356 return -EINVAL;
1357 strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1358 sizeof(audio->name));
1359 audio->index = index;
1360 audio->capability = V4L2_AUDCAP_STEREO;
1361 return 0;
1364 int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud_output)
1366 memset(aud_output, 0, sizeof(*aud_output));
1367 if (itv->card->video_outputs == NULL || index != 0)
1368 return -EINVAL;
1369 strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
1370 return 0;