aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx18/cx18-cards.c')
-rw-r--r--drivers/media/video/cx18/cx18-cards.c89
1 files changed, 75 insertions, 14 deletions
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c
index c26e0ef5b075..8fe5f38c4d7c 100644
--- a/drivers/media/video/cx18/cx18-cards.c
+++ b/drivers/media/video/cx18/cx18-cards.c
@@ -27,6 +27,8 @@
27#include "cx18-i2c.h" 27#include "cx18-i2c.h"
28#include <media/cs5345.h> 28#include <media/cs5345.h>
29 29
30#define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM)
31
30/********************** card configuration *******************************/ 32/********************** card configuration *******************************/
31 33
32/* usual i2c tuner addresses to probe */ 34/* usual i2c tuner addresses to probe */
@@ -65,12 +67,12 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
65 { CX18_CARD_INPUT_AUD_TUNER, 67 { CX18_CARD_INPUT_AUD_TUNER,
66 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 68 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
67 { CX18_CARD_INPUT_LINE_IN1, 69 { CX18_CARD_INPUT_LINE_IN1,
68 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 }, 70 CX18_AV_AUDIO_SERIAL1, CS5345_IN_2 },
69 { CX18_CARD_INPUT_LINE_IN2, 71 { CX18_CARD_INPUT_LINE_IN2,
70 CX18_AV_AUDIO_SERIAL, CS5345_IN_3 }, 72 CX18_AV_AUDIO_SERIAL1, CS5345_IN_3 },
71 }, 73 },
72 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 74 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
73 CX18_AV_AUDIO_SERIAL, CS5345_IN_4 }, 75 CX18_AV_AUDIO_SERIAL1, CS5345_IN_4 },
74 .ddr = { 76 .ddr = {
75 /* ESMT M13S128324A-5B memory */ 77 /* ESMT M13S128324A-5B memory */
76 .chip_config = 0x003, 78 .chip_config = 0x003,
@@ -86,6 +88,7 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
86 .active_lo_mask = 0x3001, 88 .active_lo_mask = 0x3001,
87 .msecs_asserted = 10, 89 .msecs_asserted = 10,
88 .msecs_recovery = 40, 90 .msecs_recovery = 40,
91 .ir_reset_mask = 0x0001,
89 }, 92 },
90 .i2c = &cx18_i2c_std, 93 .i2c = &cx18_i2c_std,
91}; 94};
@@ -110,12 +113,12 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
110 { CX18_CARD_INPUT_AUD_TUNER, 113 { CX18_CARD_INPUT_AUD_TUNER,
111 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 114 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
112 { CX18_CARD_INPUT_LINE_IN1, 115 { CX18_CARD_INPUT_LINE_IN1,
113 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 }, 116 CX18_AV_AUDIO_SERIAL1, CS5345_IN_2 },
114 { CX18_CARD_INPUT_LINE_IN2, 117 { CX18_CARD_INPUT_LINE_IN2,
115 CX18_AV_AUDIO_SERIAL, CS5345_IN_3 }, 118 CX18_AV_AUDIO_SERIAL1, CS5345_IN_3 },
116 }, 119 },
117 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 120 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
118 CX18_AV_AUDIO_SERIAL, CS5345_IN_4 }, 121 CX18_AV_AUDIO_SERIAL1, CS5345_IN_4 },
119 .ddr = { 122 .ddr = {
120 /* Samsung K4D263238G-VC33 memory */ 123 /* Samsung K4D263238G-VC33 memory */
121 .chip_config = 0x003, 124 .chip_config = 0x003,
@@ -131,6 +134,7 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
131 .active_lo_mask = 0x3001, 134 .active_lo_mask = 0x3001,
132 .msecs_asserted = 10, 135 .msecs_asserted = 10,
133 .msecs_recovery = 40, 136 .msecs_recovery = 40,
137 .ir_reset_mask = 0x0001,
134 }, 138 },
135 .i2c = &cx18_i2c_std, 139 .i2c = &cx18_i2c_std,
136}; 140};
@@ -161,10 +165,10 @@ static const struct cx18_card cx18_card_h900 = {
161 { CX18_CARD_INPUT_AUD_TUNER, 165 { CX18_CARD_INPUT_AUD_TUNER,
162 CX18_AV_AUDIO8, 0 }, 166 CX18_AV_AUDIO8, 0 },
163 { CX18_CARD_INPUT_LINE_IN1, 167 { CX18_CARD_INPUT_LINE_IN1,
164 CX18_AV_AUDIO_SERIAL, 0 }, 168 CX18_AV_AUDIO_SERIAL1, 0 },
165 }, 169 },
166 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 170 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
167 CX18_AV_AUDIO_SERIAL, 0 }, 171 CX18_AV_AUDIO_SERIAL1, 0 },
168 .tuners = { 172 .tuners = {
169 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 173 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
170 }, 174 },
@@ -194,7 +198,7 @@ static const struct cx18_card_pci_info cx18_pci_mpc718[] = {
194static const struct cx18_card cx18_card_mpc718 = { 198static const struct cx18_card cx18_card_mpc718 = {
195 .type = CX18_CARD_YUAN_MPC718, 199 .type = CX18_CARD_YUAN_MPC718,
196 .name = "Yuan MPC718", 200 .name = "Yuan MPC718",
197 .comment = "Some Composite and S-Video inputs are currently working.\n", 201 .comment = "Analog video capture works; some audio line in may not.\n",
198 .v4l2_capabilities = CX18_CAP_ENCODER, 202 .v4l2_capabilities = CX18_CAP_ENCODER,
199 .hw_audio_ctrl = CX18_HW_CX23418, 203 .hw_audio_ctrl = CX18_HW_CX23418,
200 .hw_all = CX18_HW_TUNER, 204 .hw_all = CX18_HW_TUNER,
@@ -209,11 +213,11 @@ static const struct cx18_card cx18_card_mpc718 = {
209 { CX18_CARD_INPUT_COMPOSITE3, 2, CX18_AV_COMPOSITE3 }, 213 { CX18_CARD_INPUT_COMPOSITE3, 2, CX18_AV_COMPOSITE3 },
210 }, 214 },
211 .audio_inputs = { 215 .audio_inputs = {
212 { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO5, 0 }, 216 { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO5, 0 },
213 { CX18_CARD_INPUT_LINE_IN1, CX18_AV_AUDIO_SERIAL, 0 }, 217 { CX18_CARD_INPUT_LINE_IN1, CX18_AV_AUDIO_SERIAL1, 0 },
214 { CX18_CARD_INPUT_LINE_IN2, CX18_AV_AUDIO_SERIAL, 0 }, 218 { CX18_CARD_INPUT_LINE_IN2, CX18_AV_AUDIO_SERIAL1, 0 },
215 }, 219 },
216 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO_SERIAL, 0 }, 220 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO_SERIAL1, 0 },
217 .tuners = { 221 .tuners = {
218 /* XC3028 tuner */ 222 /* XC3028 tuner */
219 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 223 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
@@ -227,16 +231,73 @@ static const struct cx18_card cx18_card_mpc718 = {
227 .tune_lane = 0, 231 .tune_lane = 0,
228 .initial_emrs = 2, 232 .initial_emrs = 2,
229 }, 233 },
230 .xceive_pin = 15, 234 .xceive_pin = 0,
231 .pci_list = cx18_pci_mpc718, 235 .pci_list = cx18_pci_mpc718,
232 .i2c = &cx18_i2c_std, 236 .i2c = &cx18_i2c_std,
233}; 237};
234 238
239/* ------------------------------------------------------------------------- */
240
241/* Conexant Raptor PAL/SECAM: note that this card is analog only! */
242
243static const struct cx18_card_pci_info cx18_pci_cnxt_raptor_pal[] = {
244 { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_CONEXANT, 0x0009 },
245 { 0, 0, 0 }
246};
247
248static const struct cx18_card cx18_card_cnxt_raptor_pal = {
249 .type = CX18_CARD_CNXT_RAPTOR_PAL,
250 .name = "Conexant Raptor PAL/SECAM",
251 .comment = "VBI is not yet supported\n",
252 .v4l2_capabilities = CX18_CAP_ENCODER,
253 .hw_audio_ctrl = CX18_HW_CX23418,
254 .hw_muxer = CX18_HW_GPIO,
255 .hw_all = CX18_HW_TUNER | CX18_HW_GPIO,
256 .video_inputs = {
257 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE2 },
258 { CX18_CARD_INPUT_SVIDEO1, 1,
259 CX18_AV_SVIDEO_LUMA3 | CX18_AV_SVIDEO_CHROMA4 },
260 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE1 },
261 { CX18_CARD_INPUT_SVIDEO2, 2,
262 CX18_AV_SVIDEO_LUMA7 | CX18_AV_SVIDEO_CHROMA8 },
263 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE6 },
264 },
265 .audio_inputs = {
266 { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO5, 0 },
267 { CX18_CARD_INPUT_LINE_IN1, CX18_AV_AUDIO_SERIAL1, 1 },
268 { CX18_CARD_INPUT_LINE_IN2, CX18_AV_AUDIO_SERIAL2, 1 },
269 },
270 .tuners = {
271 { .std = V4L2_STD_PAL_SECAM, .tuner = TUNER_PHILIPS_FM1216ME_MK3 },
272 },
273 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO_SERIAL1, 2 },
274 .ddr = {
275 /* MT 46V16M16 memory */
276 .chip_config = 0x50306,
277 .refresh = 0x753,
278 .timing1 = 0x33220953,
279 .timing2 = 0x09,
280 .tune_lane = 0,
281 .initial_emrs = 0,
282 },
283 .gpio_init.initial_value = 0x1002,
284 .gpio_init.direction = 0xf002,
285 .gpio_audio_input = { .mask = 0xf002,
286 .tuner = 0x1002, /* LED D1 Tuner AF */
287 .linein = 0x2000, /* LED D2 Line In 1 */
288 .radio = 0x4002 }, /* LED D3 Tuner AF */
289 .pci_list = cx18_pci_cnxt_raptor_pal,
290 .i2c = &cx18_i2c_std,
291};
292
293/* ------------------------------------------------------------------------- */
294
235static const struct cx18_card *cx18_card_list[] = { 295static const struct cx18_card *cx18_card_list[] = {
236 &cx18_card_hvr1600_esmt, 296 &cx18_card_hvr1600_esmt,
237 &cx18_card_hvr1600_samsung, 297 &cx18_card_hvr1600_samsung,
238 &cx18_card_h900, 298 &cx18_card_h900,
239 &cx18_card_mpc718, 299 &cx18_card_mpc718,
300 &cx18_card_cnxt_raptor_pal,
240}; 301};
241 302
242const struct cx18_card *cx18_get_card(u16 index) 303const struct cx18_card *cx18_get_card(u16 index)