diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-18 16:56:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:59:20 -0400 |
commit | f54376e275415588d5cb1c54b9edf895391efd71 (patch) | |
tree | 66aaaf107319cf1dbedfb02309fc687038fae234 /drivers/media/video | |
parent | 8dec073225b0926a26656f416a8d32573205a78f (diff) |
V4L/DVB (3891): Convert cx88-dvb to refactored tuner code
Rename pll calls to appropriate tuner calls.
Remove pll functions from demod structures.
Hook tuner call into tuner_ops.
Attach dvb-pll where possible.
Add pll gate control calls where appropriate.
Sort out the hybrid cards to work with the revamped mt352/sl10353 demods
supporting external tuners.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 134 |
1 files changed, 74 insertions, 60 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index f874fa68664..8b48c1f67a8 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -114,21 +114,6 @@ static struct videobuf_queue_ops dvb_qops = { | |||
114 | 114 | ||
115 | /* ------------------------------------------------------------------ */ | 115 | /* ------------------------------------------------------------------ */ |
116 | 116 | ||
117 | #if defined(HAVE_MT352) || defined(HAVE_ZL10353) | ||
118 | static int zarlink_pll_set(struct dvb_frontend *fe, | ||
119 | struct dvb_frontend_parameters *params, | ||
120 | u8 *pllbuf) | ||
121 | { | ||
122 | struct cx8802_dev *dev = fe->dvb->priv; | ||
123 | |||
124 | pllbuf[0] = dev->core->pll_addr << 1; | ||
125 | dvb_pll_configure(dev->core->pll_desc, pllbuf + 1, | ||
126 | params->frequency, | ||
127 | params->u.ofdm.bandwidth); | ||
128 | return 0; | ||
129 | } | ||
130 | #endif | ||
131 | |||
132 | #ifdef HAVE_MT352 | 117 | #ifdef HAVE_MT352 |
133 | static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) | 118 | static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) |
134 | { | 119 | { |
@@ -197,19 +182,16 @@ static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe) | |||
197 | static struct mt352_config dvico_fusionhdtv = { | 182 | static struct mt352_config dvico_fusionhdtv = { |
198 | .demod_address = 0x0F, | 183 | .demod_address = 0x0F, |
199 | .demod_init = dvico_fusionhdtv_demod_init, | 184 | .demod_init = dvico_fusionhdtv_demod_init, |
200 | .pll_set = zarlink_pll_set, | ||
201 | }; | 185 | }; |
202 | 186 | ||
203 | static struct mt352_config dntv_live_dvbt_config = { | 187 | static struct mt352_config dntv_live_dvbt_config = { |
204 | .demod_address = 0x0f, | 188 | .demod_address = 0x0f, |
205 | .demod_init = dntv_live_dvbt_demod_init, | 189 | .demod_init = dntv_live_dvbt_demod_init, |
206 | .pll_set = zarlink_pll_set, | ||
207 | }; | 190 | }; |
208 | 191 | ||
209 | static struct mt352_config dvico_fusionhdtv_dual = { | 192 | static struct mt352_config dvico_fusionhdtv_dual = { |
210 | .demod_address = 0x0F, | 193 | .demod_address = 0x0F, |
211 | .demod_init = dvico_dual_demod_init, | 194 | .demod_init = dvico_dual_demod_init, |
212 | .pll_set = zarlink_pll_set, | ||
213 | }; | 195 | }; |
214 | 196 | ||
215 | #ifdef HAVE_VP3054_I2C | 197 | #ifdef HAVE_VP3054_I2C |
@@ -247,6 +229,8 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe) | |||
247 | .buf = fmd1216_init, .len = sizeof(fmd1216_init) }; | 229 | .buf = fmd1216_init, .len = sizeof(fmd1216_init) }; |
248 | int err; | 230 | int err; |
249 | 231 | ||
232 | if (fe->ops->i2c_gate_ctrl) | ||
233 | fe->ops->i2c_gate_ctrl(fe, 1); | ||
250 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { | 234 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { |
251 | if (err < 0) | 235 | if (err < 0) |
252 | return err; | 236 | return err; |
@@ -257,14 +241,14 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe) | |||
257 | return 0; | 241 | return 0; |
258 | } | 242 | } |
259 | 243 | ||
260 | static int dntv_live_dvbt_pro_pll_set(struct dvb_frontend* fe, | 244 | static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe, |
261 | struct dvb_frontend_parameters* params, | 245 | struct dvb_frontend_parameters* params) |
262 | u8* pllbuf) | ||
263 | { | 246 | { |
264 | struct cx8802_dev *dev= fe->dvb->priv; | 247 | struct cx8802_dev *dev= fe->dvb->priv; |
248 | u8 buf[4]; | ||
265 | struct i2c_msg msg = | 249 | struct i2c_msg msg = |
266 | { .addr = dev->core->pll_addr, .flags = 0, | 250 | { .addr = dev->core->pll_addr, .flags = 0, |
267 | .buf = pllbuf+1, .len = 4 }; | 251 | .buf = buf, .len = 4 }; |
268 | int err; | 252 | int err; |
269 | 253 | ||
270 | /* Switch PLL to DVB mode */ | 254 | /* Switch PLL to DVB mode */ |
@@ -273,14 +257,16 @@ static int dntv_live_dvbt_pro_pll_set(struct dvb_frontend* fe, | |||
273 | return err; | 257 | return err; |
274 | 258 | ||
275 | /* Tune PLL */ | 259 | /* Tune PLL */ |
276 | pllbuf[0] = dev->core->pll_addr << 1; | 260 | dvb_pll_configure(dev->core->pll_desc, buf, |
277 | dvb_pll_configure(dev->core->pll_desc, pllbuf+1, | ||
278 | params->frequency, | 261 | params->frequency, |
279 | params->u.ofdm.bandwidth); | 262 | params->u.ofdm.bandwidth); |
263 | if (fe->ops->i2c_gate_ctrl) | ||
264 | fe->ops->i2c_gate_ctrl(fe, 1); | ||
280 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { | 265 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { |
266 | |||
281 | printk(KERN_WARNING "cx88-dvb: %s error " | 267 | printk(KERN_WARNING "cx88-dvb: %s error " |
282 | "(addr %02x <- %02x, err = %i)\n", | 268 | "(addr %02x <- %02x, err = %i)\n", |
283 | __FUNCTION__, pllbuf[0], pllbuf[1], err); | 269 | __FUNCTION__, dev->core->pll_addr, buf[0], err); |
284 | if (err < 0) | 270 | if (err < 0) |
285 | return err; | 271 | return err; |
286 | else | 272 | else |
@@ -294,27 +280,27 @@ static struct mt352_config dntv_live_dvbt_pro_config = { | |||
294 | .demod_address = 0x0f, | 280 | .demod_address = 0x0f, |
295 | .no_tuner = 1, | 281 | .no_tuner = 1, |
296 | .demod_init = dntv_live_dvbt_pro_demod_init, | 282 | .demod_init = dntv_live_dvbt_pro_demod_init, |
297 | .pll_set = dntv_live_dvbt_pro_pll_set, | ||
298 | }; | 283 | }; |
299 | #endif | 284 | #endif |
300 | #endif | 285 | #endif |
301 | 286 | ||
302 | #ifdef HAVE_ZL10353 | 287 | #ifdef HAVE_ZL10353 |
303 | static int dvico_hybrid_tune_pll(struct dvb_frontend *fe, | 288 | static int dvico_hybrid_tuner_set_params(struct dvb_frontend *fe, |
304 | struct dvb_frontend_parameters *params, | 289 | struct dvb_frontend_parameters *params) |
305 | u8 *pllbuf) | ||
306 | { | 290 | { |
291 | u8 pllbuf[4]; | ||
307 | struct cx8802_dev *dev= fe->dvb->priv; | 292 | struct cx8802_dev *dev= fe->dvb->priv; |
308 | struct i2c_msg msg = | 293 | struct i2c_msg msg = |
309 | { .addr = dev->core->pll_addr, .flags = 0, | 294 | { .addr = dev->core->pll_addr, .flags = 0, |
310 | .buf = pllbuf + 1, .len = 4 }; | 295 | .buf = pllbuf, .len = 4 }; |
311 | int err; | 296 | int err; |
312 | 297 | ||
313 | pllbuf[0] = dev->core->pll_addr << 1; | 298 | dvb_pll_configure(dev->core->pll_desc, pllbuf, |
314 | dvb_pll_configure(dev->core->pll_desc, pllbuf + 1, | ||
315 | params->frequency, | 299 | params->frequency, |
316 | params->u.ofdm.bandwidth); | 300 | params->u.ofdm.bandwidth); |
317 | 301 | ||
302 | if (fe->ops->i2c_gate_ctrl) | ||
303 | fe->ops->i2c_gate_ctrl(fe, 1); | ||
318 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { | 304 | if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { |
319 | printk(KERN_WARNING "cx88-dvb: %s error " | 305 | printk(KERN_WARNING "cx88-dvb: %s error " |
320 | "(addr %02x <- %02x, err = %i)\n", | 306 | "(addr %02x <- %02x, err = %i)\n", |
@@ -330,12 +316,11 @@ static int dvico_hybrid_tune_pll(struct dvb_frontend *fe, | |||
330 | 316 | ||
331 | static struct zl10353_config dvico_fusionhdtv_hybrid = { | 317 | static struct zl10353_config dvico_fusionhdtv_hybrid = { |
332 | .demod_address = 0x0F, | 318 | .demod_address = 0x0F, |
333 | .pll_set = dvico_hybrid_tune_pll, | 319 | .no_tuner = 1, |
334 | }; | 320 | }; |
335 | 321 | ||
336 | static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { | 322 | static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { |
337 | .demod_address = 0x0F, | 323 | .demod_address = 0x0F, |
338 | .pll_set = zarlink_pll_set, | ||
339 | }; | 324 | }; |
340 | #endif | 325 | #endif |
341 | 326 | ||
@@ -343,21 +328,15 @@ static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { | |||
343 | static struct cx22702_config connexant_refboard_config = { | 328 | static struct cx22702_config connexant_refboard_config = { |
344 | .demod_address = 0x43, | 329 | .demod_address = 0x43, |
345 | .output_mode = CX22702_SERIAL_OUTPUT, | 330 | .output_mode = CX22702_SERIAL_OUTPUT, |
346 | .pll_address = 0x60, | ||
347 | .pll_desc = &dvb_pll_thomson_dtt7579, | ||
348 | }; | 331 | }; |
349 | 332 | ||
350 | static struct cx22702_config hauppauge_novat_config = { | 333 | static struct cx22702_config hauppauge_novat_config = { |
351 | .demod_address = 0x43, | 334 | .demod_address = 0x43, |
352 | .output_mode = CX22702_SERIAL_OUTPUT, | 335 | .output_mode = CX22702_SERIAL_OUTPUT, |
353 | .pll_address = 0x61, | ||
354 | .pll_desc = &dvb_pll_thomson_dtt759x, | ||
355 | }; | 336 | }; |
356 | static struct cx22702_config hauppauge_hvr1100_config = { | 337 | static struct cx22702_config hauppauge_hvr1100_config = { |
357 | .demod_address = 0x63, | 338 | .demod_address = 0x63, |
358 | .output_mode = CX22702_SERIAL_OUTPUT, | 339 | .output_mode = CX22702_SERIAL_OUTPUT, |
359 | .pll_address = 0x61, | ||
360 | .pll_desc = &dvb_pll_fmd1216me, | ||
361 | }; | 340 | }; |
362 | #endif | 341 | #endif |
363 | 342 | ||
@@ -372,15 +351,13 @@ static int or51132_set_ts_param(struct dvb_frontend* fe, | |||
372 | 351 | ||
373 | static struct or51132_config pchdtv_hd3000 = { | 352 | static struct or51132_config pchdtv_hd3000 = { |
374 | .demod_address = 0x15, | 353 | .demod_address = 0x15, |
375 | .pll_address = 0x61, | ||
376 | .pll_desc = &dvb_pll_thomson_dtt761x, | ||
377 | .set_ts_params = or51132_set_ts_param, | 354 | .set_ts_params = or51132_set_ts_param, |
378 | }; | 355 | }; |
379 | #endif | 356 | #endif |
380 | 357 | ||
381 | #ifdef HAVE_LGDT330X | 358 | #ifdef HAVE_LGDT330X |
382 | static int lgdt3302_pll_set(struct dvb_frontend* fe, | 359 | static int lgdt3302_tuner_set_params(struct dvb_frontend* fe, |
383 | struct dvb_frontend_parameters* params) | 360 | struct dvb_frontend_parameters* params) |
384 | { | 361 | { |
385 | /* FIXME make this routine use the tuner-simple code. | 362 | /* FIXME make this routine use the tuner-simple code. |
386 | * It could probably be shared with a number of ATSC | 363 | * It could probably be shared with a number of ATSC |
@@ -396,6 +373,9 @@ static int lgdt3302_pll_set(struct dvb_frontend* fe, | |||
396 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); | 373 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); |
397 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | 374 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", |
398 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | 375 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); |
376 | |||
377 | if (fe->ops->i2c_gate_ctrl) | ||
378 | fe->ops->i2c_gate_ctrl(fe, 1); | ||
399 | if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { | 379 | if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { |
400 | printk(KERN_WARNING "cx88-dvb: %s error " | 380 | printk(KERN_WARNING "cx88-dvb: %s error " |
401 | "(addr %02x <- %02x, err = %i)\n", | 381 | "(addr %02x <- %02x, err = %i)\n", |
@@ -408,8 +388,8 @@ static int lgdt3302_pll_set(struct dvb_frontend* fe, | |||
408 | return 0; | 388 | return 0; |
409 | } | 389 | } |
410 | 390 | ||
411 | static int lgdt3303_pll_set(struct dvb_frontend* fe, | 391 | static int lgdt3303_tuner_set_params(struct dvb_frontend* fe, |
412 | struct dvb_frontend_parameters* params) | 392 | struct dvb_frontend_parameters* params) |
413 | { | 393 | { |
414 | struct cx8802_dev *dev= fe->dvb->priv; | 394 | struct cx8802_dev *dev= fe->dvb->priv; |
415 | struct cx88_core *core = dev->core; | 395 | struct cx88_core *core = dev->core; |
@@ -447,7 +427,6 @@ static struct lgdt330x_config fusionhdtv_3_gold = { | |||
447 | .demod_address = 0x0e, | 427 | .demod_address = 0x0e, |
448 | .demod_chip = LGDT3302, | 428 | .demod_chip = LGDT3302, |
449 | .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */ | 429 | .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */ |
450 | .pll_set = lgdt3302_pll_set, | ||
451 | .set_ts_params = lgdt330x_set_ts_param, | 430 | .set_ts_params = lgdt330x_set_ts_param, |
452 | }; | 431 | }; |
453 | 432 | ||
@@ -455,7 +434,6 @@ static struct lgdt330x_config fusionhdtv_5_gold = { | |||
455 | .demod_address = 0x0e, | 434 | .demod_address = 0x0e, |
456 | .demod_chip = LGDT3303, | 435 | .demod_chip = LGDT3303, |
457 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | 436 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ |
458 | .pll_set = lgdt3303_pll_set, | ||
459 | .set_ts_params = lgdt330x_set_ts_param, | 437 | .set_ts_params = lgdt330x_set_ts_param, |
460 | }; | 438 | }; |
461 | 439 | ||
@@ -463,7 +441,6 @@ static struct lgdt330x_config pchdtv_hd5500 = { | |||
463 | .demod_address = 0x59, | 441 | .demod_address = 0x59, |
464 | .demod_chip = LGDT3303, | 442 | .demod_chip = LGDT3303, |
465 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | 443 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ |
466 | .pll_set = lgdt3303_pll_set, | ||
467 | .set_ts_params = lgdt330x_set_ts_param, | 444 | .set_ts_params = lgdt330x_set_ts_param, |
468 | }; | 445 | }; |
469 | #endif | 446 | #endif |
@@ -488,8 +465,6 @@ static int nxt200x_set_pll_input(u8* buf, int input) | |||
488 | 465 | ||
489 | static struct nxt200x_config ati_hdtvwonder = { | 466 | static struct nxt200x_config ati_hdtvwonder = { |
490 | .demod_address = 0x0a, | 467 | .demod_address = 0x0a, |
491 | .pll_address = 0x61, | ||
492 | .pll_desc = &dvb_pll_tuv1236d, | ||
493 | .set_pll_input = nxt200x_set_pll_input, | 468 | .set_pll_input = nxt200x_set_pll_input, |
494 | .set_ts_params = nxt200x_set_ts_param, | 469 | .set_ts_params = nxt200x_set_ts_param, |
495 | }; | 470 | }; |
@@ -541,6 +516,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
541 | case CX88_BOARD_HAUPPAUGE_DVB_T1: | 516 | case CX88_BOARD_HAUPPAUGE_DVB_T1: |
542 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, | 517 | dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, |
543 | &dev->core->i2c_adap); | 518 | &dev->core->i2c_adap); |
519 | if (dev->dvb.frontend != NULL) { | ||
520 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_thomson_dtt759x); | ||
521 | } | ||
544 | break; | 522 | break; |
545 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: | 523 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: |
546 | case CX88_BOARD_CONEXANT_DVB_T1: | 524 | case CX88_BOARD_CONEXANT_DVB_T1: |
@@ -548,44 +526,55 @@ static int dvb_register(struct cx8802_dev *dev) | |||
548 | case CX88_BOARD_WINFAST_DTV1000: | 526 | case CX88_BOARD_WINFAST_DTV1000: |
549 | dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, | 527 | dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, |
550 | &dev->core->i2c_adap); | 528 | &dev->core->i2c_adap); |
529 | if (dev->dvb.frontend != NULL) { | ||
530 | dvb_pll_attach(dev->dvb.frontend, 0x60, &dev->core->i2c_adap, &dvb_pll_thomson_dtt7579); | ||
531 | } | ||
551 | break; | 532 | break; |
552 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 533 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
553 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: | 534 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: |
554 | dev->dvb.frontend = cx22702_attach(&hauppauge_hvr1100_config, | 535 | dev->dvb.frontend = cx22702_attach(&hauppauge_hvr1100_config, |
555 | &dev->core->i2c_adap); | 536 | &dev->core->i2c_adap); |
537 | if (dev->dvb.frontend != NULL) { | ||
538 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_fmd1216me); | ||
539 | } | ||
556 | break; | 540 | break; |
557 | #endif | 541 | #endif |
558 | #if defined(HAVE_MT352) || defined(HAVE_ZL10353) | 542 | #if defined(HAVE_MT352) || defined(HAVE_ZL10353) |
559 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: | 543 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: |
560 | dev->core->pll_addr = 0x60; | ||
561 | dev->core->pll_desc = &dvb_pll_thomson_dtt7579; | ||
562 | #ifdef HAVE_MT352 | 544 | #ifdef HAVE_MT352 |
563 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, | 545 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, |
564 | &dev->core->i2c_adap); | 546 | &dev->core->i2c_adap); |
565 | if (dev->dvb.frontend != NULL) | 547 | if (dev->dvb.frontend != NULL) { |
548 | dvb_pll_attach(dev->dvb.frontend, 0x60, &dev->core->i2c_adap, &dvb_pll_thomson_dtt7579); | ||
566 | break; | 549 | break; |
550 | } | ||
567 | #endif | 551 | #endif |
568 | #ifdef HAVE_ZL10353 | 552 | #ifdef HAVE_ZL10353 |
569 | /* ZL10353 replaces MT352 on later cards */ | 553 | /* ZL10353 replaces MT352 on later cards */ |
570 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, | 554 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, |
571 | &dev->core->i2c_adap); | 555 | &dev->core->i2c_adap); |
556 | if (dev->dvb.frontend != NULL) { | ||
557 | dvb_pll_attach(dev->dvb.frontend, 0x60, &dev->core->i2c_adap, &dvb_pll_thomson_dtt7579); | ||
558 | } | ||
572 | #endif | 559 | #endif |
573 | break; | 560 | break; |
574 | #endif /* HAVE_MT352 || HAVE_ZL10353 */ | 561 | #endif /* HAVE_MT352 || HAVE_ZL10353 */ |
575 | #ifdef HAVE_MT352 | 562 | #ifdef HAVE_MT352 |
576 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: | 563 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: |
577 | dev->core->pll_addr = 0x61; | ||
578 | dev->core->pll_desc = &dvb_pll_lg_z201; | ||
579 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, | 564 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, |
580 | &dev->core->i2c_adap); | 565 | &dev->core->i2c_adap); |
566 | if (dev->dvb.frontend != NULL) { | ||
567 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_lg_z201); | ||
568 | } | ||
581 | break; | 569 | break; |
582 | case CX88_BOARD_KWORLD_DVB_T: | 570 | case CX88_BOARD_KWORLD_DVB_T: |
583 | case CX88_BOARD_DNTV_LIVE_DVB_T: | 571 | case CX88_BOARD_DNTV_LIVE_DVB_T: |
584 | case CX88_BOARD_ADSTECH_DVB_T_PCI: | 572 | case CX88_BOARD_ADSTECH_DVB_T_PCI: |
585 | dev->core->pll_addr = 0x61; | ||
586 | dev->core->pll_desc = &dvb_pll_unknown_1; | ||
587 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, | 573 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, |
588 | &dev->core->i2c_adap); | 574 | &dev->core->i2c_adap); |
575 | if (dev->dvb.frontend != NULL) { | ||
576 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_unknown_1); | ||
577 | } | ||
589 | break; | 578 | break; |
590 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: | 579 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: |
591 | #ifdef HAVE_VP3054_I2C | 580 | #ifdef HAVE_VP3054_I2C |
@@ -593,6 +582,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
593 | dev->core->pll_desc = &dvb_pll_fmd1216me; | 582 | dev->core->pll_desc = &dvb_pll_fmd1216me; |
594 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config, | 583 | dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config, |
595 | &((struct vp3054_i2c_state *)dev->card_priv)->adap); | 584 | &((struct vp3054_i2c_state *)dev->card_priv)->adap); |
585 | if (dev->dvb.frontend != NULL) { | ||
586 | dev->dvb.frontend->ops->tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; | ||
587 | } | ||
596 | #else | 588 | #else |
597 | printk("%s: built without vp3054 support\n", dev->core->name); | 589 | printk("%s: built without vp3054 support\n", dev->core->name); |
598 | #endif | 590 | #endif |
@@ -600,10 +592,11 @@ static int dvb_register(struct cx8802_dev *dev) | |||
600 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: | 592 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: |
601 | /* The tin box says DEE1601, but it seems to be DTT7579 | 593 | /* The tin box says DEE1601, but it seems to be DTT7579 |
602 | * compatible, with a slightly different MT352 AGC gain. */ | 594 | * compatible, with a slightly different MT352 AGC gain. */ |
603 | dev->core->pll_addr = 0x61; | ||
604 | dev->core->pll_desc = &dvb_pll_thomson_dtt7579; | ||
605 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv_dual, | 595 | dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv_dual, |
606 | &dev->core->i2c_adap); | 596 | &dev->core->i2c_adap); |
597 | if (dev->dvb.frontend != NULL) { | ||
598 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_thomson_dtt7579); | ||
599 | } | ||
607 | break; | 600 | break; |
608 | #endif | 601 | #endif |
609 | #ifdef HAVE_ZL10353 | 602 | #ifdef HAVE_ZL10353 |
@@ -612,12 +605,18 @@ static int dvb_register(struct cx8802_dev *dev) | |||
612 | dev->core->pll_desc = &dvb_pll_thomson_fe6600; | 605 | dev->core->pll_desc = &dvb_pll_thomson_fe6600; |
613 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid, | 606 | dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid, |
614 | &dev->core->i2c_adap); | 607 | &dev->core->i2c_adap); |
608 | if (dev->dvb.frontend != NULL) { | ||
609 | dev->dvb.frontend->ops->tuner_ops.set_params = dvico_hybrid_tuner_set_params; | ||
610 | } | ||
615 | break; | 611 | break; |
616 | #endif | 612 | #endif |
617 | #ifdef HAVE_OR51132 | 613 | #ifdef HAVE_OR51132 |
618 | case CX88_BOARD_PCHDTV_HD3000: | 614 | case CX88_BOARD_PCHDTV_HD3000: |
619 | dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, | 615 | dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, |
620 | &dev->core->i2c_adap); | 616 | &dev->core->i2c_adap); |
617 | if (dev->dvb.frontend != NULL) { | ||
618 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_thomson_dtt761x); | ||
619 | } | ||
621 | break; | 620 | break; |
622 | #endif | 621 | #endif |
623 | #ifdef HAVE_LGDT330X | 622 | #ifdef HAVE_LGDT330X |
@@ -638,6 +637,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
638 | dev->core->pll_desc = &dvb_pll_microtune_4042; | 637 | dev->core->pll_desc = &dvb_pll_microtune_4042; |
639 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, | 638 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, |
640 | &dev->core->i2c_adap); | 639 | &dev->core->i2c_adap); |
640 | if (dev->dvb.frontend != NULL) { | ||
641 | dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params; | ||
642 | } | ||
641 | } | 643 | } |
642 | break; | 644 | break; |
643 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T: | 645 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T: |
@@ -654,6 +656,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
654 | dev->core->pll_desc = &dvb_pll_thomson_dtt761x; | 656 | dev->core->pll_desc = &dvb_pll_thomson_dtt761x; |
655 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, | 657 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, |
656 | &dev->core->i2c_adap); | 658 | &dev->core->i2c_adap); |
659 | if (dev->dvb.frontend != NULL) { | ||
660 | dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params; | ||
661 | } | ||
657 | } | 662 | } |
658 | break; | 663 | break; |
659 | case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: | 664 | case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: |
@@ -668,6 +673,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
668 | mdelay(200); | 673 | mdelay(200); |
669 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, | 674 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, |
670 | &dev->core->i2c_adap); | 675 | &dev->core->i2c_adap); |
676 | if (dev->dvb.frontend != NULL) { | ||
677 | dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params; | ||
678 | } | ||
671 | } | 679 | } |
672 | break; | 680 | break; |
673 | case CX88_BOARD_PCHDTV_HD5500: | 681 | case CX88_BOARD_PCHDTV_HD5500: |
@@ -682,6 +690,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
682 | mdelay(200); | 690 | mdelay(200); |
683 | dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, | 691 | dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, |
684 | &dev->core->i2c_adap); | 692 | &dev->core->i2c_adap); |
693 | if (dev->dvb.frontend != NULL) { | ||
694 | dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params; | ||
695 | } | ||
685 | } | 696 | } |
686 | break; | 697 | break; |
687 | #endif | 698 | #endif |
@@ -689,6 +700,9 @@ static int dvb_register(struct cx8802_dev *dev) | |||
689 | case CX88_BOARD_ATI_HDTVWONDER: | 700 | case CX88_BOARD_ATI_HDTVWONDER: |
690 | dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder, | 701 | dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder, |
691 | &dev->core->i2c_adap); | 702 | &dev->core->i2c_adap); |
703 | if (dev->dvb.frontend != NULL) { | ||
704 | dvb_pll_attach(dev->dvb.frontend, 0x61, &dev->core->i2c_adap, &dvb_pll_tuv1236d); | ||
705 | } | ||
692 | break; | 706 | break; |
693 | #endif | 707 | #endif |
694 | #ifdef HAVE_CX24123 | 708 | #ifdef HAVE_CX24123 |