1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * cx18 functions to query card hardware
5 * Derived from ivtv-cards.c
7 * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
8 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
11 #include "cx18-driver.h"
12 #include "cx18-cards.h"
13 #include "cx18-av-core.h"
15 #include <media/i2c/cs5345.h>
17 #define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
19 /********************** card configuration *******************************/
21 /* usual i2c tuner addresses to probe */
22 static struct cx18_card_tuner_i2c cx18_i2c_std
= {
23 .radio
= { I2C_CLIENT_END
},
24 .demod
= { 0x43, I2C_CLIENT_END
},
25 .tv
= { 0x61, 0x60, I2C_CLIENT_END
},
29 * usual i2c tuner addresses to probe with additional demod address for
30 * an NXP TDA8295 at 0x42 (N.B. it can possibly be at 0x4b or 0x4c too).
32 static struct cx18_card_tuner_i2c cx18_i2c_nxp
= {
33 .radio
= { I2C_CLIENT_END
},
34 .demod
= { 0x42, 0x43, I2C_CLIENT_END
},
35 .tv
= { 0x61, 0x60, I2C_CLIENT_END
},
38 /* Please add new PCI IDs to: https://pci-ids.ucw.cz/
39 This keeps the PCI ID database up to date. Note that the entries
40 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
41 New vendor IDs should still be added to the vendor ID list. */
43 /* Hauppauge HVR-1600 cards */
45 /* Note: for Hauppauge cards the tveeprom information is used instead
47 static const struct cx18_card cx18_card_hvr1600_esmt
= {
48 .type
= CX18_CARD_HVR_1600_ESMT
,
49 .name
= "Hauppauge HVR-1600",
50 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
51 .v4l2_capabilities
= CX18_CAP_ENCODER
,
52 .hw_audio_ctrl
= CX18_HW_418_AV
,
53 .hw_muxer
= CX18_HW_CS5345
,
54 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
55 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
56 CX18_HW_Z8F0811_IR_HAUP
,
58 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
59 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
60 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
61 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
62 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
65 { CX18_CARD_INPUT_AUD_TUNER
,
66 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
67 { CX18_CARD_INPUT_LINE_IN1
,
68 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
69 { CX18_CARD_INPUT_LINE_IN2
,
70 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
72 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
73 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
75 /* ESMT M13S128324A-5B memory */
78 .timing1
= 0x44220e82,
83 .gpio_init
.initial_value
= 0x3001,
84 .gpio_init
.direction
= 0x3001,
85 .gpio_i2c_slave_reset
= {
86 .active_lo_mask
= 0x3001,
89 .ir_reset_mask
= 0x0001,
94 static const struct cx18_card cx18_card_hvr1600_s5h1411
= {
95 .type
= CX18_CARD_HVR_1600_S5H1411
,
96 .name
= "Hauppauge HVR-1600",
97 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
98 .v4l2_capabilities
= CX18_CAP_ENCODER
,
99 .hw_audio_ctrl
= CX18_HW_418_AV
,
100 .hw_muxer
= CX18_HW_CS5345
,
101 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
102 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
103 CX18_HW_Z8F0811_IR_HAUP
,
105 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
106 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
107 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
108 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
109 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
112 { CX18_CARD_INPUT_AUD_TUNER
,
113 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
114 { CX18_CARD_INPUT_LINE_IN1
,
115 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
116 { CX18_CARD_INPUT_LINE_IN2
,
117 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
119 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
120 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
122 /* ESMT M13S128324A-5B memory */
123 .chip_config
= 0x003,
125 .timing1
= 0x44220e82,
130 .gpio_init
.initial_value
= 0x3801,
131 .gpio_init
.direction
= 0x3801,
132 .gpio_i2c_slave_reset
= {
133 .active_lo_mask
= 0x3801,
134 .msecs_asserted
= 10,
135 .msecs_recovery
= 40,
136 .ir_reset_mask
= 0x0001,
138 .i2c
= &cx18_i2c_nxp
,
141 static const struct cx18_card cx18_card_hvr1600_samsung
= {
142 .type
= CX18_CARD_HVR_1600_SAMSUNG
,
143 .name
= "Hauppauge HVR-1600 (Preproduction)",
144 .comment
= "Simultaneous Digital and Analog TV capture supported\n",
145 .v4l2_capabilities
= CX18_CAP_ENCODER
,
146 .hw_audio_ctrl
= CX18_HW_418_AV
,
147 .hw_muxer
= CX18_HW_CS5345
,
148 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
149 CX18_HW_CS5345
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
|
150 CX18_HW_Z8F0811_IR_HAUP
,
152 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE7
},
153 { CX18_CARD_INPUT_SVIDEO1
, 1, CX18_AV_SVIDEO1
},
154 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE3
},
155 { CX18_CARD_INPUT_SVIDEO2
, 2, CX18_AV_SVIDEO2
},
156 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE4
},
159 { CX18_CARD_INPUT_AUD_TUNER
,
160 CX18_AV_AUDIO8
, CS5345_IN_1
| CS5345_MCLK_1_5
},
161 { CX18_CARD_INPUT_LINE_IN1
,
162 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_2
},
163 { CX18_CARD_INPUT_LINE_IN2
,
164 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_3
},
166 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
167 CX18_AV_AUDIO_SERIAL1
, CS5345_IN_4
},
169 /* Samsung K4D263238G-VC33 memory */
170 .chip_config
= 0x003,
172 .timing1
= 0x23230b73,
177 .gpio_init
.initial_value
= 0x3001,
178 .gpio_init
.direction
= 0x3001,
179 .gpio_i2c_slave_reset
= {
180 .active_lo_mask
= 0x3001,
181 .msecs_asserted
= 10,
182 .msecs_recovery
= 40,
183 .ir_reset_mask
= 0x0001,
185 .i2c
= &cx18_i2c_std
,
188 /* ------------------------------------------------------------------------- */
190 /* Compro VideoMate H900: note that this card is analog only! */
192 static const struct cx18_card_pci_info cx18_pci_h900
[] = {
193 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_COMPRO
, 0xe100 },
197 static const struct cx18_card cx18_card_h900
= {
198 .type
= CX18_CARD_COMPRO_H900
,
199 .name
= "Compro VideoMate H900",
200 .comment
= "Analog TV capture supported\n",
201 .v4l2_capabilities
= CX18_CAP_ENCODER
,
202 .hw_audio_ctrl
= CX18_HW_418_AV
,
203 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_RESET_CTRL
,
205 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
206 { CX18_CARD_INPUT_SVIDEO1
, 1,
207 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
208 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
211 { CX18_CARD_INPUT_AUD_TUNER
,
213 { CX18_CARD_INPUT_LINE_IN1
,
214 CX18_AV_AUDIO_SERIAL1
, 0 },
216 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
,
217 CX18_AV_AUDIO_SERIAL1
, 0 },
219 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
222 /* EtronTech EM6A9160TS-5G memory */
223 .chip_config
= 0x50003,
225 .timing1
= 0x24330e84,
231 .pci_list
= cx18_pci_h900
,
232 .i2c
= &cx18_i2c_std
,
235 /* ------------------------------------------------------------------------- */
237 /* Yuan MPC718: not working at the moment! */
239 static const struct cx18_card_pci_info cx18_pci_mpc718
[] = {
240 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_YUAN
, 0x0718 },
244 static const struct cx18_card cx18_card_mpc718
= {
245 .type
= CX18_CARD_YUAN_MPC718
,
246 .name
= "Yuan MPC718 MiniPCI DVB-T/Analog",
247 .comment
= "Experimenters needed for device to work well.\n"
248 "\tTo help, mail the linux-media list (www.linuxtv.org).\n",
249 .v4l2_capabilities
= CX18_CAP_ENCODER
,
250 .hw_audio_ctrl
= CX18_HW_418_AV
,
251 .hw_muxer
= CX18_HW_GPIO_MUX
,
252 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
253 CX18_HW_GPIO_MUX
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
255 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
256 { CX18_CARD_INPUT_SVIDEO1
, 1,
257 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
258 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
259 { CX18_CARD_INPUT_SVIDEO2
, 2,
260 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
261 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
264 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
265 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
266 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
270 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
272 /* FIXME - the FM radio is just a guess and driver doesn't use SIF */
273 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
275 /* Hynix HY5DU283222B DDR RAM */
276 .chip_config
= 0x303,
278 .timing1
= 0x36320966,
283 .gpio_init
.initial_value
= 0x1,
284 .gpio_init
.direction
= 0x3,
285 /* FIXME - these GPIO's are just guesses */
286 .gpio_audio_input
= { .mask
= 0x3,
291 .pci_list
= cx18_pci_mpc718
,
292 .i2c
= &cx18_i2c_std
,
295 /* ------------------------------------------------------------------------- */
299 static const struct cx18_card_pci_info cx18_pci_gotview_dvd3
[] = {
300 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_GOTVIEW
, 0x3343 },
304 static const struct cx18_card cx18_card_gotview_dvd3
= {
305 .type
= CX18_CARD_GOTVIEW_PCI_DVD3
,
306 .name
= "GoTView PCI DVD3 Hybrid",
307 .comment
= "Experimenters needed for device to work well.\n"
308 "\tTo help, mail the linux-media list (www.linuxtv.org).\n",
309 .v4l2_capabilities
= CX18_CAP_ENCODER
,
310 .hw_audio_ctrl
= CX18_HW_418_AV
,
311 .hw_muxer
= CX18_HW_GPIO_MUX
,
312 .hw_all
= CX18_HW_TVEEPROM
| CX18_HW_418_AV
| CX18_HW_TUNER
|
313 CX18_HW_GPIO_MUX
| CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
315 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
316 { CX18_CARD_INPUT_SVIDEO1
, 1,
317 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
318 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
319 { CX18_CARD_INPUT_SVIDEO2
, 2,
320 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
321 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
324 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
325 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
326 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
330 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
332 /* FIXME - the FM radio is just a guess and driver doesn't use SIF */
333 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
335 /* Hynix HY5DU283222B DDR RAM */
336 .chip_config
= 0x303,
338 .timing1
= 0x36320966,
343 .gpio_init
.initial_value
= 0x1,
344 .gpio_init
.direction
= 0x3,
346 .gpio_audio_input
= { .mask
= 0x3,
351 .pci_list
= cx18_pci_gotview_dvd3
,
352 .i2c
= &cx18_i2c_std
,
355 /* ------------------------------------------------------------------------- */
357 /* Conexant Raptor PAL/SECAM: note that this card is analog only! */
359 static const struct cx18_card_pci_info cx18_pci_cnxt_raptor_pal
[] = {
360 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_CONEXANT
, 0x0009 },
364 static const struct cx18_card cx18_card_cnxt_raptor_pal
= {
365 .type
= CX18_CARD_CNXT_RAPTOR_PAL
,
366 .name
= "Conexant Raptor PAL/SECAM",
367 .comment
= "Analog TV capture supported\n",
368 .v4l2_capabilities
= CX18_CAP_ENCODER
,
369 .hw_audio_ctrl
= CX18_HW_418_AV
,
370 .hw_muxer
= CX18_HW_GPIO_MUX
,
371 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
,
373 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
374 { CX18_CARD_INPUT_SVIDEO1
, 1,
375 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
376 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
377 { CX18_CARD_INPUT_SVIDEO2
, 2,
378 CX18_AV_SVIDEO_LUMA7
| CX18_AV_SVIDEO_CHROMA8
},
379 { CX18_CARD_INPUT_COMPOSITE2
, 2, CX18_AV_COMPOSITE6
},
382 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
383 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
384 { CX18_CARD_INPUT_LINE_IN2
, CX18_AV_AUDIO_SERIAL2
, 1 },
387 { .std
= V4L2_STD_PAL_SECAM
, .tuner
= TUNER_PHILIPS_FM1216ME_MK3
},
389 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO_SERIAL1
, 2 },
391 /* MT 46V16M16 memory */
392 .chip_config
= 0x50306,
394 .timing1
= 0x33220953,
399 .gpio_init
.initial_value
= 0x1002,
400 .gpio_init
.direction
= 0xf002,
401 .gpio_audio_input
= { .mask
= 0xf002,
402 .tuner
= 0x1002, /* LED D1 Tuner AF */
403 .linein
= 0x2000, /* LED D2 Line In 1 */
404 .radio
= 0x4002 }, /* LED D3 Tuner AF */
405 .pci_list
= cx18_pci_cnxt_raptor_pal
,
406 .i2c
= &cx18_i2c_std
,
409 /* ------------------------------------------------------------------------- */
411 /* Toshiba Qosmio laptop internal DVB-T/Analog Hybrid Tuner */
413 static const struct cx18_card_pci_info cx18_pci_toshiba_qosmio_dvbt
[] = {
414 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_TOSHIBA
, 0x0110 },
418 static const struct cx18_card cx18_card_toshiba_qosmio_dvbt
= {
419 .type
= CX18_CARD_TOSHIBA_QOSMIO_DVBT
,
420 .name
= "Toshiba Qosmio DVB-T/Analog",
421 .comment
= "Experimenters and photos needed for device to work well.\n"
422 "\tTo help, mail the linux-media list (www.linuxtv.org).\n",
423 .v4l2_capabilities
= CX18_CAP_ENCODER
,
424 .hw_audio_ctrl
= CX18_HW_418_AV
,
425 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_RESET_CTRL
,
427 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE6
},
428 { CX18_CARD_INPUT_SVIDEO1
, 1,
429 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
430 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE1
},
433 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
434 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
437 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
440 .chip_config
= 0x202,
442 .timing1
= 0x33320a63,
445 .initial_emrs
= 0x42,
448 .pci_list
= cx18_pci_toshiba_qosmio_dvbt
,
449 .i2c
= &cx18_i2c_std
,
452 /* ------------------------------------------------------------------------- */
454 /* Leadtek WinFast PVR2100 */
456 static const struct cx18_card_pci_info cx18_pci_leadtek_pvr2100
[] = {
457 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_LEADTEK
, 0x6f27 }, /* PVR2100 */
461 static const struct cx18_card cx18_card_leadtek_pvr2100
= {
462 .type
= CX18_CARD_LEADTEK_PVR2100
,
463 .name
= "Leadtek WinFast PVR2100",
464 .comment
= "Experimenters and photos needed for device to work well.\n"
465 "\tTo help, mail the linux-media list (www.linuxtv.org).\n",
466 .v4l2_capabilities
= CX18_CAP_ENCODER
,
467 .hw_audio_ctrl
= CX18_HW_418_AV
,
468 .hw_muxer
= CX18_HW_GPIO_MUX
,
469 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
|
470 CX18_HW_GPIO_RESET_CTRL
,
472 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
473 { CX18_CARD_INPUT_SVIDEO1
, 1,
474 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
475 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE7
},
476 { CX18_CARD_INPUT_COMPONENT1
, 1, CX18_AV_COMPONENT1
},
479 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
480 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
484 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
486 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
488 /* Pointer to proper DDR config values provided by Terry Wu */
489 .chip_config
= 0x303,
491 .timing1
= 0x24220e83,
496 .gpio_init
.initial_value
= 0x6,
497 .gpio_init
.direction
= 0x7,
498 .gpio_audio_input
= { .mask
= 0x7,
499 .tuner
= 0x6, .linein
= 0x2, .radio
= 0x2 },
501 .pci_list
= cx18_pci_leadtek_pvr2100
,
502 .i2c
= &cx18_i2c_std
,
505 /* ------------------------------------------------------------------------- */
507 /* Leadtek WinFast DVR3100 H */
509 static const struct cx18_card_pci_info cx18_pci_leadtek_dvr3100h
[] = {
510 { PCI_DEVICE_ID_CX23418
, CX18_PCI_ID_LEADTEK
, 0x6690 }, /* DVR3100 H */
514 static const struct cx18_card cx18_card_leadtek_dvr3100h
= {
515 .type
= CX18_CARD_LEADTEK_DVR3100H
,
516 .name
= "Leadtek WinFast DVR3100 H",
517 .comment
= "Simultaneous DVB-T and Analog capture supported,\n"
518 "\texcept when capturing Analog from the antenna input.\n",
519 .v4l2_capabilities
= CX18_CAP_ENCODER
,
520 .hw_audio_ctrl
= CX18_HW_418_AV
,
521 .hw_muxer
= CX18_HW_GPIO_MUX
,
522 .hw_all
= CX18_HW_418_AV
| CX18_HW_TUNER
| CX18_HW_GPIO_MUX
|
523 CX18_HW_DVB
| CX18_HW_GPIO_RESET_CTRL
,
525 { CX18_CARD_INPUT_VID_TUNER
, 0, CX18_AV_COMPOSITE2
},
526 { CX18_CARD_INPUT_SVIDEO1
, 1,
527 CX18_AV_SVIDEO_LUMA3
| CX18_AV_SVIDEO_CHROMA4
},
528 { CX18_CARD_INPUT_COMPOSITE1
, 1, CX18_AV_COMPOSITE7
},
529 { CX18_CARD_INPUT_COMPONENT1
, 1, CX18_AV_COMPONENT1
},
532 { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 0 },
533 { CX18_CARD_INPUT_LINE_IN1
, CX18_AV_AUDIO_SERIAL1
, 1 },
537 { .std
= V4L2_STD_ALL
, .tuner
= TUNER_XC2028
},
539 .radio_input
= { CX18_CARD_INPUT_AUD_TUNER
, CX18_AV_AUDIO5
, 2 },
541 /* Pointer to proper DDR config values provided by Terry Wu */
542 .chip_config
= 0x303,
544 .timing1
= 0x24220e83,
549 .gpio_init
.initial_value
= 0x6,
550 .gpio_init
.direction
= 0x7,
551 .gpio_audio_input
= { .mask
= 0x7,
552 .tuner
= 0x6, .linein
= 0x2, .radio
= 0x2 },
554 .pci_list
= cx18_pci_leadtek_dvr3100h
,
555 .i2c
= &cx18_i2c_std
,
558 /* ------------------------------------------------------------------------- */
560 static const struct cx18_card
*cx18_card_list
[] = {
561 &cx18_card_hvr1600_esmt
,
562 &cx18_card_hvr1600_samsung
,
565 &cx18_card_cnxt_raptor_pal
,
566 &cx18_card_toshiba_qosmio_dvbt
,
567 &cx18_card_leadtek_pvr2100
,
568 &cx18_card_leadtek_dvr3100h
,
569 &cx18_card_gotview_dvd3
,
570 &cx18_card_hvr1600_s5h1411
573 const struct cx18_card
*cx18_get_card(u16 index
)
575 if (index
>= ARRAY_SIZE(cx18_card_list
))
577 return cx18_card_list
[index
];
580 int cx18_get_input(struct cx18
*cx
, u16 index
, struct v4l2_input
*input
)
582 const struct cx18_card_video_input
*card_input
=
583 cx
->card
->video_inputs
+ index
;
584 static const char * const input_strs
[] = {
593 if (index
>= cx
->nof_inputs
)
595 input
->index
= index
;
596 strscpy(input
->name
, input_strs
[card_input
->video_type
- 1],
597 sizeof(input
->name
));
598 input
->type
= (card_input
->video_type
== CX18_CARD_INPUT_VID_TUNER
?
599 V4L2_INPUT_TYPE_TUNER
: V4L2_INPUT_TYPE_CAMERA
);
600 input
->audioset
= (1 << cx
->nof_audio_inputs
) - 1;
601 input
->std
= (input
->type
== V4L2_INPUT_TYPE_TUNER
) ?
602 cx
->tuner_std
: V4L2_STD_ALL
;
606 int cx18_get_audio_input(struct cx18
*cx
, u16 index
, struct v4l2_audio
*audio
)
608 const struct cx18_card_audio_input
*aud_input
=
609 cx
->card
->audio_inputs
+ index
;
610 static const char * const input_strs
[] = {
616 memset(audio
, 0, sizeof(*audio
));
617 if (index
>= cx
->nof_audio_inputs
)
619 strscpy(audio
->name
, input_strs
[aud_input
->audio_type
- 1],
620 sizeof(audio
->name
));
621 audio
->index
= index
;
622 audio
->capability
= V4L2_AUDCAP_STEREO
;