diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 15 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 24 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 12 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-core.c | 57 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 5 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.h | 7 |
10 files changed, 93 insertions, 38 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 59ac35ddd51e..57b34cda99f5 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -526,7 +526,9 @@ static int dvb_frontend_thread(void *data) | |||
526 | fepriv->delay = 3*HZ; | 526 | fepriv->delay = 3*HZ; |
527 | fepriv->status = 0; | 527 | fepriv->status = 0; |
528 | fepriv->wakeup = 0; | 528 | fepriv->wakeup = 0; |
529 | fepriv->reinitialise = 1; | 529 | fepriv->reinitialise = 0; |
530 | |||
531 | dvb_frontend_init(fe); | ||
530 | 532 | ||
531 | while (1) { | 533 | while (1) { |
532 | up(&fepriv->sem); /* is locked when we enter the thread... */ | 534 | up(&fepriv->sem); /* is locked when we enter the thread... */ |
@@ -1013,17 +1015,18 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) | |||
1013 | return ret; | 1015 | return ret; |
1014 | 1016 | ||
1015 | if ((file->f_flags & O_ACCMODE) != O_RDONLY) { | 1017 | if ((file->f_flags & O_ACCMODE) != O_RDONLY) { |
1018 | |||
1019 | /* normal tune mode when opened R/W */ | ||
1020 | fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT; | ||
1021 | fepriv->tone = -1; | ||
1022 | fepriv->voltage = -1; | ||
1023 | |||
1016 | ret = dvb_frontend_start (fe); | 1024 | ret = dvb_frontend_start (fe); |
1017 | if (ret) | 1025 | if (ret) |
1018 | dvb_generic_release (inode, file); | 1026 | dvb_generic_release (inode, file); |
1019 | 1027 | ||
1020 | /* empty event queue */ | 1028 | /* empty event queue */ |
1021 | fepriv->events.eventr = fepriv->events.eventw = 0; | 1029 | fepriv->events.eventr = fepriv->events.eventw = 0; |
1022 | |||
1023 | /* normal tune mode when opened R/W */ | ||
1024 | fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT; | ||
1025 | fepriv->tone = -1; | ||
1026 | fepriv->voltage = -1; | ||
1027 | } | 1030 | } |
1028 | 1031 | ||
1029 | return ret; | 1032 | return ret; |
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index a189683454b7..2be33f27c69f 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -194,11 +194,11 @@ struct dvb_pll_desc dvb_pll_tda665x = { | |||
194 | { 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ }, | 194 | { 253834000, 36249333, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ }, |
195 | { 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ }, | 195 | { 383834000, 36249333, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ }, |
196 | { 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ }, | 196 | { 443834000, 36249333, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ }, |
197 | { 444000000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ }, | 197 | { 444000000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ }, |
198 | { 583834000, 36249333, 166667, 0xca, 0x63 /* 011 0 0 0 11 */ }, | 198 | { 583834000, 36249333, 166667, 0xca, 0x64 /* 011 0 0 1 00 */ }, |
199 | { 793834000, 36249333, 166667, 0xca, 0xa3 /* 101 0 0 0 11 */ }, | 199 | { 793834000, 36249333, 166667, 0xca, 0xa4 /* 101 0 0 1 00 */ }, |
200 | { 444834000, 36249333, 166667, 0xca, 0xc3 /* 110 0 0 0 11 */ }, | 200 | { 444834000, 36249333, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ }, |
201 | { 861000000, 36249333, 166667, 0xca, 0xe3 /* 111 0 0 0 11 */ }, | 201 | { 861000000, 36249333, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ }, |
202 | } | 202 | } |
203 | }; | 203 | }; |
204 | EXPORT_SYMBOL(dvb_pll_tda665x); | 204 | EXPORT_SYMBOL(dvb_pll_tda665x); |
@@ -613,7 +613,21 @@ static struct dvb_tuner_ops dvb_pll_tuner_ops = { | |||
613 | 613 | ||
614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) | 614 | int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) |
615 | { | 615 | { |
616 | u8 b1 [] = { 0 }; | ||
617 | struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 }; | ||
616 | struct dvb_pll_priv *priv = NULL; | 618 | struct dvb_pll_priv *priv = NULL; |
619 | int ret; | ||
620 | |||
621 | if (i2c != NULL) { | ||
622 | if (fe->ops.i2c_gate_ctrl) | ||
623 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
624 | |||
625 | ret = i2c_transfer (i2c, &msg, 1); | ||
626 | if (ret != 1) | ||
627 | return -1; | ||
628 | if (fe->ops.i2c_gate_ctrl) | ||
629 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
630 | } | ||
617 | 631 | ||
618 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); | 632 | priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); |
619 | if (priv == NULL) | 633 | if (priv == NULL) |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 500f15c10aaf..4506165c5de2 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -2203,8 +2203,8 @@ static int frontend_init(struct av7110 *av7110) | |||
2203 | av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; | 2203 | av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; |
2204 | 2204 | ||
2205 | /* set TDA9819 into DVB mode */ | 2205 | /* set TDA9819 into DVB mode */ |
2206 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) | 2206 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) |
2207 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) | 2207 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) |
2208 | 2208 | ||
2209 | /* tuner on this needs a slower i2c bus speed */ | 2209 | /* tuner on this needs a slower i2c bus speed */ |
2210 | av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; | 2210 | av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; |
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index 64055461559d..6ffe53fdcf57 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -272,8 +272,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
272 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) | 272 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) |
273 | dprintk(1, "setting band in demodulator failed.\n"); | 273 | dprintk(1, "setting band in demodulator failed.\n"); |
274 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 274 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
275 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD) | 275 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD) |
276 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF) | 276 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF) |
277 | } | 277 | } |
278 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) | 278 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) |
279 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); | 279 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); |
@@ -308,8 +308,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
308 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) | 308 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) |
309 | dprintk(1, "setting band in demodulator failed.\n"); | 309 | dprintk(1, "setting band in demodulator failed.\n"); |
310 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 310 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
311 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) | 311 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) |
312 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) | 312 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) |
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
@@ -750,8 +750,8 @@ int av7110_init_analog_module(struct av7110 *av7110) | |||
750 | if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) | 750 | if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) |
751 | dprintk(1, "setting band in demodulator failed.\n"); | 751 | dprintk(1, "setting band in demodulator failed.\n"); |
752 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 752 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
753 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) | 753 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) |
754 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) | 754 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) |
755 | } | 755 | } |
756 | 756 | ||
757 | /* init the saa7113 */ | 757 | /* init the saa7113 */ |
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 5f111d407730..2d21fec23b4d 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -1303,6 +1303,9 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1303 | budget_av->budget.dvb_adapter.priv = budget_av; | 1303 | budget_av->budget.dvb_adapter.priv = budget_av; |
1304 | frontend_init(budget_av); | 1304 | frontend_init(budget_av); |
1305 | ciintf_init(budget_av); | 1305 | ciintf_init(budget_av); |
1306 | |||
1307 | ttpci_budget_init_hooks(&budget_av->budget); | ||
1308 | |||
1306 | return 0; | 1309 | return 0; |
1307 | } | 1310 | } |
1308 | 1311 | ||
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index 4b966eea3834..ffbbb3e34be4 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -1101,6 +1101,8 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1101 | budget_ci->budget.dvb_adapter.priv = budget_ci; | 1101 | budget_ci->budget.dvb_adapter.priv = budget_ci; |
1102 | frontend_init(budget_ci); | 1102 | frontend_init(budget_ci); |
1103 | 1103 | ||
1104 | ttpci_budget_init_hooks(&budget_ci->budget); | ||
1105 | |||
1104 | return 0; | 1106 | return 0; |
1105 | } | 1107 | } |
1106 | 1108 | ||
diff --git a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c index e4cf7775e07f..e15562f81664 100644 --- a/drivers/media/dvb/ttpci/budget-core.c +++ b/drivers/media/dvb/ttpci/budget-core.c | |||
@@ -63,9 +63,6 @@ static int stop_ts_capture(struct budget *budget) | |||
63 | { | 63 | { |
64 | dprintk(2, "budget: %p\n", budget); | 64 | dprintk(2, "budget: %p\n", budget); |
65 | 65 | ||
66 | if (--budget->feeding) | ||
67 | return budget->feeding; | ||
68 | |||
69 | saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off | 66 | saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off |
70 | SAA7146_IER_DISABLE(budget->dev, MASK_10); | 67 | SAA7146_IER_DISABLE(budget->dev, MASK_10); |
71 | return 0; | 68 | return 0; |
@@ -77,8 +74,8 @@ static int start_ts_capture(struct budget *budget) | |||
77 | 74 | ||
78 | dprintk(2, "budget: %p\n", budget); | 75 | dprintk(2, "budget: %p\n", budget); |
79 | 76 | ||
80 | if (budget->feeding) | 77 | if (!budget->feeding || !budget->fe_synced) |
81 | return ++budget->feeding; | 78 | return 0; |
82 | 79 | ||
83 | saa7146_write(dev, MC1, MASK_20); // DMA3 off | 80 | saa7146_write(dev, MC1, MASK_20); // DMA3 off |
84 | 81 | ||
@@ -139,7 +136,33 @@ static int start_ts_capture(struct budget *budget) | |||
139 | SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */ | 136 | SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */ |
140 | saa7146_write(dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */ | 137 | saa7146_write(dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */ |
141 | 138 | ||
142 | return ++budget->feeding; | 139 | return 0; |
140 | } | ||
141 | |||
142 | static int budget_read_fe_status(struct dvb_frontend *fe, fe_status_t *status) | ||
143 | { | ||
144 | struct budget *budget = (struct budget *) fe->dvb->priv; | ||
145 | int synced; | ||
146 | int ret; | ||
147 | |||
148 | if (budget->read_fe_status) | ||
149 | ret = budget->read_fe_status(fe, status); | ||
150 | else | ||
151 | ret = -EINVAL; | ||
152 | |||
153 | if (!ret) { | ||
154 | synced = (*status & FE_HAS_LOCK); | ||
155 | if (synced != budget->fe_synced) { | ||
156 | budget->fe_synced = synced; | ||
157 | spin_lock(&budget->feedlock); | ||
158 | if (synced) | ||
159 | start_ts_capture(budget); | ||
160 | else | ||
161 | stop_ts_capture(budget); | ||
162 | spin_unlock(&budget->feedlock); | ||
163 | } | ||
164 | } | ||
165 | return ret; | ||
143 | } | 166 | } |
144 | 167 | ||
145 | static void vpeirq(unsigned long data) | 168 | static void vpeirq(unsigned long data) |
@@ -267,7 +290,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed) | |||
267 | { | 290 | { |
268 | struct dvb_demux *demux = feed->demux; | 291 | struct dvb_demux *demux = feed->demux; |
269 | struct budget *budget = (struct budget *) demux->priv; | 292 | struct budget *budget = (struct budget *) demux->priv; |
270 | int status; | 293 | int status = 0; |
271 | 294 | ||
272 | dprintk(2, "budget: %p\n", budget); | 295 | dprintk(2, "budget: %p\n", budget); |
273 | 296 | ||
@@ -276,7 +299,8 @@ static int budget_start_feed(struct dvb_demux_feed *feed) | |||
276 | 299 | ||
277 | spin_lock(&budget->feedlock); | 300 | spin_lock(&budget->feedlock); |
278 | feed->pusi_seen = 0; /* have a clean section start */ | 301 | feed->pusi_seen = 0; /* have a clean section start */ |
279 | status = start_ts_capture(budget); | 302 | if (budget->feeding++ == 0) |
303 | status = start_ts_capture(budget); | ||
280 | spin_unlock(&budget->feedlock); | 304 | spin_unlock(&budget->feedlock); |
281 | return status; | 305 | return status; |
282 | } | 306 | } |
@@ -285,12 +309,13 @@ static int budget_stop_feed(struct dvb_demux_feed *feed) | |||
285 | { | 309 | { |
286 | struct dvb_demux *demux = feed->demux; | 310 | struct dvb_demux *demux = feed->demux; |
287 | struct budget *budget = (struct budget *) demux->priv; | 311 | struct budget *budget = (struct budget *) demux->priv; |
288 | int status; | 312 | int status = 0; |
289 | 313 | ||
290 | dprintk(2, "budget: %p\n", budget); | 314 | dprintk(2, "budget: %p\n", budget); |
291 | 315 | ||
292 | spin_lock(&budget->feedlock); | 316 | spin_lock(&budget->feedlock); |
293 | status = stop_ts_capture(budget); | 317 | if (--budget->feeding == 0) |
318 | status = stop_ts_capture(budget); | ||
294 | spin_unlock(&budget->feedlock); | 319 | spin_unlock(&budget->feedlock); |
295 | return status; | 320 | return status; |
296 | } | 321 | } |
@@ -470,6 +495,14 @@ err: | |||
470 | return ret; | 495 | return ret; |
471 | } | 496 | } |
472 | 497 | ||
498 | void ttpci_budget_init_hooks(struct budget *budget) | ||
499 | { | ||
500 | if (budget->dvb_frontend && !budget->read_fe_status) { | ||
501 | budget->read_fe_status = budget->dvb_frontend->ops.read_status; | ||
502 | budget->dvb_frontend->ops.read_status = budget_read_fe_status; | ||
503 | } | ||
504 | } | ||
505 | |||
473 | int ttpci_budget_deinit(struct budget *budget) | 506 | int ttpci_budget_deinit(struct budget *budget) |
474 | { | 507 | { |
475 | struct saa7146_dev *dev = budget->dev; | 508 | struct saa7146_dev *dev = budget->dev; |
@@ -508,11 +541,8 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port) | |||
508 | spin_lock(&budget->feedlock); | 541 | spin_lock(&budget->feedlock); |
509 | budget->video_port = video_port; | 542 | budget->video_port = video_port; |
510 | if (budget->feeding) { | 543 | if (budget->feeding) { |
511 | int oldfeeding = budget->feeding; | ||
512 | budget->feeding = 1; | ||
513 | stop_ts_capture(budget); | 544 | stop_ts_capture(budget); |
514 | start_ts_capture(budget); | 545 | start_ts_capture(budget); |
515 | budget->feeding = oldfeeding; | ||
516 | } | 546 | } |
517 | spin_unlock(&budget->feedlock); | 547 | spin_unlock(&budget->feedlock); |
518 | } | 548 | } |
@@ -520,6 +550,7 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port) | |||
520 | EXPORT_SYMBOL_GPL(ttpci_budget_debiread); | 550 | EXPORT_SYMBOL_GPL(ttpci_budget_debiread); |
521 | EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite); | 551 | EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite); |
522 | EXPORT_SYMBOL_GPL(ttpci_budget_init); | 552 | EXPORT_SYMBOL_GPL(ttpci_budget_init); |
553 | EXPORT_SYMBOL_GPL(ttpci_budget_init_hooks); | ||
523 | EXPORT_SYMBOL_GPL(ttpci_budget_deinit); | 554 | EXPORT_SYMBOL_GPL(ttpci_budget_deinit); |
524 | EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler); | 555 | EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler); |
525 | EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port); | 556 | EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port); |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index ee60ce90a400..57227441891e 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -617,6 +617,8 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
617 | budget->dvb_adapter.priv = budget; | 617 | budget->dvb_adapter.priv = budget; |
618 | frontend_init(budget); | 618 | frontend_init(budget); |
619 | 619 | ||
620 | ttpci_budget_init_hooks(budget); | ||
621 | |||
620 | return 0; | 622 | return 0; |
621 | } | 623 | } |
622 | 624 | ||
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 35761f13c12b..863dffb4ed8e 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -375,9 +375,6 @@ static void frontend_init(struct budget *budget) | |||
375 | if (budget->dvb_frontend) { | 375 | if (budget->dvb_frontend) { |
376 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 376 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
377 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 377 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
378 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | ||
379 | budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; | ||
380 | budget->dvb_frontend->ops.set_tone = budget_set_tone; | ||
381 | break; | 378 | break; |
382 | } | 379 | } |
383 | break; | 380 | break; |
@@ -474,6 +471,8 @@ static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_ | |||
474 | budget->dvb_adapter.priv = budget; | 471 | budget->dvb_adapter.priv = budget; |
475 | frontend_init(budget); | 472 | frontend_init(budget); |
476 | 473 | ||
474 | ttpci_budget_init_hooks(budget); | ||
475 | |||
477 | return 0; | 476 | return 0; |
478 | } | 477 | } |
479 | 478 | ||
diff --git a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h index ecea3a13030e..e8a5c79178e1 100644 --- a/drivers/media/dvb/ttpci/budget.h +++ b/drivers/media/dvb/ttpci/budget.h | |||
@@ -52,9 +52,6 @@ struct budget { | |||
52 | struct dmx_frontend hw_frontend; | 52 | struct dmx_frontend hw_frontend; |
53 | struct dmx_frontend mem_frontend; | 53 | struct dmx_frontend mem_frontend; |
54 | 54 | ||
55 | int fe_synced; | ||
56 | struct mutex pid_mutex; | ||
57 | |||
58 | int ci_present; | 55 | int ci_present; |
59 | int video_port; | 56 | int video_port; |
60 | 57 | ||
@@ -74,6 +71,9 @@ struct budget { | |||
74 | 71 | ||
75 | struct dvb_adapter dvb_adapter; | 72 | struct dvb_adapter dvb_adapter; |
76 | struct dvb_frontend *dvb_frontend; | 73 | struct dvb_frontend *dvb_frontend; |
74 | int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status); | ||
75 | int fe_synced; | ||
76 | |||
77 | void *priv; | 77 | void *priv; |
78 | }; | 78 | }; |
79 | 79 | ||
@@ -106,6 +106,7 @@ static struct saa7146_pci_extension_data x_var = { \ | |||
106 | extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, | 106 | extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, |
107 | struct saa7146_pci_extension_data *info, | 107 | struct saa7146_pci_extension_data *info, |
108 | struct module *owner); | 108 | struct module *owner); |
109 | extern void ttpci_budget_init_hooks(struct budget *budget); | ||
109 | extern int ttpci_budget_deinit(struct budget *budget); | 110 | extern int ttpci_budget_deinit(struct budget *budget); |
110 | extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); | 111 | extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); |
111 | extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port); | 112 | extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port); |