Lines Matching refs:budget
45 static void Set22K (struct budget *budget, int state) in Set22K() argument
47 struct saa7146_dev *dev=budget->dev; in Set22K()
48 dprintk(2, "budget: %p\n", budget); in Set22K()
56 static void DiseqcSendBit (struct budget *budget, int data) in DiseqcSendBit() argument
58 struct saa7146_dev *dev=budget->dev; in DiseqcSendBit()
59 dprintk(2, "budget: %p\n", budget); in DiseqcSendBit()
67 static void DiseqcSendByte (struct budget *budget, int data) in DiseqcSendByte() argument
71 dprintk(2, "budget: %p\n", budget); in DiseqcSendByte()
76 DiseqcSendBit(budget, d); in DiseqcSendByte()
79 DiseqcSendBit(budget, par); in DiseqcSendByte()
82 static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long burst) in SendDiSEqCMsg() argument
84 struct saa7146_dev *dev=budget->dev; in SendDiSEqCMsg()
87 dprintk(2, "budget: %p\n", budget); in SendDiSEqCMsg()
93 DiseqcSendByte(budget, msg[i]); in SendDiSEqCMsg()
99 DiseqcSendByte(budget, 0xff); in SendDiSEqCMsg()
118 static int SetVoltage_Activy(struct budget *budget, in SetVoltage_Activy() argument
121 struct saa7146_dev *dev=budget->dev; in SetVoltage_Activy()
123 dprintk(2, "budget: %p\n", budget); in SetVoltage_Activy()
147 struct budget* budget = (struct budget*) fe->dvb->priv; in siemens_budget_set_voltage() local
149 return SetVoltage_Activy (budget, voltage); in siemens_budget_set_voltage()
155 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_set_tone() local
159 Set22K (budget, 1); in budget_set_tone()
163 Set22K (budget, 0); in budget_set_tone()
175 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_diseqc_send_master_cmd() local
177 SendDiSEqCMsg (budget, cmd->msg_len, cmd->msg, 0); in budget_diseqc_send_master_cmd()
185 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_diseqc_send_burst() local
187 SendDiSEqCMsg (budget, 0, NULL, minicmd); in budget_diseqc_send_burst()
195 struct budget* budget = (struct budget*) fe->dvb->priv; in alps_bsrv2_tuner_set_params() local
223 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in alps_bsrv2_tuner_set_params()
237 struct budget* budget = (struct budget*) fe->dvb->priv; in alps_tdbe2_tuner_set_params() local
251 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in alps_tdbe2_tuner_set_params()
265 struct budget *budget = fe->dvb->priv; in grundig_29504_401_tuner_set_params() local
306 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in grundig_29504_401_tuner_set_params()
323 struct budget* budget = (struct budget*) fe->dvb->priv; in grundig_29504_451_tuner_set_params() local
336 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in grundig_29504_451_tuner_set_params()
347 struct budget* budget = (struct budget*) fe->dvb->priv; in s5h1420_tuner_set_params() local
368 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in s5h1420_tuner_set_params()
408 struct budget *budget = (struct budget *)fe->dvb->priv; in alps_tdhd1_204_request_firmware() local
410 return request_firmware(fw, name, &budget->dev->pci->dev); in alps_tdhd1_204_request_firmware()
425 static u8 read_pwm(struct budget* budget) in read_pwm() argument
432 if ((i2c_transfer(&budget->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) in read_pwm()
477 static void frontend_init(struct budget *budget) in frontend_init() argument
481 switch(budget->dev->pci->subsystem_device) { in frontend_init()
485 budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); in frontend_init()
486 if (budget->dvb_frontend) { in frontend_init()
487 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; in frontend_init()
488 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; in frontend_init()
489 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; in frontend_init()
490 budget->dvb_frontend->ops.set_tone = budget_set_tone; in frontend_init()
495 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); in frontend_init()
496 if (budget->dvb_frontend) { in frontend_init()
497 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; in frontend_init()
498 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
499 if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) { in frontend_init()
500 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; in frontend_init()
501 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; in frontend_init()
502 budget->dvb_frontend->ops.set_tone = budget_set_tone; in frontend_init()
510 …budget->dvb_frontend = dvb_attach(ves1820_attach, &alps_tdbe2_config, &budget->i2c_adap, read_pwm(… in frontend_init()
511 if (budget->dvb_frontend) { in frontend_init()
512 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; in frontend_init()
519 budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap); in frontend_init()
520 if (budget->dvb_frontend) { in frontend_init()
521 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; in frontend_init()
522 budget->dvb_frontend->tuner_priv = NULL; in frontend_init()
528 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); in frontend_init()
529 if (budget->dvb_frontend) { in frontend_init()
531 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; in frontend_init()
532 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
539 int subtype = i2c_readreg(&budget->i2c_adap, 0x50, 0x67); in frontend_init()
546 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config_activy, &budget->i2c_adap); in frontend_init()
547 if (budget->dvb_frontend) { in frontend_init()
549 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; in frontend_init()
550 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
551 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; in frontend_init()
552 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; in frontend_init()
558 saa7146_setgpio(budget->dev, 3, SAA7146_GPIO_OUTLO); in frontend_init()
560 saa7146_setgpio(budget->dev, 3, SAA7146_GPIO_OUTHI); in frontend_init()
562 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsbe1_config_activy, &budget->i2c_adap); in frontend_init()
563 if (budget->dvb_frontend) { in frontend_init()
565 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; in frontend_init()
566 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
567 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; in frontend_init()
568 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; in frontend_init()
576 budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap); in frontend_init()
577 if (budget->dvb_frontend) { in frontend_init()
578 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; in frontend_init()
579 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; in frontend_init()
580 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; in frontend_init()
585 budget->dvb_frontend = dvb_attach(tda10046_attach, &alps_tdhd1_204a_config, &budget->i2c_adap); in frontend_init()
586 if (budget->dvb_frontend) { in frontend_init()
587 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdhd1_204a_tuner_set_params; in frontend_init()
588 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
593 …budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config_activy, &budget->i2c_ad… in frontend_init()
594 if (budget->dvb_frontend) { in frontend_init()
595 budget->dvb_frontend->tuner_priv = &tuner_address_grundig_29504_401_activy; in frontend_init()
596 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; in frontend_init()
604 fe = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap); in frontend_init()
607 budget->dvb_frontend = fe; in frontend_init()
608 if (dvb_attach(lnbp21_attach, fe, &budget->i2c_adap, in frontend_init()
622 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); in frontend_init()
624 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); in frontend_init()
627 fe = dvb_attach(tda10086_attach, &tda10086_config, &budget->i2c_adap); in frontend_init()
629 budget->dvb_frontend = fe; in frontend_init()
631 &budget->i2c_adap, 0) == NULL) in frontend_init()
634 &budget->i2c_adap, 0, 0) == NULL) { in frontend_init()
645 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); in frontend_init()
647 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); in frontend_init()
650 budget->dvb_frontend = dvb_attach(stv090x_attach, in frontend_init()
652 &budget->i2c_adap, in frontend_init()
655 if (budget->dvb_frontend) { in frontend_init()
658 budget->dvb_frontend, in frontend_init()
660 &budget->i2c_adap); in frontend_init()
678 if (budget->dvb_frontend->ops.init) in frontend_init()
679 budget->dvb_frontend->ops.init(budget->dvb_frontend); in frontend_init()
682 budget->dvb_frontend, in frontend_init()
683 &budget->i2c_adap, in frontend_init()
698 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); in frontend_init()
700 saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); in frontend_init()
703 budget->dvb_frontend = dvb_attach(stv090x_attach, in frontend_init()
705 &budget->i2c_adap, in frontend_init()
708 if (budget->dvb_frontend) { in frontend_init()
712 budget->dvb_frontend, in frontend_init()
714 &budget->i2c_adap); in frontend_init()
732 if (budget->dvb_frontend->ops.init) in frontend_init()
733 budget->dvb_frontend->ops.init(budget->dvb_frontend); in frontend_init()
736 budget->dvb_frontend, in frontend_init()
737 &budget->i2c_adap, in frontend_init()
753 if (budget->dvb_frontend == NULL) { in frontend_init()
755 budget->dev->pci->vendor, in frontend_init()
756 budget->dev->pci->device, in frontend_init()
757 budget->dev->pci->subsystem_vendor, in frontend_init()
758 budget->dev->pci->subsystem_device); in frontend_init()
760 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) in frontend_init()
767 dvb_frontend_detach(budget->dvb_frontend); in frontend_init()
768 budget->dvb_frontend = NULL; in frontend_init()
774 struct budget *budget = NULL; in budget_attach() local
777 budget = kmalloc(sizeof(struct budget), GFP_KERNEL); in budget_attach()
778 if( NULL == budget ) { in budget_attach()
782 dprintk(2, "dev:%p, info:%p, budget:%p\n", dev, info, budget); in budget_attach()
784 dev->ext_priv = budget; in budget_attach()
786 err = ttpci_budget_init(budget, dev, info, THIS_MODULE, adapter_nr); in budget_attach()
789 kfree (budget); in budget_attach()
793 budget->dvb_adapter.priv = budget; in budget_attach()
794 frontend_init(budget); in budget_attach()
796 ttpci_budget_init_hooks(budget); in budget_attach()
803 struct budget *budget = (struct budget*) dev->ext_priv; in budget_detach() local
806 if (budget->dvb_frontend) { in budget_detach()
807 dvb_unregister_frontend(budget->dvb_frontend); in budget_detach()
808 dvb_frontend_detach(budget->dvb_frontend); in budget_detach()
811 err = ttpci_budget_deinit (budget); in budget_detach()
813 kfree (budget); in budget_detach()