diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:09:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:09:31 -0400 |
commit | 25581ad107be24b89d805da51a03d616f8f3d1be (patch) | |
tree | 36e2bd32667b5dd5a39e1939c1c5162f18967715 /drivers/media/dvb/bt8xx/dvb-bt8xx.c | |
parent | 72cf2709bf8e0410800f118c4298bfbf8715b303 (diff) | |
parent | 7477ddaa4d2d69bbcd49e12990af158dbb03f2f2 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (244 commits)
V4L/DVB (4210b): git-dvb: tea575x-tuner build fix
V4L/DVB (4210a): git-dvb versus matroxfb
V4L/DVB (4209): Added some BTTV PCI IDs for newer boards
Fixes some sync issues between V4L/DVB development and GIT
V4L/DVB (4206): Cx88-blackbird: always set encoder height based on tvnorm->id
V4L/DVB (4205): Merge tda9887 module into tuner.
V4L/DVB (4203): Explicitly set the enum values.
V4L/DVB (4202): allow selecting CX2341x port mode
V4L/DVB (4200): Disable bitrate_mode when encoding mpeg-1.
V4L/DVB (4199): Add cx2341x-specific control array to cx2341x.c
V4L/DVB (4198): Avoid newer usages of obsoleted experimental MPEGCOMP API
V4L/DVB (4197): Port new MPEG API to saa7134-empress with saa6752hs
V4L/DVB (4196): Port cx88-blackbird to the new MPEG API.
V4L/DVB (4193): Update cx2341x fw encoding API doc.
V4L/DVB (4192): Use control helpers for saa7115, cx25840, msp3400.
V4L/DVB (4191): Add CX2341X MPEG encoder module.
V4L/DVB (4190): Add helper functions for control processing to v4l2-common.
V4L/DVB (4189): Add videodev support for VIDIOC_S/G/TRY_EXT_CTRLS.
V4L/DVB (4188): Add new MPEG control/ioctl definitions to videodev2.h
V4L/DVB (4186): Add support for the DNTV Live! mini DVB-T card.
...
Diffstat (limited to 'drivers/media/dvb/bt8xx/dvb-bt8xx.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dvb-bt8xx.c | 118 |
1 files changed, 61 insertions, 57 deletions
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index ccc7b2eb4a2..b715b972d2f 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
@@ -147,12 +147,15 @@ static int thomson_dtt7579_demod_init(struct dvb_frontend* fe) | |||
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
149 | 149 | ||
150 | static int thomson_dtt7579_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) | 150 | static int thomson_dtt7579_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) |
151 | { | 151 | { |
152 | u32 div; | 152 | u32 div; |
153 | unsigned char bs = 0; | 153 | unsigned char bs = 0; |
154 | unsigned char cp = 0; | 154 | unsigned char cp = 0; |
155 | 155 | ||
156 | if (buf_len < 5) | ||
157 | return -EINVAL; | ||
158 | |||
156 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; | 159 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; |
157 | 160 | ||
158 | if (params->frequency < 542000000) | 161 | if (params->frequency < 542000000) |
@@ -169,22 +172,25 @@ static int thomson_dtt7579_pll_set(struct dvb_frontend* fe, struct dvb_frontend_ | |||
169 | else | 172 | else |
170 | bs = 0x08; | 173 | bs = 0x08; |
171 | 174 | ||
172 | pllbuf[0] = 0xc0; // Note: non-linux standard PLL i2c address | 175 | pllbuf[0] = 0x60; |
173 | pllbuf[1] = div >> 8; | 176 | pllbuf[1] = div >> 8; |
174 | pllbuf[2] = div & 0xff; | 177 | pllbuf[2] = div & 0xff; |
175 | pllbuf[3] = cp; | 178 | pllbuf[3] = cp; |
176 | pllbuf[4] = bs; | 179 | pllbuf[4] = bs; |
177 | 180 | ||
178 | return 0; | 181 | return 5; |
179 | } | 182 | } |
180 | 183 | ||
181 | static struct mt352_config thomson_dtt7579_config = { | 184 | static struct mt352_config thomson_dtt7579_config = { |
182 | .demod_address = 0x0f, | 185 | .demod_address = 0x0f, |
183 | .demod_init = thomson_dtt7579_demod_init, | 186 | .demod_init = thomson_dtt7579_demod_init, |
184 | .pll_set = thomson_dtt7579_pll_set, | ||
185 | }; | 187 | }; |
186 | 188 | ||
187 | static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 189 | static struct zl10353_config thomson_dtt7579_zl10353_config = { |
190 | .demod_address = 0x0f, | ||
191 | }; | ||
192 | |||
193 | static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | ||
188 | { | 194 | { |
189 | u32 freq = params->frequency; | 195 | u32 freq = params->frequency; |
190 | 196 | ||
@@ -237,7 +243,7 @@ static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_paramete | |||
237 | return 0; | 243 | return 0; |
238 | } | 244 | } |
239 | 245 | ||
240 | static int pinnsat_pll_init(struct dvb_frontend* fe) | 246 | static int pinnsat_tuner_init(struct dvb_frontend* fe) |
241 | { | 247 | { |
242 | struct dvb_bt8xx_card *card = fe->dvb->priv; | 248 | struct dvb_bt8xx_card *card = fe->dvb->priv; |
243 | 249 | ||
@@ -247,7 +253,7 @@ static int pinnsat_pll_init(struct dvb_frontend* fe) | |||
247 | return 0; | 253 | return 0; |
248 | } | 254 | } |
249 | 255 | ||
250 | static int pinnsat_pll_sleep(struct dvb_frontend* fe) | 256 | static int pinnsat_tuner_sleep(struct dvb_frontend* fe) |
251 | { | 257 | { |
252 | struct dvb_bt8xx_card *card = fe->dvb->priv; | 258 | struct dvb_bt8xx_card *card = fe->dvb->priv; |
253 | 259 | ||
@@ -258,12 +264,9 @@ static int pinnsat_pll_sleep(struct dvb_frontend* fe) | |||
258 | 264 | ||
259 | static struct cx24110_config pctvsat_config = { | 265 | static struct cx24110_config pctvsat_config = { |
260 | .demod_address = 0x55, | 266 | .demod_address = 0x55, |
261 | .pll_init = pinnsat_pll_init, | ||
262 | .pll_set = cx24108_pll_set, | ||
263 | .pll_sleep = pinnsat_pll_sleep, | ||
264 | }; | 267 | }; |
265 | 268 | ||
266 | static int microtune_mt7202dtf_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 269 | static int microtune_mt7202dtf_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) |
267 | { | 270 | { |
268 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; | 271 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; |
269 | u8 cfg, cpump, band_select; | 272 | u8 cfg, cpump, band_select; |
@@ -297,6 +300,8 @@ static int microtune_mt7202dtf_pll_set(struct dvb_frontend* fe, struct dvb_front | |||
297 | data[2] = ((div >> 10) & 0x60) | cfg; | 300 | data[2] = ((div >> 10) & 0x60) | cfg; |
298 | data[3] = (cpump << 6) | band_select; | 301 | data[3] = (cpump << 6) | band_select; |
299 | 302 | ||
303 | if (fe->ops.i2c_gate_ctrl) | ||
304 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
300 | i2c_transfer(card->i2c_adapter, &msg, 1); | 305 | i2c_transfer(card->i2c_adapter, &msg, 1); |
301 | return (div * 166666 - 36000000); | 306 | return (div * 166666 - 36000000); |
302 | } | 307 | } |
@@ -310,7 +315,6 @@ static int microtune_mt7202dtf_request_firmware(struct dvb_frontend* fe, const s | |||
310 | 315 | ||
311 | static struct sp887x_config microtune_mt7202dtf_config = { | 316 | static struct sp887x_config microtune_mt7202dtf_config = { |
312 | .demod_address = 0x70, | 317 | .demod_address = 0x70, |
313 | .pll_set = microtune_mt7202dtf_pll_set, | ||
314 | .request_firmware = microtune_mt7202dtf_request_firmware, | 318 | .request_firmware = microtune_mt7202dtf_request_firmware, |
315 | }; | 319 | }; |
316 | 320 | ||
@@ -337,12 +341,14 @@ static int advbt771_samsung_tdtc9251dh0_demod_init(struct dvb_frontend* fe) | |||
337 | return 0; | 341 | return 0; |
338 | } | 342 | } |
339 | 343 | ||
340 | static int advbt771_samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) | 344 | static int advbt771_samsung_tdtc9251dh0_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) |
341 | { | 345 | { |
342 | u32 div; | 346 | u32 div; |
343 | unsigned char bs = 0; | 347 | unsigned char bs = 0; |
344 | unsigned char cp = 0; | 348 | unsigned char cp = 0; |
345 | 349 | ||
350 | if (buf_len < 5) return -EINVAL; | ||
351 | |||
346 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; | 352 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; |
347 | 353 | ||
348 | if (params->frequency < 150000000) | 354 | if (params->frequency < 150000000) |
@@ -383,19 +389,18 @@ static int advbt771_samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct | |||
383 | else | 389 | else |
384 | bs = 0x08; | 390 | bs = 0x08; |
385 | 391 | ||
386 | pllbuf[0] = 0xc2; // Note: non-linux standard PLL i2c address | 392 | pllbuf[0] = 0x61; |
387 | pllbuf[1] = div >> 8; | 393 | pllbuf[1] = div >> 8; |
388 | pllbuf[2] = div & 0xff; | 394 | pllbuf[2] = div & 0xff; |
389 | pllbuf[3] = cp; | 395 | pllbuf[3] = cp; |
390 | pllbuf[4] = bs; | 396 | pllbuf[4] = bs; |
391 | 397 | ||
392 | return 0; | 398 | return 5; |
393 | } | 399 | } |
394 | 400 | ||
395 | static struct mt352_config advbt771_samsung_tdtc9251dh0_config = { | 401 | static struct mt352_config advbt771_samsung_tdtc9251dh0_config = { |
396 | .demod_address = 0x0f, | 402 | .demod_address = 0x0f, |
397 | .demod_init = advbt771_samsung_tdtc9251dh0_demod_init, | 403 | .demod_init = advbt771_samsung_tdtc9251dh0_demod_init, |
398 | .pll_set = advbt771_samsung_tdtc9251dh0_pll_set, | ||
399 | }; | 404 | }; |
400 | 405 | ||
401 | static struct dst_config dst_config = { | 406 | static struct dst_config dst_config = { |
@@ -455,7 +460,7 @@ static struct or51211_config or51211_config = { | |||
455 | .sleep = or51211_sleep, | 460 | .sleep = or51211_sleep, |
456 | }; | 461 | }; |
457 | 462 | ||
458 | static int vp3021_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 463 | static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) |
459 | { | 464 | { |
460 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; | 465 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; |
461 | u8 buf[4]; | 466 | u8 buf[4]; |
@@ -478,6 +483,8 @@ static int vp3021_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_fronten | |||
478 | else | 483 | else |
479 | return -EINVAL; | 484 | return -EINVAL; |
480 | 485 | ||
486 | if (fe->ops.i2c_gate_ctrl) | ||
487 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
481 | i2c_transfer(card->i2c_adapter, &msg, 1); | 488 | i2c_transfer(card->i2c_adapter, &msg, 1); |
482 | return 0; | 489 | return 0; |
483 | } | 490 | } |
@@ -485,7 +492,6 @@ static int vp3021_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_fronten | |||
485 | static struct nxt6000_config vp3021_alps_tded4_config = { | 492 | static struct nxt6000_config vp3021_alps_tded4_config = { |
486 | .demod_address = 0x0a, | 493 | .demod_address = 0x0a, |
487 | .clock_inversion = 1, | 494 | .clock_inversion = 1, |
488 | .pll_set = vp3021_alps_tded4_pll_set, | ||
489 | }; | 495 | }; |
490 | 496 | ||
491 | static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) | 497 | static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) |
@@ -506,14 +512,17 @@ static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) | |||
506 | return 0; | 512 | return 0; |
507 | } | 513 | } |
508 | 514 | ||
509 | static int digitv_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) | 515 | static int digitv_alps_tded4_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) |
510 | { | 516 | { |
511 | u32 div; | 517 | u32 div; |
512 | struct dvb_ofdm_parameters *op = ¶ms->u.ofdm; | 518 | struct dvb_ofdm_parameters *op = ¶ms->u.ofdm; |
513 | 519 | ||
520 | if (buf_len < 5) | ||
521 | return -EINVAL; | ||
522 | |||
514 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; | 523 | div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; |
515 | 524 | ||
516 | pllbuf[0] = 0xc2; | 525 | pllbuf[0] = 0x61; |
517 | pllbuf[1] = (div >> 8) & 0x7F; | 526 | pllbuf[1] = (div >> 8) & 0x7F; |
518 | pllbuf[2] = div & 0xFF; | 527 | pllbuf[2] = div & 0xFF; |
519 | pllbuf[3] = 0x85; | 528 | pllbuf[3] = 0x85; |
@@ -530,7 +539,7 @@ static int digitv_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_fronten | |||
530 | if (op->bandwidth == 8) | 539 | if (op->bandwidth == 8) |
531 | pllbuf[4] |= 0x04; | 540 | pllbuf[4] |= 0x04; |
532 | 541 | ||
533 | return 0; | 542 | return 5; |
534 | } | 543 | } |
535 | 544 | ||
536 | static void digitv_alps_tded4_reset(struct dvb_bt8xx_card *bt) | 545 | static void digitv_alps_tded4_reset(struct dvb_bt8xx_card *bt) |
@@ -557,43 +566,18 @@ static void digitv_alps_tded4_reset(struct dvb_bt8xx_card *bt) | |||
557 | static struct mt352_config digitv_alps_tded4_config = { | 566 | static struct mt352_config digitv_alps_tded4_config = { |
558 | .demod_address = 0x0a, | 567 | .demod_address = 0x0a, |
559 | .demod_init = digitv_alps_tded4_demod_init, | 568 | .demod_init = digitv_alps_tded4_demod_init, |
560 | .pll_set = digitv_alps_tded4_pll_set, | ||
561 | }; | 569 | }; |
562 | 570 | ||
563 | static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 571 | static int tdvs_tua6034_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) |
564 | { | 572 | { |
565 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; | 573 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; |
566 | u8 buf[4]; | 574 | return lg_h06xf_pll_set(fe, card->i2c_adapter, params); |
567 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; | ||
568 | int err; | ||
569 | |||
570 | dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0); | ||
571 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | ||
572 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | ||
573 | if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) { | ||
574 | printk(KERN_WARNING "dvb-bt8xx: %s error " | ||
575 | "(addr %02x <- %02x, err = %i)\n", | ||
576 | __FUNCTION__, buf[0], buf[1], err); | ||
577 | if (err < 0) | ||
578 | return err; | ||
579 | else | ||
580 | return -EREMOTEIO; | ||
581 | } | ||
582 | |||
583 | /* Set the Auxiliary Byte. */ | ||
584 | buf[2] &= ~0x20; | ||
585 | buf[2] |= 0x18; | ||
586 | buf[3] = 0x50; | ||
587 | i2c_transfer(card->i2c_adapter, &msg, 1); | ||
588 | |||
589 | return 0; | ||
590 | } | 575 | } |
591 | 576 | ||
592 | static struct lgdt330x_config tdvs_tua6034_config = { | 577 | static struct lgdt330x_config tdvs_tua6034_config = { |
593 | .demod_address = 0x0e, | 578 | .demod_address = 0x0e, |
594 | .demod_chip = LGDT3303, | 579 | .demod_chip = LGDT3303, |
595 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | 580 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ |
596 | .pll_set = tdvs_tua6034_pll_set, | ||
597 | }; | 581 | }; |
598 | 582 | ||
599 | static void lgdt330x_reset(struct dvb_bt8xx_card *bt) | 583 | static void lgdt330x_reset(struct dvb_bt8xx_card *bt) |
@@ -617,17 +601,25 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
617 | switch(type) { | 601 | switch(type) { |
618 | case BTTV_BOARD_DVICO_DVBT_LITE: | 602 | case BTTV_BOARD_DVICO_DVBT_LITE: |
619 | card->fe = mt352_attach(&thomson_dtt7579_config, card->i2c_adapter); | 603 | card->fe = mt352_attach(&thomson_dtt7579_config, card->i2c_adapter); |
604 | |||
605 | if (card->fe == NULL) | ||
606 | card->fe = zl10353_attach(&thomson_dtt7579_zl10353_config, | ||
607 | card->i2c_adapter); | ||
608 | |||
620 | if (card->fe != NULL) { | 609 | if (card->fe != NULL) { |
621 | card->fe->ops->info.frequency_min = 174000000; | 610 | card->fe->ops.tuner_ops.calc_regs = thomson_dtt7579_tuner_calc_regs; |
622 | card->fe->ops->info.frequency_max = 862000000; | 611 | card->fe->ops.info.frequency_min = 174000000; |
612 | card->fe->ops.info.frequency_max = 862000000; | ||
623 | } | 613 | } |
624 | break; | 614 | break; |
625 | 615 | ||
626 | case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE: | 616 | case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE: |
627 | lgdt330x_reset(card); | 617 | lgdt330x_reset(card); |
628 | card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter); | 618 | card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter); |
629 | if (card->fe != NULL) | 619 | if (card->fe != NULL) { |
620 | card->fe->ops.tuner_ops.set_params = tdvs_tua6034_tuner_set_params; | ||
630 | dprintk ("dvb_bt8xx: lgdt330x detected\n"); | 621 | dprintk ("dvb_bt8xx: lgdt330x detected\n"); |
622 | } | ||
631 | break; | 623 | break; |
632 | 624 | ||
633 | case BTTV_BOARD_NEBULA_DIGITV: | 625 | case BTTV_BOARD_NEBULA_DIGITV: |
@@ -640,6 +632,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
640 | digitv_alps_tded4_reset(card); | 632 | digitv_alps_tded4_reset(card); |
641 | card->fe = nxt6000_attach(&vp3021_alps_tded4_config, card->i2c_adapter); | 633 | card->fe = nxt6000_attach(&vp3021_alps_tded4_config, card->i2c_adapter); |
642 | if (card->fe != NULL) { | 634 | if (card->fe != NULL) { |
635 | card->fe->ops.tuner_ops.set_params = vp3021_alps_tded4_tuner_set_params; | ||
643 | dprintk ("dvb_bt8xx: an nxt6000 was detected on your digitv card\n"); | 636 | dprintk ("dvb_bt8xx: an nxt6000 was detected on your digitv card\n"); |
644 | break; | 637 | break; |
645 | } | 638 | } |
@@ -648,19 +641,25 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
648 | digitv_alps_tded4_reset(card); | 641 | digitv_alps_tded4_reset(card); |
649 | card->fe = mt352_attach(&digitv_alps_tded4_config, card->i2c_adapter); | 642 | card->fe = mt352_attach(&digitv_alps_tded4_config, card->i2c_adapter); |
650 | 643 | ||
651 | if (card->fe != NULL) | 644 | if (card->fe != NULL) { |
645 | card->fe->ops.tuner_ops.calc_regs = digitv_alps_tded4_tuner_calc_regs; | ||
652 | dprintk ("dvb_bt8xx: an mt352 was detected on your digitv card\n"); | 646 | dprintk ("dvb_bt8xx: an mt352 was detected on your digitv card\n"); |
647 | } | ||
653 | break; | 648 | break; |
654 | 649 | ||
655 | case BTTV_BOARD_AVDVBT_761: | 650 | case BTTV_BOARD_AVDVBT_761: |
656 | card->fe = sp887x_attach(µtune_mt7202dtf_config, card->i2c_adapter); | 651 | card->fe = sp887x_attach(µtune_mt7202dtf_config, card->i2c_adapter); |
652 | if (card->fe) { | ||
653 | card->fe->ops.tuner_ops.set_params = microtune_mt7202dtf_tuner_set_params; | ||
654 | } | ||
657 | break; | 655 | break; |
658 | 656 | ||
659 | case BTTV_BOARD_AVDVBT_771: | 657 | case BTTV_BOARD_AVDVBT_771: |
660 | card->fe = mt352_attach(&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter); | 658 | card->fe = mt352_attach(&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter); |
661 | if (card->fe != NULL) { | 659 | if (card->fe != NULL) { |
662 | card->fe->ops->info.frequency_min = 174000000; | 660 | card->fe->ops.tuner_ops.calc_regs = advbt771_samsung_tdtc9251dh0_tuner_calc_regs; |
663 | card->fe->ops->info.frequency_max = 862000000; | 661 | card->fe->ops.info.frequency_min = 174000000; |
662 | card->fe->ops.info.frequency_max = 862000000; | ||
664 | } | 663 | } |
665 | break; | 664 | break; |
666 | 665 | ||
@@ -687,6 +686,11 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
687 | 686 | ||
688 | case BTTV_BOARD_PINNACLESAT: | 687 | case BTTV_BOARD_PINNACLESAT: |
689 | card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter); | 688 | card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter); |
689 | if (card->fe) { | ||
690 | card->fe->ops.tuner_ops.init = pinnsat_tuner_init; | ||
691 | card->fe->ops.tuner_ops.sleep = pinnsat_tuner_sleep; | ||
692 | card->fe->ops.tuner_ops.set_params = cx24108_tuner_set_params; | ||
693 | } | ||
690 | break; | 694 | break; |
691 | 695 | ||
692 | case BTTV_BOARD_PC_HDTV: | 696 | case BTTV_BOARD_PC_HDTV: |
@@ -703,8 +707,8 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
703 | else | 707 | else |
704 | if (dvb_register_frontend(&card->dvb_adapter, card->fe)) { | 708 | if (dvb_register_frontend(&card->dvb_adapter, card->fe)) { |
705 | printk("dvb-bt8xx: Frontend registration failed!\n"); | 709 | printk("dvb-bt8xx: Frontend registration failed!\n"); |
706 | if (card->fe->ops->release) | 710 | if (card->fe->ops.release) |
707 | card->fe->ops->release(card->fe); | 711 | card->fe->ops.release(card->fe); |
708 | card->fe = NULL; | 712 | card->fe = NULL; |
709 | } | 713 | } |
710 | } | 714 | } |
@@ -713,7 +717,7 @@ static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) | |||
713 | { | 717 | { |
714 | int result; | 718 | int result; |
715 | 719 | ||
716 | if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE)) < 0) { | 720 | if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE, &card->bt->dev->dev)) < 0) { |
717 | printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result); | 721 | printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result); |
718 | return result; | 722 | return result; |
719 | } | 723 | } |