• Home
  • Raw
  • Download

Lines Matching refs:budget

44 #define budget_patch budget
64 static void gpio_Set22K (struct budget *budget, int state) in gpio_Set22K() argument
66 struct saa7146_dev *dev=budget->dev; in gpio_Set22K()
67 dprintk(2, "budget: %p\n", budget); in gpio_Set22K()
75 static void DiseqcSendBit (struct budget *budget, int data) in DiseqcSendBit() argument
77 struct saa7146_dev *dev=budget->dev; in DiseqcSendBit()
78 dprintk(2, "budget: %p\n", budget); in DiseqcSendBit()
86 static void DiseqcSendByte (struct budget *budget, int data) in DiseqcSendByte() argument
90 dprintk(2, "budget: %p\n", budget); in DiseqcSendByte()
95 DiseqcSendBit(budget, d); in DiseqcSendByte()
98 DiseqcSendBit(budget, par); in DiseqcSendByte()
101 static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long burst) in SendDiSEqCMsg() argument
103 struct saa7146_dev *dev=budget->dev; in SendDiSEqCMsg()
106 dprintk(2, "budget: %p\n", budget); in SendDiSEqCMsg()
112 DiseqcSendByte(budget, msg[i]); in SendDiSEqCMsg()
118 DiseqcSendByte(budget, 0xff); in SendDiSEqCMsg()
135 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_set_tone() local
139 gpio_Set22K (budget, 1); in budget_set_tone()
143 gpio_Set22K (budget, 0); in budget_set_tone()
155 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_diseqc_send_master_cmd() local
157 SendDiSEqCMsg (budget, cmd->msg_len, cmd->msg, 0); in budget_diseqc_send_master_cmd()
165 struct budget* budget = (struct budget*) fe->dvb->priv; in budget_diseqc_send_burst() local
167 SendDiSEqCMsg (budget, 0, NULL, minicmd); in budget_diseqc_send_burst()
172 static int budget_av7110_send_fw_cmd(struct budget_patch *budget, u16* buf, int length) in budget_av7110_send_fw_cmd() argument
176 dprintk(2, "budget: %p\n", budget); in budget_av7110_send_fw_cmd()
180 ttpci_budget_debiwrite(budget, DEBINOSWAP, COMMAND + 2*i, 2, (u32) buf[i], 0,0); in budget_av7110_send_fw_cmd()
184 ttpci_budget_debiwrite(budget, DEBINOSWAP, COMMAND + 2, 2, (u32) buf[1], 0,0); in budget_av7110_send_fw_cmd()
186 ttpci_budget_debiwrite(budget, DEBINOSWAP, COMMAND + 2, 2, 0, 0,0); in budget_av7110_send_fw_cmd()
188 ttpci_budget_debiwrite(budget, DEBINOSWAP, COMMAND, 2, (u32) buf[0], 0,0); in budget_av7110_send_fw_cmd()
193 static void av7110_set22k(struct budget_patch *budget, int state) in av7110_set22k() argument
197 dprintk(2, "budget: %p\n", budget); in av7110_set22k()
198 budget_av7110_send_fw_cmd(budget, buf, 2); in av7110_set22k()
201 static int av7110_send_diseqc_msg(struct budget_patch *budget, int len, u8 *msg, int burst) in av7110_send_diseqc_msg() argument
207 dprintk(2, "budget: %p\n", budget); in av7110_send_diseqc_msg()
223 budget_av7110_send_fw_cmd(budget, buf, 18); in av7110_send_diseqc_msg()
230 struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; in budget_patch_set_tone() local
234 av7110_set22k (budget, 1); in budget_patch_set_tone()
238 av7110_set22k (budget, 0); in budget_patch_set_tone()
250 struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; in budget_patch_diseqc_send_master_cmd() local
252 av7110_send_diseqc_msg (budget, cmd->msg_len, cmd->msg, 0); in budget_patch_diseqc_send_master_cmd()
260 struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; in budget_patch_diseqc_send_burst() local
262 av7110_send_diseqc_msg (budget, 0, NULL, minicmd); in budget_patch_diseqc_send_burst()
270 struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; in alps_bsrv2_tuner_set_params() local
298 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) in alps_bsrv2_tuner_set_params()
312 struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; in grundig_29504_451_tuner_set_params() local
325 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) in grundig_29504_451_tuner_set_params()
334 static void frontend_init(struct budget_patch* budget) in frontend_init() argument
336 switch(budget->dev->pci->subsystem_device) { in frontend_init()
341 budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); in frontend_init()
342 if (budget->dvb_frontend) { in frontend_init()
343 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; in frontend_init()
344 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; in frontend_init()
345 budget->dvb_frontend->ops.diseqc_send_burst = budget_patch_diseqc_send_burst; in frontend_init()
346 budget->dvb_frontend->ops.set_tone = budget_patch_set_tone; in frontend_init()
351 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); in frontend_init()
352 if (budget->dvb_frontend) { in frontend_init()
353 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; in frontend_init()
354 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
356 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; in frontend_init()
357 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; in frontend_init()
358 budget->dvb_frontend->ops.set_tone = budget_set_tone; in frontend_init()
363 budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap); in frontend_init()
364 if (budget->dvb_frontend) { in frontend_init()
365 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; in frontend_init()
366 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; in frontend_init()
367 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; in frontend_init()
368 budget->dvb_frontend->ops.set_tone = budget_set_tone; in frontend_init()
374 if (budget->dvb_frontend == NULL) { in frontend_init()
376 budget->dev->pci->vendor, in frontend_init()
377 budget->dev->pci->device, in frontend_init()
378 budget->dev->pci->subsystem_vendor, in frontend_init()
379 budget->dev->pci->subsystem_device); in frontend_init()
381 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { in frontend_init()
383 dvb_frontend_detach(budget->dvb_frontend); in frontend_init()
384 budget->dvb_frontend = NULL; in frontend_init()
392 struct budget_patch *budget; in budget_patch_attach() local
602 if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) in budget_patch_attach()
605 dprintk(2, "budget: %p\n", budget); in budget_patch_attach()
607 err = ttpci_budget_init(budget, dev, info, THIS_MODULE, adapter_nr); in budget_patch_attach()
609 kfree(budget); in budget_patch_attach()
621 saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 ); in budget_patch_attach()
628 dev->ext_priv = budget; in budget_patch_attach()
630 budget->dvb_adapter.priv = budget; in budget_patch_attach()
631 frontend_init(budget); in budget_patch_attach()
633 ttpci_budget_init_hooks(budget); in budget_patch_attach()
640 struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; in budget_patch_detach() local
643 if (budget->dvb_frontend) { in budget_patch_detach()
644 dvb_unregister_frontend(budget->dvb_frontend); in budget_patch_detach()
645 dvb_frontend_detach(budget->dvb_frontend); in budget_patch_detach()
647 err = ttpci_budget_deinit (budget); in budget_patch_detach()
649 kfree (budget); in budget_patch_detach()