2 * cx18 functions to query card hardware
4 * Derived from ivtv-cards.c
6 * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 #include "cx18-driver.h"
26 #include "cx18-cards.h"
27 #include "cx18-av-core.h"
29 #include <media/cs5345.h>
31 #define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
33 /********************** card configuration *******************************/
35 /* usual i2c tuner addresses to probe */
36 static struct cx18_card_tuner_i2c cx18_i2c_std
= {
37 .radio
= { I2C_CLIENT_END
},
38 .demod
= { 0x43, I2C_CLIENT_END
},
39 .tv
= { 0x61, 0x60, I2C_CLIENT_END
},
42 /* Please add new PCI IDs to: http://pci-ids.ucw.cz/
43 This keeps the PCI ID database up to date. Note that the entries
44 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
45 New vendor IDs should still be added to the vendor ID list. */
47 /* Hauppauge HVR-1600 cards */
49 /* Note: for Hauppauge cards the tveeprom information is used instead
51 static const struct cx18_card cx18_card_hvr1600_esmt
= {
52 .type
= CX18_CARD_HVR_1600_ESMT
,
53 .name
= "Hauppauge HVR-1600",
54 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
55 .v4l2_capabilities
= CX18_CAP_ENCODER
,
56 .hw_audio_ctrl
= CX18_HW_418_AV
,
57 .hw_muxer
= CX18_HW_CS5345
,
58 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
59 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
60 CX18_HW_Z8F0811_IR_HAUP
,
62 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
63 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
64 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
65 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
66 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
69 { CX18_CARD_INPUT_AUD_TUNER
,
70 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
71 { CX18_CARD_INPUT_LINE_IN1
,
72 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
73 { CX18_CARD_INPUT_LINE_IN2
,
74 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
76 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
77 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
79 /* ESMT M13S128324A-5B memory */
82 .timing1
= 0x44220e82,
87 .gpio_init
.initial_value
= 0x3001,
88 .gpio_init
.direction
= 0x3001,
89 .gpio_i2c_slave_reset
= {
90 .active_lo_mask
= 0x3001,
93 .ir_reset_mask
= 0x0001,
98 static const struct cx18_card cx18_card_hvr1600_s5h1411
= {
99 .type
= CX18_CARD_HVR_1600_S5H1411
,
100 .name
= "Hauppauge HVR-1600",
101 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
102 .v4l2_capabilities
= CX18_CAP_ENCODER
,
103 .hw_audio_ctrl
= CX18_HW_418_AV
,
104 .hw_muxer
= CX18_HW_CS5345
,
105 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
106 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
107 CX18_HW_Z8F0811_IR_HAUP
,
109 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
110 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
111 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
112 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
113 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
116 { CX18_CARD_INPUT_AUD_TUNER
,
117 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
118 { CX18_CARD_INPUT_LINE_IN1
,
119 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
120 { CX18_CARD_INPUT_LINE_IN2
,
121 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
123 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
124 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
126 /* ESMT M13S128324A-5B memory */
127 .chip_config
= 0x003,
129 .timing1
= 0x44220e82,
134 .gpio_init
.initial_value
= 0x3001,
135 .gpio_init
.direction
= 0x3001,
136 .gpio_i2c_slave_reset
= {
137 .active_lo_mask
= 0x3001,
138 .msecs_asserted
= 10,
139 .msecs_recovery
= 40,
140 .ir_reset_mask
= 0x0001,
142 .i2c
= &cx18_i2c_std
,
145 static const struct cx18_card cx18_card_hvr1600_samsung
= {
146 .type
= CX18_CARD_HVR_1600_SAMSUNG
,
147 .name
= "Hauppauge HVR-1600 (Preproduction)",
148 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
149 .v4l2_capabilities
= CX18_CAP_ENCODER
,
150 .hw_audio_ctrl
= CX18_HW_418_AV
,
151 .hw_muxer
= CX18_HW_CS5345
,
152 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
153 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
154 CX18_HW_Z8F0811_IR_HAUP
,
156 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
157 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
158 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
159 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
160 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
163 { CX18_CARD_INPUT_AUD_TUNER
,
164 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
165 { CX18_CARD_INPUT_LINE_IN1
,
166 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
167 { CX18_CARD_INPUT_LINE_IN2
,
168 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
170 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
171 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
173 /* Samsung K4D263238G-VC33 memory */
174 .chip_config
= 0x003,
176 .timing1
= 0x23230b73,
181 .gpio_init
.initial_value
= 0x3001,
182 .gpio_init
.direction
= 0x3001,
183 .gpio_i2c_slave_reset
= {
184 .active_lo_mask
= 0x3001,
185 .msecs_asserted
= 10,
186 .msecs_recovery
= 40,
187 .ir_reset_mask
= 0x0001,
189 .i2c
= &cx18_i2c_std
,
192 /* ------------------------------------------------------------------------- */
194 /* Compro VideoMate H900: note that this card is analog only! */
196 static const struct cx18_card_pci_info cx18_pci_h900
[] = {
197 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_COMPRO
, 0xe100 },
201 static const struct cx18_card cx18_card_h900
= {
202 .type
= CX18_CARD_COMPRO_H900
,
203 .name
= "Compro VideoMate H900",
204 .comment
= "Analog TV capture supported\n",
205 .v4l2_capabilities
= CX18_CAP_ENCODER
,
206 .hw_audio_ctrl
= CX18_HW_418_AV
,
207 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_RESET_CTRL
,
209 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
210 { CX18_CARD_INPUT_SVIDEO1
, 1,
211 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
212 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
215 { CX18_CARD_INPUT_AUD_TUNER
,
217 { CX18_CARD_INPUT_LINE_IN1
,
218 CX18_AV_AUDIO_SERIAL1
, 0 },
220 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
221 CX18_AV_AUDIO_SERIAL1
, 0 },
223 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
226 /* EtronTech EM6A9160TS-5G memory */
227 .chip_config
= 0x50003,
229 .timing1
= 0x24330e84,
235 .pci_list
= cx18_pci_h900
,
236 .i2c
= &cx18_i2c_std
,
239 /* ------------------------------------------------------------------------- */
241 /* Yuan MPC718: not working at the moment! */
243 static const struct cx18_card_pci_info cx18_pci_mpc718
[] = {
244 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_YUAN
, 0x0718 },
248 static const struct cx18_card cx18_card_mpc718
= {
249 .type
= CX18_CARD_YUAN_MPC718
,
250 .name
= "Yuan MPC718 MiniPCI DVB-T/Analog",
251 .comment
= "Experimenters needed for device to work well.\n"
252 "\tTo help, mail the ivtv-devel list (www.ivtvdriver.org).\n",
253 .v4l2_capabilities
= CX18_CAP_ENCODER
,
254 .hw_audio_ctrl
= CX18_HW_418_AV
,
255 .hw_muxer
= CX18_HW_GPIO_MUX
,
256 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
257 CX18_HW_GPIO_MUX
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
259 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
260 { CX18_CARD_INPUT_SVIDEO1
, 1,
261 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
262 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
263 { CX18_CARD_INPUT_SVIDEO2
, 2,
264 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
265 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
268 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
269 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
270 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
274 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
276 /* FIXME - the FM radio is just a guess and driver doesn't use SIF */
277 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
279 /* Hynix HY5DU283222B DDR RAM */
280 .chip_config
= 0x303,
282 .timing1
= 0x36320966,
287 .gpio_init
.initial_value
= 0x1,
288 .gpio_init
.direction
= 0x3,
289 /* FIXME - these GPIO's are just guesses */
290 .gpio_audio_input
= { .mask
= 0x3,
295 .pci_list
= cx18_pci_mpc718
,
296 .i2c
= &cx18_i2c_std
,
299 /* ------------------------------------------------------------------------- */
303 static const struct cx18_card_pci_info cx18_pci_gotview_dvd3
[] = {
304 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_GOTVIEW
, 0x3343 },
308 static const struct cx18_card cx18_card_gotview_dvd3
= {
309 .type
= CX18_CARD_GOTVIEW_PCI_DVD3
,
310 .name
= "GoTView PCI DVD3 Hybrid",
311 .comment
= "Experimenters needed for device to work well.\n"
312 "\tTo help, mail the ivtv-devel list (www.ivtvdriver.org).\n",
313 .v4l2_capabilities
= CX18_CAP_ENCODER
,
314 .hw_audio_ctrl
= CX18_HW_418_AV
,
315 .hw_muxer
= CX18_HW_GPIO_MUX
,
316 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
317 CX18_HW_GPIO_MUX
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
319 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
320 { CX18_CARD_INPUT_SVIDEO1
, 1,
321 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
322 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
323 { CX18_CARD_INPUT_SVIDEO2
, 2,
324 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
325 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
328 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
329 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
330 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
334 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
336 /* FIXME - the FM radio is just a guess and driver doesn't use SIF */
337 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
339 /* Hynix HY5DU283222B DDR RAM */
340 .chip_config
= 0x303,
342 .timing1
= 0x36320966,
347 .gpio_init
.initial_value
= 0x1,
348 .gpio_init
.direction
= 0x3,
350 .gpio_audio_input
= { .mask
= 0x3,
355 .pci_list
= cx18_pci_gotview_dvd3
,
356 .i2c
= &cx18_i2c_std
,
359 /* ------------------------------------------------------------------------- */
361 /* Conexant Raptor PAL/SECAM: note that this card is analog only! */
363 static const struct cx18_card_pci_info cx18_pci_cnxt_raptor_pal
[] = {
364 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_CONEXANT
, 0x0009 },
368 static const struct cx18_card cx18_card_cnxt_raptor_pal
= {
369 .type
= CX18_CARD_CNXT_RAPTOR_PAL
,
370 .name
= "Conexant Raptor PAL/SECAM",
371 .comment
= "Analog TV capture supported\n",
372 .v4l2_capabilities
= CX18_CAP_ENCODER
,
373 .hw_audio_ctrl
= CX18_HW_418_AV
,
374 .hw_muxer
= CX18_HW_GPIO_MUX
,
375 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
,
377 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
378 { CX18_CARD_INPUT_SVIDEO1
, 1,
379 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
380 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
381 { CX18_CARD_INPUT_SVIDEO2
, 2,
382 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
383 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
386 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
387 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
388 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
391 { .std
= V4L2_STD_PAL_SECAM
, .tuner
= TUNER_PHILIPS_FM1216ME_MK3
},
393 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO_SERIAL1
, 2 },
395 /* MT 46V16M16 memory */
396 .chip_config
= 0x50306,
398 .timing1
= 0x33220953,
403 .gpio_init
.initial_value
= 0x1002,
404 .gpio_init
.direction
= 0xf002,
405 .gpio_audio_input
= { .mask
= 0xf002,
406 .tuner
= 0x1002, /* LED D1 Tuner AF */
407 .linein
= 0x2000, /* LED D2 Line In 1 */
408 .radio
= 0x4002 }, /* LED D3 Tuner AF */
409 .pci_list
= cx18_pci_cnxt_raptor_pal
,
410 .i2c
= &cx18_i2c_std
,
413 /* ------------------------------------------------------------------------- */
415 /* Toshiba Qosmio laptop internal DVB-T/Analog Hybrid Tuner */
417 static const struct cx18_card_pci_info cx18_pci_toshiba_qosmio_dvbt
[] = {
418 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_TOSHIBA
, 0x0110 },
422 static const struct cx18_card cx18_card_toshiba_qosmio_dvbt
= {
423 .type
= CX18_CARD_TOSHIBA_QOSMIO_DVBT
,
424 .name
= "Toshiba Qosmio DVB-T/Analog",
425 .comment
= "Experimenters and photos needed for device to work well.\n"
426 "\tTo help, mail the ivtv-devel list (www.ivtvdriver.org).\n",
427 .v4l2_capabilities
= CX18_CAP_ENCODER
,
428 .hw_audio_ctrl
= CX18_HW_418_AV
,
429 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_RESET_CTRL
,
431 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE6
},
432 { CX18_CARD_INPUT_SVIDEO1
, 1,
433 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
434 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
437 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
438 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
441 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
444 .chip_config
= 0x202,
446 .timing1
= 0x33320a63,
449 .initial_emrs
= 0x42,
452 .pci_list
= cx18_pci_toshiba_qosmio_dvbt
,
453 .i2c
= &cx18_i2c_std
,
456 /* ------------------------------------------------------------------------- */
458 /* Leadtek WinFast PVR2100 */
460 static const struct cx18_card_pci_info cx18_pci_leadtek_pvr2100
[] = {
461 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_LEADTEK
, 0x6f27 }, /* PVR2100 */
465 static const struct cx18_card cx18_card_leadtek_pvr2100
= {
466 .type
= CX18_CARD_LEADTEK_PVR2100
,
467 .name
= "Leadtek WinFast PVR2100",
468 .comment
= "Experimenters and photos needed for device to work well.\n"
469 "\tTo help, mail the ivtv-devel list (www.ivtvdriver.org).\n",
470 .v4l2_capabilities
= CX18_CAP_ENCODER
,
471 .hw_audio_ctrl
= CX18_HW_418_AV
,
472 .hw_muxer
= CX18_HW_GPIO_MUX
,
473 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
|
474 CX18_HW_GPIO_RESET_CTRL
,
476 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
477 { CX18_CARD_INPUT_SVIDEO1
, 1,
478 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
479 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE7
},
480 { CX18_CARD_INPUT_COMPONENT1
, 1, CX18_AV_COMPONENT1
},
483 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
484 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
488 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
490 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
492 /* Pointer to proper DDR config values provided by Terry Wu */
493 .chip_config
= 0x303,
495 .timing1
= 0x24220e83,
500 .gpio_init
.initial_value
= 0x6,
501 .gpio_init
.direction
= 0x7,
502 .gpio_audio_input
= { .mask
= 0x7,
503 .tuner
= 0x6, .linein
= 0x2, .radio
= 0x2 },
505 .pci_list
= cx18_pci_leadtek_pvr2100
,
506 .i2c
= &cx18_i2c_std
,
509 /* ------------------------------------------------------------------------- */
511 /* Leadtek WinFast DVR3100 H */
513 static const struct cx18_card_pci_info cx18_pci_leadtek_dvr3100h
[] = {
514 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_LEADTEK
, 0x6690 }, /* DVR3100 H */
518 static const struct cx18_card cx18_card_leadtek_dvr3100h
= {
519 .type
= CX18_CARD_LEADTEK_DVR3100H
,
520 .name
= "Leadtek WinFast DVR3100 H",
521 .comment
= "Simultaneous DVB-T and Analog capture supported,\n"
522 "\texcept when capturing Analog from the antenna input.\n",
523 .v4l2_capabilities
= CX18_CAP_ENCODER
,
524 .hw_audio_ctrl
= CX18_HW_418_AV
,
525 .hw_muxer
= CX18_HW_GPIO_MUX
,
526 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
|
527 CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
529 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
530 { CX18_CARD_INPUT_SVIDEO1
, 1,
531 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
532 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE7
},
533 { CX18_CARD_INPUT_COMPONENT1
, 1, CX18_AV_COMPONENT1
},
536 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
537 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
541 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
543 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
545 /* Pointer to proper DDR config values provided by Terry Wu */
546 .chip_config
= 0x303,
548 .timing1
= 0x24220e83,
553 .gpio_init
.initial_value
= 0x6,
554 .gpio_init
.direction
= 0x7,
555 .gpio_audio_input
= { .mask
= 0x7,
556 .tuner
= 0x6, .linein
= 0x2, .radio
= 0x2 },
558 .pci_list
= cx18_pci_leadtek_dvr3100h
,
559 .i2c
= &cx18_i2c_std
,
562 /* ------------------------------------------------------------------------- */
564 static const struct cx18_card
*cx18_card_list
[] = {
565 &cx18_card_hvr1600_esmt
,
566 &cx18_card_hvr1600_samsung
,
569 &cx18_card_cnxt_raptor_pal
,
570 &cx18_card_toshiba_qosmio_dvbt
,
571 &cx18_card_leadtek_pvr2100
,
572 &cx18_card_leadtek_dvr3100h
,
573 &cx18_card_gotview_dvd3
,
574 &cx18_card_hvr1600_s5h1411
577 const struct cx18_card
*cx18_get_card(u16 index
)
579 if (index
>= ARRAY_SIZE(cx18_card_list
))
581 return cx18_card_list
[index
];
584 int cx18_get_input(struct cx18
*cx
, u16 index
, struct v4l2_input
*input
)
586 const struct cx18_card_video_input
*card_input
=
587 cx
->card
->video_inputs
+ index
;
588 static const char * const input_strs
[] = {
597 if (index
>= cx
->nof_inputs
)
599 input
->index
= index
;
600 strlcpy(input
->name
, input_strs
[card_input
->video_type
- 1],
601 sizeof(input
->name
));
602 input
->type
= (card_input
->video_type
== CX18_CARD_INPUT_VID_TUNER
?
603 V4L2_INPUT_TYPE_TUNER
: V4L2_INPUT_TYPE_CAMERA
);
604 input
->audioset
= (1 << cx
->nof_audio_inputs
) - 1;
605 input
->std
= (input
->type
== V4L2_INPUT_TYPE_TUNER
) ?
606 cx
->tuner_std
: V4L2_STD_ALL
;
610 int cx18_get_audio_input(struct cx18
*cx
, u16 index
, struct v4l2_audio
*audio
)
612 const struct cx18_card_audio_input
*aud_input
=
613 cx
->card
->audio_inputs
+ index
;
614 static const char * const input_strs
[] = {
620 memset(audio
, 0, sizeof(*audio
));
621 if (index
>= cx
->nof_audio_inputs
)
623 strlcpy(audio
->name
, input_strs
[aud_input
->audio_type
- 1],
624 sizeof(audio
->name
));
625 audio
->index
= index
;
626 audio
->capability
= V4L2_AUDCAP_STEREO
;