diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 0266a3616ce8..95db017baddb 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -360,38 +360,6 @@ static struct or51132_config pchdtv_hd3000 = { | |||
360 | .set_ts_params = or51132_set_ts_param, | 360 | .set_ts_params = or51132_set_ts_param, |
361 | }; | 361 | }; |
362 | 362 | ||
363 | static int lgdt3302_tuner_set_params(struct dvb_frontend* fe, | ||
364 | struct dvb_frontend_parameters* params) | ||
365 | { | ||
366 | /* FIXME make this routine use the tuner-simple code. | ||
367 | * It could probably be shared with a number of ATSC | ||
368 | * frontends. Many share the same tuner with analog TV. */ | ||
369 | |||
370 | struct cx8802_dev *dev= fe->dvb->priv; | ||
371 | struct cx88_core *core = dev->core; | ||
372 | u8 buf[4]; | ||
373 | struct i2c_msg msg = | ||
374 | { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; | ||
375 | int err; | ||
376 | |||
377 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); | ||
378 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | ||
379 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | ||
380 | |||
381 | if (fe->ops.i2c_gate_ctrl) | ||
382 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
383 | if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { | ||
384 | printk(KERN_WARNING "cx88-dvb: %s error " | ||
385 | "(addr %02x <- %02x, err = %i)\n", | ||
386 | __FUNCTION__, buf[0], buf[1], err); | ||
387 | if (err < 0) | ||
388 | return err; | ||
389 | else | ||
390 | return -EREMOTEIO; | ||
391 | } | ||
392 | return 0; | ||
393 | } | ||
394 | |||
395 | static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) | 363 | static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) |
396 | { | 364 | { |
397 | struct cx8802_dev *dev= fe->dvb->priv; | 365 | struct cx8802_dev *dev= fe->dvb->priv; |
@@ -669,7 +637,8 @@ static int dvb_register(struct cx8802_dev *dev) | |||
669 | &fusionhdtv_3_gold, | 637 | &fusionhdtv_3_gold, |
670 | &dev->core->i2c_adap); | 638 | &dev->core->i2c_adap); |
671 | if (dev->dvb.frontend != NULL) { | 639 | if (dev->dvb.frontend != NULL) { |
672 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; | 640 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, dev->core->pll_addr, |
641 | &dev->core->i2c_adap, dev->core->pll_desc); | ||
673 | } | 642 | } |
674 | } | 643 | } |
675 | break; | 644 | break; |
@@ -689,7 +658,8 @@ static int dvb_register(struct cx8802_dev *dev) | |||
689 | &fusionhdtv_3_gold, | 658 | &fusionhdtv_3_gold, |
690 | &dev->core->i2c_adap); | 659 | &dev->core->i2c_adap); |
691 | if (dev->dvb.frontend != NULL) { | 660 | if (dev->dvb.frontend != NULL) { |
692 | dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; | 661 | dvb_attach(dvb_pll_attach, dev->dvb.frontend, dev->core->pll_addr, |
662 | &dev->core->i2c_adap, dev->core->pll_desc); | ||
693 | } | 663 | } |
694 | } | 664 | } |
695 | break; | 665 | break; |