Merge branch 'work-fixes'

+105 -117
+5 -1
Documentation/dvb/bt8xx.txt
··· 111 111 If you have problems with this please do ask on the mailing list. 112 112 113 113 -- 114 - Authors: Richard Walker, Jamie Honan, Michael Hunold, Manu Abraham 114 + Authors: Richard Walker, 115 + Jamie Honan, 116 + Michael Hunold, 117 + Manu Abraham, 118 + Michael Krufky
+2 -2
Documentation/video4linux/CARDLIST.saa7134
··· 13 13 12 -> Medion 7134 [16be:0003] 14 14 13 -> Typhoon TV+Radio 90031 15 15 14 -> ELSA EX-VISION 300TV [1048:226b] 16 - 15 -> ELSA EX-VISION 500TV [1048:226b] 16 + 15 -> ELSA EX-VISION 500TV [1048:226a] 17 17 16 -> ASUS TV-FM 7134 [1043:4842,1043:4830,1043:4840] 18 18 17 -> AOPEN VA1000 POWER [1131:7133] 19 19 18 -> BMK MPEX No Tuner ··· 75 75 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212] 76 76 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] 77 77 76 -> SKNet MonsterTV Mobile [1131:4ee9] 78 - 77 -> Pinnacle PCTV 110i (saa7133) [11bd:002e] 78 + 77 -> Pinnacle PCTV 40i/50i/110i (saa7133) [11bd:002e] 79 79 78 -> ASUSTeK P7131 Dual [1043:4862] 80 80 79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B) 81 81 80 -> ASUS Digimatrix TV [1043:0210]
-1
MAINTAINERS
··· 838 838 839 839 DVB SUBSYSTEM AND DRIVERS 840 840 P: LinuxTV.org Project 841 - M: mchehab@infradead.org 842 841 M: v4l-dvb-maintainer@linuxtv.org 843 842 L: linux-dvb@linuxtv.org (subscription required) 844 843 W: http://linuxtv.org/
+1 -1
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
··· 526 526 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); 527 527 } else 528 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 530 ops = fc->fe->ops; 531 531 532 532 ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd;
+1 -1
drivers/media/dvb/bt8xx/bt878.c
··· 382 382 EXPORT_SYMBOL(bt878_device_control); 383 383 384 384 385 - struct cards card_list[] __devinitdata = { 385 + static struct cards card_list[] __devinitdata = { 386 386 387 387 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, 388 388 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
+1 -1
drivers/media/dvb/bt8xx/dst.c
··· 602 602 603 603 */ 604 604 605 - struct dst_types dst_tlist[] = { 605 + static struct dst_types dst_tlist[] = { 606 606 { 607 607 .device_id = "200103A", 608 608 .offset = 0,
+4 -4
drivers/media/dvb/dvb-usb/cxusb.c
··· 282 282 .pll_set = dvb_usb_pll_set_i2c, 283 283 }; 284 284 285 - static struct lgdt330x_config cxusb_lgdt330x_config = { 285 + static struct lgdt330x_config cxusb_lgdt3303_config = { 286 286 .demod_address = 0x0e, 287 287 .demod_chip = LGDT3303, 288 288 .pll_set = dvb_usb_pll_set_i2c, ··· 357 357 return -EIO; 358 358 } 359 359 360 - static int cxusb_lgdt330x_frontend_attach(struct dvb_usb_device *d) 360 + static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d) 361 361 { 362 362 if (usb_set_interface(d->udev,0,7) < 0) 363 363 err("set interface failed"); 364 364 365 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 368 return 0; 369 369 370 370 return -EIO; ··· 506 506 507 507 .streaming_ctrl = cxusb_streaming_ctrl, 508 508 .power_ctrl = cxusb_power_ctrl, 509 - .frontend_attach = cxusb_lgdt330x_frontend_attach, 509 + .frontend_attach = cxusb_lgdt3303_frontend_attach, 510 510 .tuner_attach = cxusb_lgh064f_tuner_attach, 511 511 512 512 .i2c_algo = &cxusb_i2c_algo,
+1 -1
drivers/media/dvb/frontends/Kconfig
··· 29 29 A DVB-S tuner module. Say Y when you want to support this frontend. 30 30 31 31 config DVB_MT312 32 - tristate "Zarlink MT312 based" 32 + tristate "Zarlink VP310/MT312 based" 33 33 depends on DVB_CORE 34 34 help 35 35 A DVB-S tuner module. Say Y when you want to support this frontend.
+44 -72
drivers/media/dvb/frontends/mt312.c
··· 612 612 kfree(state); 613 613 } 614 614 615 - static struct dvb_frontend_ops vp310_mt312_ops; 616 - 617 - struct 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 - 646 - error: 647 - kfree(state); 648 - return NULL; 649 - } 650 - 651 - struct 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 - 680 - error: 681 - kfree(state); 682 - return NULL; 683 - } 684 - 685 615 static struct dvb_frontend_ops vp310_mt312_ops = { 686 616 687 617 .info = { ··· 650 720 .set_voltage = mt312_set_voltage, 651 721 }; 652 722 723 + struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, 724 + struct i2c_adapter* i2c) 725 + { 726 + struct mt312_state* state = NULL; 727 + 728 + /* allocate memory for the internal state */ 729 + state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL); 730 + if (state == NULL) 731 + goto error; 732 + 733 + /* setup the state */ 734 + state->config = config; 735 + state->i2c = i2c; 736 + memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); 737 + 738 + /* check if the demod is there */ 739 + if (mt312_readreg(state, ID, &state->id) < 0) 740 + goto error; 741 + 742 + switch (state->id) { 743 + case ID_VP310: 744 + strcpy(state->ops.info.name, "Zarlink VP310 DVB-S"); 745 + state->frequency = 90; 746 + break; 747 + case ID_MT312: 748 + strcpy(state->ops.info.name, "Zarlink MT312 DVB-S"); 749 + state->frequency = 60; 750 + break; 751 + default: 752 + printk (KERN_WARNING "Only Zarlink VP310/MT312 are supported chips.\n"); 753 + goto error; 754 + } 755 + 756 + /* create dvb_frontend */ 757 + state->frontend.ops = &state->ops; 758 + state->frontend.demodulator_priv = state; 759 + return &state->frontend; 760 + 761 + error: 762 + kfree(state); 763 + return NULL; 764 + } 765 + 653 766 module_param(debug, int, 0644); 654 767 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); 655 768 ··· 700 727 MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>"); 701 728 MODULE_LICENSE("GPL"); 702 729 703 - EXPORT_SYMBOL(mt312_attach); 704 - EXPORT_SYMBOL(vp310_attach); 730 + EXPORT_SYMBOL(vp310_mt312_attach);
+2 -4
drivers/media/dvb/frontends/mt312.h
··· 38 38 int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); 39 39 }; 40 40 41 - extern struct dvb_frontend* mt312_attach(const struct mt312_config* config, 42 - struct i2c_adapter* i2c); 41 + struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, 42 + struct i2c_adapter* i2c); 43 43 44 - extern struct dvb_frontend* vp310_attach(const struct mt312_config* config, 45 - struct i2c_adapter* i2c); 46 44 47 45 #endif // MT312_H
-4
drivers/media/dvb/frontends/stv0297.c
··· 393 393 break; 394 394 395 395 case QAM_128: 396 - delay = 150; 397 - sweeprate = 1000; 398 - break; 399 - 400 396 case QAM_256: 401 397 delay = 200; 402 398 sweeprate = 500;
+4 -3
drivers/media/dvb/ttpci/av7110.c
··· 2477 2477 * The same behaviour of missing VSYNC can be duplicated on budget 2478 2478 * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. 2479 2479 */ 2480 - static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) 2480 + static int __devinit av7110_attach(struct saa7146_dev* dev, 2481 + struct saa7146_pci_extension_data *pci_ext) 2481 2482 { 2482 2483 const int length = TS_WIDTH * TS_HEIGHT; 2483 2484 struct pci_dev *pdev = dev->pci; ··· 2828 2827 goto out; 2829 2828 } 2830 2829 2831 - static int av7110_detach(struct saa7146_dev* saa) 2830 + static int __devexit av7110_detach(struct saa7146_dev* saa) 2832 2831 { 2833 2832 struct av7110 *av7110 = saa->ext_priv; 2834 2833 dprintk(4, "%p\n", av7110); ··· 2975 2974 .module = THIS_MODULE, 2976 2975 .pci_tbl = &pci_tbl[0], 2977 2976 .attach = av7110_attach, 2978 - .detach = av7110_detach, 2977 + .detach = __devexit_p(av7110_detach), 2979 2978 2980 2979 .irq_mask = MASK_19 | MASK_03 | MASK_10, 2981 2980 .irq_func = av7110_irq,
+2 -2
drivers/media/dvb/ttpci/av7110_ir.c
··· 208 208 } 209 209 210 210 211 - int __init av7110_ir_init(struct av7110 *av7110) 211 + int __devinit av7110_ir_init(struct av7110 *av7110) 212 212 { 213 213 static struct proc_dir_entry *e; 214 214 ··· 248 248 } 249 249 250 250 251 - void __exit av7110_ir_exit(struct av7110 *av7110) 251 + void __devexit av7110_ir_exit(struct av7110 *av7110) 252 252 { 253 253 int i; 254 254
+2 -2
drivers/media/video/cx25840/cx25840-core.c
··· 567 567 .type = V4L2_CTRL_TYPE_INTEGER, 568 568 .name = "Contrast", 569 569 .minimum = 0, 570 - .maximum = 255, 570 + .maximum = 127, 571 571 .step = 1, 572 572 .default_value = 64, 573 573 .flags = 0, ··· 576 576 .type = V4L2_CTRL_TYPE_INTEGER, 577 577 .name = "Saturation", 578 578 .minimum = 0, 579 - .maximum = 255, 579 + .maximum = 127, 580 580 .step = 1, 581 581 .default_value = 64, 582 582 .flags = 0,
+2 -2
drivers/media/video/saa7115.c
··· 1027 1027 .type = V4L2_CTRL_TYPE_INTEGER, 1028 1028 .name = "Contrast", 1029 1029 .minimum = 0, 1030 - .maximum = 255, 1030 + .maximum = 127, 1031 1031 .step = 1, 1032 1032 .default_value = 64, 1033 1033 .flags = 0, ··· 1036 1036 .type = V4L2_CTRL_TYPE_INTEGER, 1037 1037 .name = "Saturation", 1038 1038 .minimum = 0, 1039 - .maximum = 255, 1039 + .maximum = 127, 1040 1040 .step = 1, 1041 1041 .default_value = 64, 1042 1042 .flags = 0,
+3 -1
drivers/media/video/saa7134/saa7134-alsa.c
··· 54 54 55 55 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 56 56 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 57 - static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0}; 57 + static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; 58 58 59 59 module_param_array(index, int, NULL, 0444); 60 + module_param_array(enable, int, NULL, 0444); 60 61 MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); 62 + MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); 61 63 62 64 #define dprintk(fmt, arg...) if (debug) \ 63 65 printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg)
+15 -6
drivers/media/video/saa7134/saa7134-cards.c
··· 977 977 .radio_type = UNSET, 978 978 .tuner_addr = ADDR_UNSET, 979 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 981 .inputs = {{ 982 982 .name = name_tv, 983 983 .vmux = 3, ··· 1666 1666 .radio_type = UNSET, 1667 1667 .tuner_addr = ADDR_UNSET, 1668 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 1670 .mpeg = SAA7134_MPEG_DVB, 1671 1671 .inputs = {{ 1672 1672 .name = name_tv, ··· 2187 2187 .radio_type = UNSET, 2188 2188 .tuner_addr = 0x61, 2189 2189 .radio_addr = ADDR_UNSET, 2190 - .tda9887_conf = TDA9887_PRESENT, 2190 + .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, 2191 2191 .mpeg = SAA7134_MPEG_DVB, 2192 2192 .inputs = {{ 2193 2193 .name = name_tv, ··· 2211 2211 .radio_type = UNSET, 2212 2212 .tuner_addr = 0x61, 2213 2213 .radio_addr = ADDR_UNSET, 2214 - .tda9887_conf = TDA9887_PRESENT, 2214 + .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, 2215 2215 .mpeg = SAA7134_MPEG_DVB, 2216 2216 .inputs = {{ 2217 2217 .name = name_tv, ··· 2392 2392 }}, 2393 2393 }, 2394 2394 [SAA7134_BOARD_PINNACLE_PCTV_110i] = { 2395 - .name = "Pinnacle PCTV 110i (saa7133)", 2395 + .name = "Pinnacle PCTV 40i/50i/110i (saa7133)", 2396 2396 .audio_clock = 0x00187de7, 2397 2397 .tuner_type = TUNER_PHILIPS_TDA8290, 2398 2398 .radio_type = UNSET, ··· 2407 2407 },{ 2408 2408 .name = name_comp1, 2409 2409 .vmux = 1, 2410 + .amux = LINE2, 2411 + },{ 2412 + .name = name_comp2, 2413 + .vmux = 0, 2410 2414 .amux = LINE2, 2411 2415 },{ 2412 2416 .name = name_svideo, ··· 2749 2745 .vendor = PCI_VENDOR_ID_PHILIPS, 2750 2746 .device = PCI_DEVICE_ID_PHILIPS_SAA7130, 2751 2747 .subvendor = 0x1048, 2752 - .subdevice = 0x226b, 2748 + .subdevice = 0x226a, 2753 2749 .driver_data = SAA7134_BOARD_ELSA_500TV, 2754 2750 },{ 2755 2751 .vendor = PCI_VENDOR_ID_PHILIPS, ··· 3205 3201 /* power-up tuner chip */ 3206 3202 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); 3207 3203 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); 3204 + case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: 3205 + /* this turns the remote control chip off to work around a bug in it */ 3206 + saa_writeb(SAA7134_GPIO_GPMODE1, 0x80); 3207 + saa_writeb(SAA7134_GPIO_GPSTATUS1, 0x80); 3208 + break; 3208 3209 case SAA7134_BOARD_MONSTERTV_MOBILE: 3209 3210 /* power-up tuner chip */ 3210 3211 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000);
+8 -4
drivers/media/video/saa7134/saa7134-dvb.c
··· 110 110 mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); 111 111 mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); 112 112 mt352_write(fe, irq_cfg, sizeof(irq_cfg)); 113 + 113 114 return 0; 114 115 } 115 116 ··· 118 117 struct dvb_frontend_parameters* params, 119 118 u8* pllbuf) 120 119 { 121 - static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; 122 - static int off = TDA9887_PRESENT | TDA9887_PORT2_ACTIVE; 120 + u8 off[] = { 0x00, 0xf1}; 121 + u8 on[] = { 0x00, 0x71}; 122 + struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len = sizeof(off)}; 123 + 123 124 struct saa7134_dev *dev = fe->dvb->priv; 124 125 struct v4l2_frequency f; 125 126 ··· 129 126 f.tuner = 0; 130 127 f.type = V4L2_TUNER_DIGITAL_TV; 131 128 f.frequency = params->frequency / 1000 * 16 / 1000; 132 - saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on); 129 + i2c_transfer(&dev->i2c_adap, &msg, 1); 133 130 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); 134 - saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&off); 131 + msg.buf = on; 132 + i2c_transfer(&dev->i2c_adap, &msg, 1); 135 133 136 134 pinnacle_antenna_pwr(dev, antenna_pwr); 137 135
+5 -3
drivers/media/video/tda8290.c
··· 580 580 581 581 int tda8290_probe(struct i2c_client *c) 582 582 { 583 - unsigned char soft_reset[] = { 0x00, 0x00 }; 584 - unsigned char easy_mode_b[] = { 0x01, 0x02 }; 585 - unsigned char easy_mode_g[] = { 0x01, 0x04 }; 583 + unsigned char soft_reset[] = { 0x00, 0x00 }; 584 + unsigned char easy_mode_b[] = { 0x01, 0x02 }; 585 + unsigned char easy_mode_g[] = { 0x01, 0x04 }; 586 + unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 }; 586 587 unsigned char addr_dto_lsb = 0x07; 587 588 unsigned char data; 588 589 ··· 600 599 return 0; 601 600 } 602 601 } 602 + i2c_master_send(c, restore_9886, 3); 603 603 return -1; 604 604 } 605 605
+3 -2
drivers/media/video/tuner-core.c
··· 713 713 struct v4l2_frequency *f = arg; 714 714 715 715 switch_v4l2(); 716 - if (V4L2_TUNER_RADIO == f->type && 717 - V4L2_TUNER_RADIO != t->mode) { 716 + if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode) 717 + || (V4L2_TUNER_DIGITAL_TV == f->type 718 + && V4L2_TUNER_DIGITAL_TV != t->mode)) { 718 719 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") 719 720 == EINVAL) 720 721 return 0;