aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-fe-tuner.c2
-rw-r--r--drivers/media/dvb/bt8xx/bt878.c2
-rw-r--r--drivers/media/dvb/bt8xx/dst.c2
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c8
-rw-r--r--drivers/media/dvb/frontends/Kconfig2
-rw-r--r--drivers/media/dvb/frontends/mt312.c116
-rw-r--r--drivers/media/dvb/frontends/mt312.h6
-rw-r--r--drivers/media/dvb/frontends/stv0297.c4
-rw-r--r--drivers/media/dvb/ttpci/av7110.c7
-rw-r--r--drivers/media/dvb/ttpci/av7110_ir.c4
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c4
-rw-r--r--drivers/media/video/saa7115.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c21
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c12
-rw-r--r--drivers/media/video/tda8290.c8
-rw-r--r--drivers/media/video/tuner-core.c5
17 files changed, 98 insertions, 113 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index 390cc3a99ce6..9c7f122826e0 100644
--- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -526,7 +526,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
526 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); 526 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);
527 } else 527 } else
528 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ 528 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
529 if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { 529 if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
530 ops = fc->fe->ops; 530 ops = fc->fe->ops;
531 531
532 ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; 532 ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c
index 34c3189a1a33..356f447ee2ab 100644
--- a/drivers/media/dvb/bt8xx/bt878.c
+++ b/drivers/media/dvb/bt8xx/bt878.c
@@ -382,7 +382,7 @@ bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *
382EXPORT_SYMBOL(bt878_device_control); 382EXPORT_SYMBOL(bt878_device_control);
383 383
384 384
385struct cards card_list[] __devinitdata = { 385static struct cards card_list[] __devinitdata = {
386 386
387 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, 387 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
388 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, 388 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 3a2ff1cc24b7..0310e3dd07e6 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -602,7 +602,7 @@ static int dst_type_print(u8 type)
602 602
603*/ 603*/
604 604
605struct dst_types dst_tlist[] = { 605static struct dst_types dst_tlist[] = {
606 { 606 {
607 .device_id = "200103A", 607 .device_id = "200103A",
608 .offset = 0, 608 .offset = 0,
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index f327fac1688e..162f9795cd89 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -282,7 +282,7 @@ static struct cx22702_config cxusb_cx22702_config = {
282 .pll_set = dvb_usb_pll_set_i2c, 282 .pll_set = dvb_usb_pll_set_i2c,
283}; 283};
284 284
285static struct lgdt330x_config cxusb_lgdt330x_config = { 285static struct lgdt330x_config cxusb_lgdt3303_config = {
286 .demod_address = 0x0e, 286 .demod_address = 0x0e,
287 .demod_chip = LGDT3303, 287 .demod_chip = LGDT3303,
288 .pll_set = dvb_usb_pll_set_i2c, 288 .pll_set = dvb_usb_pll_set_i2c,
@@ -357,14 +357,14 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d)
357 return -EIO; 357 return -EIO;
358} 358}
359 359
360static int cxusb_lgdt330x_frontend_attach(struct dvb_usb_device *d) 360static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d)
361{ 361{
362 if (usb_set_interface(d->udev,0,7) < 0) 362 if (usb_set_interface(d->udev,0,7) < 0)
363 err("set interface failed"); 363 err("set interface failed");
364 364
365 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); 365 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
366 366
367 if ((d->fe = lgdt330x_attach(&cxusb_lgdt330x_config, &d->i2c_adap)) != NULL) 367 if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL)
368 return 0; 368 return 0;
369 369
370 return -EIO; 370 return -EIO;
@@ -506,7 +506,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = {
506 506
507 .streaming_ctrl = cxusb_streaming_ctrl, 507 .streaming_ctrl = cxusb_streaming_ctrl,
508 .power_ctrl = cxusb_power_ctrl, 508 .power_ctrl = cxusb_power_ctrl,
509 .frontend_attach = cxusb_lgdt330x_frontend_attach, 509 .frontend_attach = cxusb_lgdt3303_frontend_attach,
510 .tuner_attach = cxusb_lgh064f_tuner_attach, 510 .tuner_attach = cxusb_lgh064f_tuner_attach,
511 511
512 .i2c_algo = &cxusb_i2c_algo, 512 .i2c_algo = &cxusb_i2c_algo,
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
index 76b6a2aef32f..c676b1e23ab0 100644
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -29,7 +29,7 @@ config DVB_TDA8083
29 A DVB-S tuner module. Say Y when you want to support this frontend. 29 A DVB-S tuner module. Say Y when you want to support this frontend.
30 30
31config DVB_MT312 31config DVB_MT312
32 tristate "Zarlink MT312 based" 32 tristate "Zarlink VP310/MT312 based"
33 depends on DVB_CORE 33 depends on DVB_CORE
34 help 34 help
35 A DVB-S tuner module. Say Y when you want to support this frontend. 35 A DVB-S tuner module. Say Y when you want to support this frontend.
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c
index ec4e641acc64..d3aea83cf218 100644
--- a/drivers/media/dvb/frontends/mt312.c
+++ b/drivers/media/dvb/frontends/mt312.c
@@ -612,76 +612,6 @@ static void mt312_release(struct dvb_frontend* fe)
612 kfree(state); 612 kfree(state);
613} 613}
614 614
615static struct dvb_frontend_ops vp310_mt312_ops;
616
617struct dvb_frontend* vp310_attach(const struct mt312_config* config,
618 struct i2c_adapter* i2c)
619{
620 struct mt312_state* state = NULL;
621
622 /* allocate memory for the internal state */
623 state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
624 if (state == NULL)
625 goto error;
626
627 /* setup the state */
628 state->config = config;
629 state->i2c = i2c;
630 memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
631 strcpy(state->ops.info.name, "Zarlink VP310 DVB-S");
632
633 /* check if the demod is there */
634 if (mt312_readreg(state, ID, &state->id) < 0)
635 goto error;
636 if (state->id != ID_VP310) {
637 goto error;
638 }
639
640 /* create dvb_frontend */
641 state->frequency = 90;
642 state->frontend.ops = &state->ops;
643 state->frontend.demodulator_priv = state;
644 return &state->frontend;
645
646error:
647 kfree(state);
648 return NULL;
649}
650
651struct dvb_frontend* mt312_attach(const struct mt312_config* config,
652 struct i2c_adapter* i2c)
653{
654 struct mt312_state* state = NULL;
655
656 /* allocate memory for the internal state */
657 state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
658 if (state == NULL)
659 goto error;
660
661 /* setup the state */
662 state->config = config;
663 state->i2c = i2c;
664 memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
665 strcpy(state->ops.info.name, "Zarlink MT312 DVB-S");
666
667 /* check if the demod is there */
668 if (mt312_readreg(state, ID, &state->id) < 0)
669 goto error;
670 if (state->id != ID_MT312) {
671 goto error;
672 }
673
674 /* create dvb_frontend */
675 state->frequency = 60;
676 state->frontend.ops = &state->ops;
677 state->frontend.demodulator_priv = state;
678 return &state->frontend;
679
680error:
681 kfree(state);
682 return NULL;
683}
684
685static struct dvb_frontend_ops vp310_mt312_ops = { 615static struct dvb_frontend_ops vp310_mt312_ops = {
686 616
687 .info = { 617 .info = {
@@ -720,6 +650,49 @@ static struct dvb_frontend_ops vp310_mt312_ops = {
720 .set_voltage = mt312_set_voltage, 650 .set_voltage = mt312_set_voltage,
721}; 651};
722 652
653struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
654 struct i2c_adapter* i2c)
655{
656 struct mt312_state* state = NULL;
657
658 /* allocate memory for the internal state */
659 state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL);
660 if (state == NULL)
661 goto error;
662
663 /* setup the state */
664 state->config = config;
665 state->i2c = i2c;
666 memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
667
668 /* check if the demod is there */
669 if (mt312_readreg(state, ID, &state->id) < 0)
670 goto error;
671
672 switch (state->id) {
673 case ID_VP310:
674 strcpy(state->ops.info.name, "Zarlink VP310 DVB-S");
675 state->frequency = 90;
676 break;
677 case ID_MT312:
678 strcpy(state->ops.info.name, "Zarlink MT312 DVB-S");
679 state->frequency = 60;
680 break;
681 default:
682 printk (KERN_WARNING "Only Zarlink VP310/MT312 are supported chips.\n");
683 goto error;
684 }
685
686 /* create dvb_frontend */
687 state->frontend.ops = &state->ops;
688 state->frontend.demodulator_priv = state;
689 return &state->frontend;
690
691error:
692 kfree(state);
693 return NULL;
694}
695
723module_param(debug, int, 0644); 696module_param(debug, int, 0644);
724MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); 697MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
725 698
@@ -727,5 +700,4 @@ MODULE_DESCRIPTION("Zarlink VP310/MT312 DVB-S Demodulator driver");
727MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>"); 700MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>");
728MODULE_LICENSE("GPL"); 701MODULE_LICENSE("GPL");
729 702
730EXPORT_SYMBOL(mt312_attach); 703EXPORT_SYMBOL(vp310_mt312_attach);
731EXPORT_SYMBOL(vp310_attach);
diff --git a/drivers/media/dvb/frontends/mt312.h b/drivers/media/dvb/frontends/mt312.h
index b3a53a73a117..074d844f0139 100644
--- a/drivers/media/dvb/frontends/mt312.h
+++ b/drivers/media/dvb/frontends/mt312.h
@@ -38,10 +38,8 @@ struct mt312_config
38 int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); 38 int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
39}; 39};
40 40
41extern struct dvb_frontend* mt312_attach(const struct mt312_config* config, 41struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
42 struct i2c_adapter* i2c); 42 struct i2c_adapter* i2c);
43 43
44extern struct dvb_frontend* vp310_attach(const struct mt312_config* config,
45 struct i2c_adapter* i2c);
46 44
47#endif // MT312_H 45#endif // MT312_H
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c
index 6122ba754bc5..eb15676d374f 100644
--- a/drivers/media/dvb/frontends/stv0297.c
+++ b/drivers/media/dvb/frontends/stv0297.c
@@ -393,10 +393,6 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
393 break; 393 break;
394 394
395 case QAM_128: 395 case QAM_128:
396 delay = 150;
397 sweeprate = 1000;
398 break;
399
400 case QAM_256: 396 case QAM_256:
401 delay = 200; 397 delay = 200;
402 sweeprate = 500; 398 sweeprate = 500;
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index d36369e9e88f..cdf7b2c33ad0 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -2477,7 +2477,8 @@ static int frontend_init(struct av7110 *av7110)
2477 * The same behaviour of missing VSYNC can be duplicated on budget 2477 * The same behaviour of missing VSYNC can be duplicated on budget
2478 * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. 2478 * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble.
2479 */ 2479 */
2480static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) 2480static int __devinit av7110_attach(struct saa7146_dev* dev,
2481 struct saa7146_pci_extension_data *pci_ext)
2481{ 2482{
2482 const int length = TS_WIDTH * TS_HEIGHT; 2483 const int length = TS_WIDTH * TS_HEIGHT;
2483 struct pci_dev *pdev = dev->pci; 2484 struct pci_dev *pdev = dev->pci;
@@ -2827,7 +2828,7 @@ err_kfree_0:
2827 goto out; 2828 goto out;
2828} 2829}
2829 2830
2830static int av7110_detach(struct saa7146_dev* saa) 2831static int __devexit av7110_detach(struct saa7146_dev* saa)
2831{ 2832{
2832 struct av7110 *av7110 = saa->ext_priv; 2833 struct av7110 *av7110 = saa->ext_priv;
2833 dprintk(4, "%p\n", av7110); 2834 dprintk(4, "%p\n", av7110);
@@ -2974,7 +2975,7 @@ static struct saa7146_extension av7110_extension = {
2974 .module = THIS_MODULE, 2975 .module = THIS_MODULE,
2975 .pci_tbl = &pci_tbl[0], 2976 .pci_tbl = &pci_tbl[0],
2976 .attach = av7110_attach, 2977 .attach = av7110_attach,
2977 .detach = av7110_detach, 2978 .detach = __devexit_p(av7110_detach),
2978 2979
2979 .irq_mask = MASK_19 | MASK_03 | MASK_10, 2980 .irq_mask = MASK_19 | MASK_03 | MASK_10,
2980 .irq_func = av7110_irq, 2981 .irq_func = av7110_irq,
diff --git a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c
index 617e4f6c0ed7..d54bbcdde2cc 100644
--- a/drivers/media/dvb/ttpci/av7110_ir.c
+++ b/drivers/media/dvb/ttpci/av7110_ir.c
@@ -208,7 +208,7 @@ static void ir_handler(struct av7110 *av7110, u32 ircom)
208} 208}
209 209
210 210
211int __init av7110_ir_init(struct av7110 *av7110) 211int __devinit av7110_ir_init(struct av7110 *av7110)
212{ 212{
213 static struct proc_dir_entry *e; 213 static struct proc_dir_entry *e;
214 214
@@ -248,7 +248,7 @@ int __init av7110_ir_init(struct av7110 *av7110)
248} 248}
249 249
250 250
251void __exit av7110_ir_exit(struct av7110 *av7110) 251void __devexit av7110_ir_exit(struct av7110 *av7110)
252{ 252{
253 int i; 253 int i;
254 254
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 08ffd1f325fc..5588b9a5c430 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -567,7 +567,7 @@ static struct v4l2_queryctrl cx25840_qctrl[] = {
567 .type = V4L2_CTRL_TYPE_INTEGER, 567 .type = V4L2_CTRL_TYPE_INTEGER,
568 .name = "Contrast", 568 .name = "Contrast",
569 .minimum = 0, 569 .minimum = 0,
570 .maximum = 255, 570 .maximum = 127,
571 .step = 1, 571 .step = 1,
572 .default_value = 64, 572 .default_value = 64,
573 .flags = 0, 573 .flags = 0,
@@ -576,7 +576,7 @@ static struct v4l2_queryctrl cx25840_qctrl[] = {
576 .type = V4L2_CTRL_TYPE_INTEGER, 576 .type = V4L2_CTRL_TYPE_INTEGER,
577 .name = "Saturation", 577 .name = "Saturation",
578 .minimum = 0, 578 .minimum = 0,
579 .maximum = 255, 579 .maximum = 127,
580 .step = 1, 580 .step = 1,
581 .default_value = 64, 581 .default_value = 64,
582 .flags = 0, 582 .flags = 0,
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 048d000941c7..ffd87ce55556 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1027,7 +1027,7 @@ static struct v4l2_queryctrl saa7115_qctrl[] = {
1027 .type = V4L2_CTRL_TYPE_INTEGER, 1027 .type = V4L2_CTRL_TYPE_INTEGER,
1028 .name = "Contrast", 1028 .name = "Contrast",
1029 .minimum = 0, 1029 .minimum = 0,
1030 .maximum = 255, 1030 .maximum = 127,
1031 .step = 1, 1031 .step = 1,
1032 .default_value = 64, 1032 .default_value = 64,
1033 .flags = 0, 1033 .flags = 0,
@@ -1036,7 +1036,7 @@ static struct v4l2_queryctrl saa7115_qctrl[] = {
1036 .type = V4L2_CTRL_TYPE_INTEGER, 1036 .type = V4L2_CTRL_TYPE_INTEGER,
1037 .name = "Saturation", 1037 .name = "Saturation",
1038 .minimum = 0, 1038 .minimum = 0,
1039 .maximum = 255, 1039 .maximum = 127,
1040 .step = 1, 1040 .step = 1,
1041 .default_value = 64, 1041 .default_value = 64,
1042 .flags = 0, 1042 .flags = 0,
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index a7a6ab9298a9..7df5e0826e12 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -54,10 +54,12 @@ MODULE_PARM_DESC(debug,"enable debug messages [alsa]");
54 54
55static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 55static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
56static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 56static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
57static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0}; 57static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1};
58 58
59module_param_array(index, int, NULL, 0444); 59module_param_array(index, int, NULL, 0444);
60module_param_array(enable, int, NULL, 0444);
60MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); 61MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s).");
62MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s).");
61 63
62#define dprintk(fmt, arg...) if (debug) \ 64#define dprintk(fmt, arg...) if (debug) \
63 printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) 65 printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg)
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 5a35d3b6550d..6bc63a4086c1 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -977,7 +977,7 @@ struct saa7134_board saa7134_boards[] = {
977 .radio_type = UNSET, 977 .radio_type = UNSET,
978 .tuner_addr = ADDR_UNSET, 978 .tuner_addr = ADDR_UNSET,
979 .radio_addr = ADDR_UNSET, 979 .radio_addr = ADDR_UNSET,
980 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, 980 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
981 .inputs = {{ 981 .inputs = {{
982 .name = name_tv, 982 .name = name_tv,
983 .vmux = 3, 983 .vmux = 3,
@@ -1666,7 +1666,7 @@ struct saa7134_board saa7134_boards[] = {
1666 .radio_type = UNSET, 1666 .radio_type = UNSET,
1667 .tuner_addr = ADDR_UNSET, 1667 .tuner_addr = ADDR_UNSET,
1668 .radio_addr = ADDR_UNSET, 1668 .radio_addr = ADDR_UNSET,
1669 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, 1669 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE,
1670 .mpeg = SAA7134_MPEG_DVB, 1670 .mpeg = SAA7134_MPEG_DVB,
1671 .inputs = {{ 1671 .inputs = {{
1672 .name = name_tv, 1672 .name = name_tv,
@@ -2187,7 +2187,7 @@ struct saa7134_board saa7134_boards[] = {
2187 .radio_type = UNSET, 2187 .radio_type = UNSET,
2188 .tuner_addr = 0x61, 2188 .tuner_addr = 0x61,
2189 .radio_addr = ADDR_UNSET, 2189 .radio_addr = ADDR_UNSET,
2190 .tda9887_conf = TDA9887_PRESENT, 2190 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE,
2191 .mpeg = SAA7134_MPEG_DVB, 2191 .mpeg = SAA7134_MPEG_DVB,
2192 .inputs = {{ 2192 .inputs = {{
2193 .name = name_tv, 2193 .name = name_tv,
@@ -2211,7 +2211,7 @@ struct saa7134_board saa7134_boards[] = {
2211 .radio_type = UNSET, 2211 .radio_type = UNSET,
2212 .tuner_addr = 0x61, 2212 .tuner_addr = 0x61,
2213 .radio_addr = ADDR_UNSET, 2213 .radio_addr = ADDR_UNSET,
2214 .tda9887_conf = TDA9887_PRESENT, 2214 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE,
2215 .mpeg = SAA7134_MPEG_DVB, 2215 .mpeg = SAA7134_MPEG_DVB,
2216 .inputs = {{ 2216 .inputs = {{
2217 .name = name_tv, 2217 .name = name_tv,
@@ -2392,7 +2392,7 @@ struct saa7134_board saa7134_boards[] = {
2392 }}, 2392 }},
2393 }, 2393 },
2394 [SAA7134_BOARD_PINNACLE_PCTV_110i] = { 2394 [SAA7134_BOARD_PINNACLE_PCTV_110i] = {
2395 .name = "Pinnacle PCTV 110i (saa7133)", 2395 .name = "Pinnacle PCTV 40i/50i/110i (saa7133)",
2396 .audio_clock = 0x00187de7, 2396 .audio_clock = 0x00187de7,
2397 .tuner_type = TUNER_PHILIPS_TDA8290, 2397 .tuner_type = TUNER_PHILIPS_TDA8290,
2398 .radio_type = UNSET, 2398 .radio_type = UNSET,
@@ -2407,6 +2407,10 @@ struct saa7134_board saa7134_boards[] = {
2407 },{ 2407 },{
2408 .name = name_comp1, 2408 .name = name_comp1,
2409 .vmux = 1, 2409 .vmux = 1,
2410 .amux = LINE2,
2411 },{
2412 .name = name_comp2,
2413 .vmux = 0,
2410 .amux = LINE2, 2414 .amux = LINE2,
2411 },{ 2415 },{
2412 .name = name_svideo, 2416 .name = name_svideo,
@@ -2745,7 +2749,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
2745 .vendor = PCI_VENDOR_ID_PHILIPS, 2749 .vendor = PCI_VENDOR_ID_PHILIPS,
2746 .device = PCI_DEVICE_ID_PHILIPS_SAA7130, 2750 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
2747 .subvendor = 0x1048, 2751 .subvendor = 0x1048,
2748 .subdevice = 0x226b, 2752 .subdevice = 0x226a,
2749 .driver_data = SAA7134_BOARD_ELSA_500TV, 2753 .driver_data = SAA7134_BOARD_ELSA_500TV,
2750 },{ 2754 },{
2751 .vendor = PCI_VENDOR_ID_PHILIPS, 2755 .vendor = PCI_VENDOR_ID_PHILIPS,
@@ -3201,6 +3205,11 @@ int saa7134_board_init1(struct saa7134_dev *dev)
3201 /* power-up tuner chip */ 3205 /* power-up tuner chip */
3202 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); 3206 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000);
3203 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); 3207 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000);
3208 case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
3209 /* this turns the remote control chip off to work around a bug in it */
3210 saa_writeb(SAA7134_GPIO_GPMODE1, 0x80);
3211 saa_writeb(SAA7134_GPIO_GPSTATUS1, 0x80);
3212 break;
3204 case SAA7134_BOARD_MONSTERTV_MOBILE: 3213 case SAA7134_BOARD_MONSTERTV_MOBILE:
3205 /* power-up tuner chip */ 3214 /* power-up tuner chip */
3206 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); 3215 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000);
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 1a536e865277..9db8e13f21c3 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -110,6 +110,7 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe)
110 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); 110 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg));
111 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); 111 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg));
112 mt352_write(fe, irq_cfg, sizeof(irq_cfg)); 112 mt352_write(fe, irq_cfg, sizeof(irq_cfg));
113
113 return 0; 114 return 0;
114} 115}
115 116
@@ -117,8 +118,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
117 struct dvb_frontend_parameters* params, 118 struct dvb_frontend_parameters* params,
118 u8* pllbuf) 119 u8* pllbuf)
119{ 120{
120 static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; 121 u8 off[] = { 0x00, 0xf1};
121 static int off = TDA9887_PRESENT | TDA9887_PORT2_ACTIVE; 122 u8 on[] = { 0x00, 0x71};
123 struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len = sizeof(off)};
124
122 struct saa7134_dev *dev = fe->dvb->priv; 125 struct saa7134_dev *dev = fe->dvb->priv;
123 struct v4l2_frequency f; 126 struct v4l2_frequency f;
124 127
@@ -126,9 +129,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe,
126 f.tuner = 0; 129 f.tuner = 0;
127 f.type = V4L2_TUNER_DIGITAL_TV; 130 f.type = V4L2_TUNER_DIGITAL_TV;
128 f.frequency = params->frequency / 1000 * 16 / 1000; 131 f.frequency = params->frequency / 1000 * 16 / 1000;
129 saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on); 132 i2c_transfer(&dev->i2c_adap, &msg, 1);
130 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); 133 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f);
131 saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&off); 134 msg.buf = on;
135 i2c_transfer(&dev->i2c_adap, &msg, 1);
132 136
133 pinnacle_antenna_pwr(dev, antenna_pwr); 137 pinnacle_antenna_pwr(dev, antenna_pwr);
134 138
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index 7b4fb282ac82..a796a4e1917c 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -580,9 +580,10 @@ int tda8290_init(struct i2c_client *c)
580 580
581int tda8290_probe(struct i2c_client *c) 581int tda8290_probe(struct i2c_client *c)
582{ 582{
583 unsigned char soft_reset[] = { 0x00, 0x00 }; 583 unsigned char soft_reset[] = { 0x00, 0x00 };
584 unsigned char easy_mode_b[] = { 0x01, 0x02 }; 584 unsigned char easy_mode_b[] = { 0x01, 0x02 };
585 unsigned char easy_mode_g[] = { 0x01, 0x04 }; 585 unsigned char easy_mode_g[] = { 0x01, 0x04 };
586 unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 };
586 unsigned char addr_dto_lsb = 0x07; 587 unsigned char addr_dto_lsb = 0x07;
587 unsigned char data; 588 unsigned char data;
588 589
@@ -599,6 +600,7 @@ int tda8290_probe(struct i2c_client *c)
599 return 0; 600 return 0;
600 } 601 }
601 } 602 }
603 i2c_master_send(c, restore_9886, 3);
602 return -1; 604 return -1;
603} 605}
604 606
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index e7ee619d62c5..b6101bf446d4 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -713,8 +713,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
713 struct v4l2_frequency *f = arg; 713 struct v4l2_frequency *f = arg;
714 714
715 switch_v4l2(); 715 switch_v4l2();
716 if (V4L2_TUNER_RADIO == f->type && 716 if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode)
717 V4L2_TUNER_RADIO != t->mode) { 717 || (V4L2_TUNER_DIGITAL_TV == f->type
718 && V4L2_TUNER_DIGITAL_TV != t->mode)) {
718 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") 719 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
719 == EINVAL) 720 == EINVAL)
720 return 0; 721 return 0;