diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 04:01:31 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:00:42 -0400 |
commit | dea74869f3c62b0b7addd67017b22b394e942aac (patch) | |
tree | d1a597caea6615c76f34896cc832fd1371f2e776 /drivers/media/video/saa7134/saa7134-dvb.c | |
parent | 332bed5fc25ab0eb84215ecd89a4acd48219eee0 (diff) |
V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a pointer field inside dvb_frontend
The dvb_frontend_ops is a pointer inside dvb_frontend. That's why every demod-driver
is having a field of dvb_frontend_ops in its private-state-struct and
using the reference for filling the pointer-field in dvb_frontend.
- It saves at least two lines of code per demod-driver,
- reduces object size (one less dereference per frontend_ops-access),
- be coherent with dvb_tuner_ops,
- makes it a little bit easier for newbies to understand how it works and
- avoids stupid mistakes because you would have to copy the dvb_frontend_ops
always, before you could assign the static pointer directly, which was
dangerous.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 716b829c460f..279828b8f299 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -146,13 +146,13 @@ static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe, | |||
146 | f.tuner = 0; | 146 | f.tuner = 0; |
147 | f.type = V4L2_TUNER_DIGITAL_TV; | 147 | f.type = V4L2_TUNER_DIGITAL_TV; |
148 | f.frequency = params->frequency / 1000 * 16 / 1000; | 148 | f.frequency = params->frequency / 1000 * 16 / 1000; |
149 | if (fe->ops->i2c_gate_ctrl) | 149 | if (fe->ops.i2c_gate_ctrl) |
150 | fe->ops->i2c_gate_ctrl(fe, 1); | 150 | fe->ops.i2c_gate_ctrl(fe, 1); |
151 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 151 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
152 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); | 152 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); |
153 | msg.buf = on; | 153 | msg.buf = on; |
154 | if (fe->ops->i2c_gate_ctrl) | 154 | if (fe->ops.i2c_gate_ctrl) |
155 | fe->ops->i2c_gate_ctrl(fe, 1); | 155 | fe->ops.i2c_gate_ctrl(fe, 1); |
156 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 156 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
157 | 157 | ||
158 | pinnacle_antenna_pwr(dev, antenna_pwr); | 158 | pinnacle_antenna_pwr(dev, antenna_pwr); |
@@ -266,8 +266,8 @@ static int philips_tda6651_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb_ | |||
266 | tuner_buf[2] = 0xca; | 266 | tuner_buf[2] = 0xca; |
267 | tuner_buf[3] = (cp << 5) | (filter << 3) | band; | 267 | tuner_buf[3] = (cp << 5) | (filter << 3) | band; |
268 | 268 | ||
269 | if (fe->ops->i2c_gate_ctrl) | 269 | if (fe->ops.i2c_gate_ctrl) |
270 | fe->ops->i2c_gate_ctrl(fe, 1); | 270 | fe->ops.i2c_gate_ctrl(fe, 1); |
271 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) | 271 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) |
272 | return -EIO; | 272 | return -EIO; |
273 | msleep(1); | 273 | msleep(1); |
@@ -281,8 +281,8 @@ static int philips_tda6651_pll_init(u8 addr, struct dvb_frontend *fe) | |||
281 | struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; | 281 | struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; |
282 | 282 | ||
283 | /* setup PLL configuration */ | 283 | /* setup PLL configuration */ |
284 | if (fe->ops->i2c_gate_ctrl) | 284 | if (fe->ops.i2c_gate_ctrl) |
285 | fe->ops->i2c_gate_ctrl(fe, 1); | 285 | fe->ops.i2c_gate_ctrl(fe, 1); |
286 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) | 286 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) |
287 | return -EIO; | 287 | return -EIO; |
288 | msleep(1); | 288 | msleep(1); |
@@ -352,8 +352,8 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe) | |||
352 | struct i2c_msg init_msg = {.addr = 0x61,.flags = 0,.buf = msg,.len = sizeof(msg) }; | 352 | struct i2c_msg init_msg = {.addr = 0x61,.flags = 0,.buf = msg,.len = sizeof(msg) }; |
353 | 353 | ||
354 | /* setup PLL configuration */ | 354 | /* setup PLL configuration */ |
355 | if (fe->ops->i2c_gate_ctrl) | 355 | if (fe->ops.i2c_gate_ctrl) |
356 | fe->ops->i2c_gate_ctrl(fe, 1); | 356 | fe->ops.i2c_gate_ctrl(fe, 1); |
357 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) | 357 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) |
358 | return -EIO; | 358 | return -EIO; |
359 | msleep(1); | 359 | msleep(1); |
@@ -363,8 +363,8 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe) | |||
363 | init_msg.len = 0x02; | 363 | init_msg.len = 0x02; |
364 | msg[0] = 0x00; | 364 | msg[0] = 0x00; |
365 | msg[1] = 0x40; | 365 | msg[1] = 0x40; |
366 | if (fe->ops->i2c_gate_ctrl) | 366 | if (fe->ops.i2c_gate_ctrl) |
367 | fe->ops->i2c_gate_ctrl(fe, 1); | 367 | fe->ops.i2c_gate_ctrl(fe, 1); |
368 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) | 368 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) |
369 | return -EIO; | 369 | return -EIO; |
370 | 370 | ||
@@ -391,8 +391,8 @@ static int philips_europa_tuner_sleep(struct dvb_frontend *fe) | |||
391 | analog_msg.len = 0x02; | 391 | analog_msg.len = 0x02; |
392 | msg[0] = 0x00; | 392 | msg[0] = 0x00; |
393 | msg[1] = 0x14; | 393 | msg[1] = 0x14; |
394 | if (fe->ops->i2c_gate_ctrl) | 394 | if (fe->ops.i2c_gate_ctrl) |
395 | fe->ops->i2c_gate_ctrl(fe, 1); | 395 | fe->ops.i2c_gate_ctrl(fe, 1); |
396 | i2c_transfer(&dev->i2c_adap, &analog_msg, 1); | 396 | i2c_transfer(&dev->i2c_adap, &analog_msg, 1); |
397 | return 0; | 397 | return 0; |
398 | } | 398 | } |
@@ -403,7 +403,7 @@ static int philips_europa_demod_sleep(struct dvb_frontend *fe) | |||
403 | 403 | ||
404 | if (dev->original_demod_sleep) | 404 | if (dev->original_demod_sleep) |
405 | dev->original_demod_sleep(fe); | 405 | dev->original_demod_sleep(fe); |
406 | fe->ops->i2c_gate_ctrl(fe, 1); | 406 | fe->ops.i2c_gate_ctrl(fe, 1); |
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | 409 | ||
@@ -427,8 +427,8 @@ static int philips_fmd1216_tuner_init(struct dvb_frontend *fe) | |||
427 | static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 }; | 427 | static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 }; |
428 | struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; | 428 | struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; |
429 | 429 | ||
430 | if (fe->ops->i2c_gate_ctrl) | 430 | if (fe->ops.i2c_gate_ctrl) |
431 | fe->ops->i2c_gate_ctrl(fe, 1); | 431 | fe->ops.i2c_gate_ctrl(fe, 1); |
432 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) | 432 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) |
433 | return -EIO; | 433 | return -EIO; |
434 | msleep(1); | 434 | msleep(1); |
@@ -443,14 +443,14 @@ static int philips_fmd1216_tuner_sleep(struct dvb_frontend *fe) | |||
443 | static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 }; | 443 | static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 }; |
444 | struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; | 444 | struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; |
445 | 445 | ||
446 | if (fe->ops->i2c_gate_ctrl) | 446 | if (fe->ops.i2c_gate_ctrl) |
447 | fe->ops->i2c_gate_ctrl(fe, 1); | 447 | fe->ops.i2c_gate_ctrl(fe, 1); |
448 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); | 448 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); |
449 | msleep(1); | 449 | msleep(1); |
450 | fmd1216_init[2] = 0x86; | 450 | fmd1216_init[2] = 0x86; |
451 | fmd1216_init[3] = 0x54; | 451 | fmd1216_init[3] = 0x54; |
452 | if (fe->ops->i2c_gate_ctrl) | 452 | if (fe->ops.i2c_gate_ctrl) |
453 | fe->ops->i2c_gate_ctrl(fe, 1); | 453 | fe->ops.i2c_gate_ctrl(fe, 1); |
454 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); | 454 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); |
455 | msleep(1); | 455 | msleep(1); |
456 | return 0; | 456 | return 0; |
@@ -533,8 +533,8 @@ static int philips_fmd1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_ | |||
533 | tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4; | 533 | tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4; |
534 | tuner_buf[3] = 0x40 | band; | 534 | tuner_buf[3] = 0x40 | band; |
535 | 535 | ||
536 | if (fe->ops->i2c_gate_ctrl) | 536 | if (fe->ops.i2c_gate_ctrl) |
537 | fe->ops->i2c_gate_ctrl(fe, 1); | 537 | fe->ops.i2c_gate_ctrl(fe, 1); |
538 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) | 538 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) |
539 | return -EIO; | 539 | return -EIO; |
540 | return 0; | 540 | return 0; |
@@ -646,8 +646,8 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_ | |||
646 | tuner_buf[13] = 0x40; | 646 | tuner_buf[13] = 0x40; |
647 | 647 | ||
648 | tuner_msg.len = 14; | 648 | tuner_msg.len = 14; |
649 | if (fe->ops->i2c_gate_ctrl) | 649 | if (fe->ops.i2c_gate_ctrl) |
650 | fe->ops->i2c_gate_ctrl(fe, 1); | 650 | fe->ops.i2c_gate_ctrl(fe, 1); |
651 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) | 651 | if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) |
652 | return -EIO; | 652 | return -EIO; |
653 | 653 | ||
@@ -656,8 +656,8 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_ | |||
656 | tuner_buf[0] = 0x30; | 656 | tuner_buf[0] = 0x30; |
657 | tuner_buf[1] = 0x50 + tda827x_dvbt[i].cp; | 657 | tuner_buf[1] = 0x50 + tda827x_dvbt[i].cp; |
658 | tuner_msg.len = 2; | 658 | tuner_msg.len = 2; |
659 | if (fe->ops->i2c_gate_ctrl) | 659 | if (fe->ops.i2c_gate_ctrl) |
660 | fe->ops->i2c_gate_ctrl(fe, 1); | 660 | fe->ops.i2c_gate_ctrl(fe, 1); |
661 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); | 661 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); |
662 | 662 | ||
663 | return 0; | 663 | return 0; |
@@ -669,8 +669,8 @@ static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe) | |||
669 | static u8 tda827x_sleep[] = { 0x30, 0xd0}; | 669 | static u8 tda827x_sleep[] = { 0x30, 0xd0}; |
670 | struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep, | 670 | struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep, |
671 | .len = sizeof(tda827x_sleep) }; | 671 | .len = sizeof(tda827x_sleep) }; |
672 | if (fe->ops->i2c_gate_ctrl) | 672 | if (fe->ops.i2c_gate_ctrl) |
673 | fe->ops->i2c_gate_ctrl(fe, 1); | 673 | fe->ops.i2c_gate_ctrl(fe, 1); |
674 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); | 674 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); |
675 | return 0; | 675 | return 0; |
676 | } | 676 | } |
@@ -773,8 +773,8 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb | |||
773 | tuner_buf[12] = 0x00; | 773 | tuner_buf[12] = 0x00; |
774 | tuner_buf[13] = 0x39; // lpsel | 774 | tuner_buf[13] = 0x39; // lpsel |
775 | msg.len = 14; | 775 | msg.len = 14; |
776 | if (fe->ops->i2c_gate_ctrl) | 776 | if (fe->ops.i2c_gate_ctrl) |
777 | fe->ops->i2c_gate_ctrl(fe, 1); | 777 | fe->ops.i2c_gate_ctrl(fe, 1); |
778 | if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) | 778 | if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) |
779 | return -EIO; | 779 | return -EIO; |
780 | 780 | ||
@@ -782,14 +782,14 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb | |||
782 | msg.len = 2; | 782 | msg.len = 2; |
783 | reg2[0] = 0x60; | 783 | reg2[0] = 0x60; |
784 | reg2[1] = 0x3c; | 784 | reg2[1] = 0x3c; |
785 | if (fe->ops->i2c_gate_ctrl) | 785 | if (fe->ops.i2c_gate_ctrl) |
786 | fe->ops->i2c_gate_ctrl(fe, 1); | 786 | fe->ops.i2c_gate_ctrl(fe, 1); |
787 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 787 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
788 | 788 | ||
789 | reg2[0] = 0xa0; | 789 | reg2[0] = 0xa0; |
790 | reg2[1] = 0x40; | 790 | reg2[1] = 0x40; |
791 | if (fe->ops->i2c_gate_ctrl) | 791 | if (fe->ops.i2c_gate_ctrl) |
792 | fe->ops->i2c_gate_ctrl(fe, 1); | 792 | fe->ops.i2c_gate_ctrl(fe, 1); |
793 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 793 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
794 | 794 | ||
795 | msleep(2); | 795 | msleep(2); |
@@ -797,15 +797,15 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb | |||
797 | reg2[0] = 0x30; | 797 | reg2[0] = 0x30; |
798 | reg2[1] = 0x10 + tda827xa_dvbt[i].scr; | 798 | reg2[1] = 0x10 + tda827xa_dvbt[i].scr; |
799 | msg.len = 2; | 799 | msg.len = 2; |
800 | if (fe->ops->i2c_gate_ctrl) | 800 | if (fe->ops.i2c_gate_ctrl) |
801 | fe->ops->i2c_gate_ctrl(fe, 1); | 801 | fe->ops.i2c_gate_ctrl(fe, 1); |
802 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 802 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
803 | 803 | ||
804 | msleep(550); | 804 | msleep(550); |
805 | reg2[0] = 0x50; | 805 | reg2[0] = 0x50; |
806 | reg2[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4); | 806 | reg2[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4); |
807 | if (fe->ops->i2c_gate_ctrl) | 807 | if (fe->ops.i2c_gate_ctrl) |
808 | fe->ops->i2c_gate_ctrl(fe, 1); | 808 | fe->ops.i2c_gate_ctrl(fe, 1); |
809 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 809 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
810 | 810 | ||
811 | return 0; | 811 | return 0; |
@@ -818,8 +818,8 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe) | |||
818 | static u8 tda827xa_sleep[] = { 0x30, 0x90}; | 818 | static u8 tda827xa_sleep[] = { 0x30, 0x90}; |
819 | struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tda827xa_sleep, | 819 | struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tda827xa_sleep, |
820 | .len = sizeof(tda827xa_sleep) }; | 820 | .len = sizeof(tda827xa_sleep) }; |
821 | if (fe->ops->i2c_gate_ctrl) | 821 | if (fe->ops.i2c_gate_ctrl) |
822 | fe->ops->i2c_gate_ctrl(fe, 1); | 822 | fe->ops.i2c_gate_ctrl(fe, 1); |
823 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); | 823 | i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); |
824 | return 0; | 824 | return 0; |
825 | } | 825 | } |
@@ -1015,7 +1015,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1015 | dev->dvb.frontend = mt352_attach(&pinnacle_300i, | 1015 | dev->dvb.frontend = mt352_attach(&pinnacle_300i, |
1016 | &dev->i2c_adap); | 1016 | &dev->i2c_adap); |
1017 | if (dev->dvb.frontend) { | 1017 | if (dev->dvb.frontend) { |
1018 | dev->dvb.frontend->ops->tuner_ops.set_params = mt352_pinnacle_tuner_set_params; | 1018 | dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params; |
1019 | } | 1019 | } |
1020 | break; | 1020 | break; |
1021 | 1021 | ||
@@ -1024,7 +1024,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1024 | dev->dvb.frontend = mt352_attach(&avermedia_777, | 1024 | dev->dvb.frontend = mt352_attach(&avermedia_777, |
1025 | &dev->i2c_adap); | 1025 | &dev->i2c_adap); |
1026 | if (dev->dvb.frontend) { | 1026 | if (dev->dvb.frontend) { |
1027 | dev->dvb.frontend->ops->tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; | 1027 | dev->dvb.frontend->ops.tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; |
1028 | } | 1028 | } |
1029 | break; | 1029 | break; |
1030 | #endif | 1030 | #endif |
@@ -1033,124 +1033,124 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1033 | dev->dvb.frontend = tda10046_attach(&medion_cardbus, | 1033 | dev->dvb.frontend = tda10046_attach(&medion_cardbus, |
1034 | &dev->i2c_adap); | 1034 | &dev->i2c_adap); |
1035 | if (dev->dvb.frontend) { | 1035 | if (dev->dvb.frontend) { |
1036 | dev->dvb.frontend->ops->tuner_ops.init = philips_fmd1216_tuner_init; | 1036 | dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; |
1037 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_fmd1216_tuner_sleep; | 1037 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep; |
1038 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_fmd1216_tuner_set_params; | 1038 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; |
1039 | } | 1039 | } |
1040 | break; | 1040 | break; |
1041 | case SAA7134_BOARD_PHILIPS_TOUGH: | 1041 | case SAA7134_BOARD_PHILIPS_TOUGH: |
1042 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config, | 1042 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config, |
1043 | &dev->i2c_adap); | 1043 | &dev->i2c_adap); |
1044 | if (dev->dvb.frontend) { | 1044 | if (dev->dvb.frontend) { |
1045 | dev->dvb.frontend->ops->tuner_ops.init = philips_tu1216_tuner_60_init; | 1045 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_60_init; |
1046 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tu1216_tuner_60_set_params; | 1046 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_60_set_params; |
1047 | } | 1047 | } |
1048 | break; | 1048 | break; |
1049 | case SAA7134_BOARD_FLYDVBTDUO: | 1049 | case SAA7134_BOARD_FLYDVBTDUO: |
1050 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1050 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, |
1051 | &dev->i2c_adap); | 1051 | &dev->i2c_adap); |
1052 | if (dev->dvb.frontend) { | 1052 | if (dev->dvb.frontend) { |
1053 | dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; | 1053 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
1054 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; | 1054 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; |
1055 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; | 1055 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; |
1056 | } | 1056 | } |
1057 | break; | 1057 | break; |
1058 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: | 1058 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: |
1059 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1059 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, |
1060 | &dev->i2c_adap); | 1060 | &dev->i2c_adap); |
1061 | if (dev->dvb.frontend) { | 1061 | if (dev->dvb.frontend) { |
1062 | dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; | 1062 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
1063 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; | 1063 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; |
1064 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; | 1064 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; |
1065 | } | 1065 | } |
1066 | break; | 1066 | break; |
1067 | case SAA7134_BOARD_PHILIPS_EUROPA: | 1067 | case SAA7134_BOARD_PHILIPS_EUROPA: |
1068 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, | 1068 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, |
1069 | &dev->i2c_adap); | 1069 | &dev->i2c_adap); |
1070 | if (dev->dvb.frontend) { | 1070 | if (dev->dvb.frontend) { |
1071 | dev->original_demod_sleep = dev->dvb.frontend->ops->sleep; | 1071 | dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; |
1072 | dev->dvb.frontend->ops->sleep = philips_europa_demod_sleep; | 1072 | dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep; |
1073 | dev->dvb.frontend->ops->tuner_ops.init = philips_europa_tuner_init; | 1073 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; |
1074 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_europa_tuner_sleep; | 1074 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; |
1075 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_td1316_tuner_set_params; | 1075 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; |
1076 | } | 1076 | } |
1077 | break; | 1077 | break; |
1078 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: | 1078 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: |
1079 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, | 1079 | dev->dvb.frontend = tda10046_attach(&philips_europa_config, |
1080 | &dev->i2c_adap); | 1080 | &dev->i2c_adap); |
1081 | if (dev->dvb.frontend) { | 1081 | if (dev->dvb.frontend) { |
1082 | dev->dvb.frontend->ops->tuner_ops.init = philips_europa_tuner_init; | 1082 | dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; |
1083 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_europa_tuner_sleep; | 1083 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; |
1084 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_td1316_tuner_set_params; | 1084 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; |
1085 | } | 1085 | } |
1086 | break; | 1086 | break; |
1087 | case SAA7134_BOARD_VIDEOMATE_DVBT_200: | 1087 | case SAA7134_BOARD_VIDEOMATE_DVBT_200: |
1088 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config, | 1088 | dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config, |
1089 | &dev->i2c_adap); | 1089 | &dev->i2c_adap); |
1090 | if (dev->dvb.frontend) { | 1090 | if (dev->dvb.frontend) { |
1091 | dev->dvb.frontend->ops->tuner_ops.init = philips_tu1216_tuner_61_init; | 1091 | dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_61_init; |
1092 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tu1216_tuner_61_set_params; | 1092 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_61_set_params; |
1093 | } | 1093 | } |
1094 | break; | 1094 | break; |
1095 | case SAA7134_BOARD_PHILIPS_TIGER: | 1095 | case SAA7134_BOARD_PHILIPS_TIGER: |
1096 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, | 1096 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, |
1097 | &dev->i2c_adap); | 1097 | &dev->i2c_adap); |
1098 | if (dev->dvb.frontend) { | 1098 | if (dev->dvb.frontend) { |
1099 | dev->dvb.frontend->ops->tuner_ops.init = philips_tiger_tuner_init; | 1099 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; |
1100 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_tiger_tuner_sleep; | 1100 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; |
1101 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tiger_tuner_set_params; | 1101 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; |
1102 | } | 1102 | } |
1103 | break; | 1103 | break; |
1104 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 1104 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
1105 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, | 1105 | dev->dvb.frontend = tda10046_attach(&philips_tiger_config, |
1106 | &dev->i2c_adap); | 1106 | &dev->i2c_adap); |
1107 | if (dev->dvb.frontend) { | 1107 | if (dev->dvb.frontend) { |
1108 | dev->dvb.frontend->ops->tuner_ops.init = philips_tiger_tuner_init; | 1108 | dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; |
1109 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_tiger_tuner_sleep; | 1109 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; |
1110 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tiger_tuner_set_params; | 1110 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; |
1111 | } | 1111 | } |
1112 | break; | 1112 | break; |
1113 | case SAA7134_BOARD_FLYDVBT_LR301: | 1113 | case SAA7134_BOARD_FLYDVBT_LR301: |
1114 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, | 1114 | dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, |
1115 | &dev->i2c_adap); | 1115 | &dev->i2c_adap); |
1116 | if (dev->dvb.frontend) { | 1116 | if (dev->dvb.frontend) { |
1117 | dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; | 1117 | dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; |
1118 | dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; | 1118 | dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; |
1119 | dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; | 1119 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; |
1120 | } | 1120 | } |
1121 | break; | 1121 | break; |
1122 | case SAA7134_BOARD_FLYDVB_TRIO: | 1122 | case SAA7134_BOARD_FLYDVB_TRIO: |
1123 | dev->dvb.frontend = tda10046_attach(&lifeview_trio_config, | 1123 | dev->dvb.frontend = tda10046_attach(&lifeview_trio_config, |
1124 | &dev->i2c_adap); | 1124 | &dev->i2c_adap); |
1125 | if (dev->dvb.frontend) { | 1125 | if (dev->dvb.frontend) { |
1126 | dev->dvb.frontend->ops->tuner_ops.sleep = lifeview_trio_tuner_sleep; | 1126 | dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep; |
1127 | dev->dvb.frontend->ops->tuner_ops.set_params = lifeview_trio_tuner_set_params; | 1127 | dev->dvb.frontend->ops.tuner_ops.set_params = lifeview_trio_tuner_set_params; |
1128 | } | 1128 | } |
1129 | break; | 1129 | break; |
1130 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: | 1130 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: |
1131 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, | 1131 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, |
1132 | &dev->i2c_adap); | 1132 | &dev->i2c_adap); |
1133 | if (dev->dvb.frontend) { | 1133 | if (dev->dvb.frontend) { |
1134 | dev->dvb.frontend->ops->tuner_ops.init = ads_duo_tuner_init; | 1134 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; |
1135 | dev->dvb.frontend->ops->tuner_ops.sleep = ads_duo_tuner_sleep; | 1135 | dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep; |
1136 | dev->dvb.frontend->ops->tuner_ops.set_params = ads_duo_tuner_set_params; | 1136 | dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params; |
1137 | } | 1137 | } |
1138 | break; | 1138 | break; |
1139 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 1139 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
1140 | dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, | 1140 | dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, |
1141 | &dev->i2c_adap); | 1141 | &dev->i2c_adap); |
1142 | if (dev->dvb.frontend) { | 1142 | if (dev->dvb.frontend) { |
1143 | dev->dvb.frontend->ops->tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; | 1143 | dev->dvb.frontend->ops.tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; |
1144 | dev->dvb.frontend->ops->tuner_ops.set_params = tevion_dvb220rf_tuner_set_params; | 1144 | dev->dvb.frontend->ops.tuner_ops.set_params = tevion_dvb220rf_tuner_set_params; |
1145 | } | 1145 | } |
1146 | break; | 1146 | break; |
1147 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: | 1147 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: |
1148 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, | 1148 | dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, |
1149 | &dev->i2c_adap); | 1149 | &dev->i2c_adap); |
1150 | if (dev->dvb.frontend) { | 1150 | if (dev->dvb.frontend) { |
1151 | dev->dvb.frontend->ops->tuner_ops.init = ads_duo_tuner_init; | 1151 | dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; |
1152 | dev->dvb.frontend->ops->tuner_ops.sleep = ads_duo_tuner_sleep; | 1152 | dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep; |
1153 | dev->dvb.frontend->ops->tuner_ops.set_params = ads_duo_tuner_set_params; | 1153 | dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params; |
1154 | } | 1154 | } |
1155 | break; | 1155 | break; |
1156 | #endif | 1156 | #endif |