diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-30 05:53:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 14:10:54 -0400 |
commit | 4d43e13f723e12734257277cc38497fab1efc605 (patch) | |
tree | 7debc4f9b7997f7d768dcf387210436b532198f4 /drivers/media/dvb/dvb-usb/cxusb.c | |
parent | 8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c (diff) |
V4L/DVB (4643): Multi-input patch for DVB-USB device
This patch is the first commit of the Multiple Input Patch for the DVB-USB frame
work.
It changes the DVB-USB-device to be able to have more than one streaming input
(e.g. multiple DVB-T sources) on one device. This is a necessary feature for
the upcoming DiB7700 driven devices.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 241 |
1 files changed, 136 insertions, 105 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index c710c0176e07..5ebfa3f08546 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -161,13 +161,13 @@ static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | static int cxusb_streaming_ctrl(struct dvb_usb_device *d, int onoff) | 164 | static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) |
165 | { | 165 | { |
166 | u8 buf[2] = { 0x03, 0x00 }; | 166 | u8 buf[2] = { 0x03, 0x00 }; |
167 | if (onoff) | 167 | if (onoff) |
168 | cxusb_ctrl_msg(d,CMD_STREAMING_ON, buf, 2, NULL, 0); | 168 | cxusb_ctrl_msg(adap->dev, CMD_STREAMING_ON, buf, 2, NULL, 0); |
169 | else | 169 | else |
170 | cxusb_ctrl_msg(d,CMD_STREAMING_OFF, NULL, 0, NULL, 0); | 170 | cxusb_ctrl_msg(adap->dev, CMD_STREAMING_OFF, NULL, 0, NULL, 0); |
171 | 171 | ||
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
@@ -327,8 +327,8 @@ static int cxusb_mt352_demod_init(struct dvb_frontend* fe) | |||
327 | static int cxusb_lgh064f_tuner_set_params(struct dvb_frontend *fe, | 327 | static int cxusb_lgh064f_tuner_set_params(struct dvb_frontend *fe, |
328 | struct dvb_frontend_parameters *fep) | 328 | struct dvb_frontend_parameters *fep) |
329 | { | 329 | { |
330 | struct dvb_usb_device *d = fe->dvb->priv; | 330 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
331 | return lg_h06xf_pll_set(fe, &d->i2c_adap, fep); | 331 | return lg_h06xf_pll_set(fe, &adap->dev->i2c_adap, fep); |
332 | } | 332 | } |
333 | 333 | ||
334 | static struct cx22702_config cxusb_cx22702_config = { | 334 | static struct cx22702_config cxusb_cx22702_config = { |
@@ -359,98 +359,99 @@ static struct mt352_config cxusb_mt352_config = { | |||
359 | }; | 359 | }; |
360 | 360 | ||
361 | /* Callbacks for DVB USB */ | 361 | /* Callbacks for DVB USB */ |
362 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) | 362 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) |
363 | { | 363 | { |
364 | u8 bpll[4] = { 0x0b, 0xdc, 0x9c, 0xa0 }; | 364 | u8 bpll[4] = { 0x0b, 0xdc, 0x9c, 0xa0 }; |
365 | d->pll_addr = 0x61; | 365 | adap->pll_addr = 0x61; |
366 | memcpy(d->pll_init, bpll, 4); | 366 | memcpy(adap->pll_init, bpll, 4); |
367 | d->pll_desc = &dvb_pll_fmd1216me; | 367 | adap->pll_desc = &dvb_pll_fmd1216me; |
368 | 368 | ||
369 | d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; | 369 | adap->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; |
370 | d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; | 370 | adap->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; |
371 | 371 | ||
372 | return 0; | 372 | return 0; |
373 | } | 373 | } |
374 | 374 | ||
375 | static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) | 375 | static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) |
376 | { | 376 | { |
377 | d->pll_addr = 0x61; | 377 | adap->pll_addr = 0x61; |
378 | d->pll_desc = &dvb_pll_thomson_dtt7579; | 378 | adap->pll_desc = &dvb_pll_thomson_dtt7579; |
379 | d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | 379 | adap->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; |
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
382 | 382 | ||
383 | static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d) | 383 | static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) |
384 | { | 384 | { |
385 | d->pll_addr = 0x61; | 385 | adap->pll_addr = 0x61; |
386 | d->pll_desc = &dvb_pll_lg_z201; | 386 | adap->pll_desc = &dvb_pll_lg_z201; |
387 | d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | 387 | adap->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; |
388 | return 0; | 388 | return 0; |
389 | } | 389 | } |
390 | 390 | ||
391 | static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d) | 391 | static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) |
392 | { | 392 | { |
393 | d->pll_addr = 0x60; | 393 | adap->pll_addr = 0x60; |
394 | d->pll_desc = &dvb_pll_thomson_dtt7579; | 394 | adap->pll_desc = &dvb_pll_thomson_dtt7579; |
395 | d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | 395 | adap->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; |
396 | return 0; | 396 | return 0; |
397 | } | 397 | } |
398 | 398 | ||
399 | static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) | 399 | static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_adapter *adap) |
400 | { | 400 | { |
401 | d->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; | 401 | adap->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; |
402 | return 0; | 402 | return 0; |
403 | } | 403 | } |
404 | 404 | ||
405 | static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d) | 405 | static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) |
406 | { | 406 | { |
407 | u8 b; | 407 | u8 b; |
408 | if (usb_set_interface(d->udev,0,6) < 0) | 408 | if (usb_set_interface(adap->dev->udev, 0, 6) < 0) |
409 | err("set interface failed"); | 409 | err("set interface failed"); |
410 | 410 | ||
411 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1); | 411 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); |
412 | 412 | ||
413 | if ((d->fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, &d->i2c_adap)) != NULL) | 413 | if ((adap->fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, &adap->dev->i2c_adap)) != NULL) |
414 | return 0; | 414 | return 0; |
415 | 415 | ||
416 | return -EIO; | 416 | return -EIO; |
417 | } | 417 | } |
418 | 418 | ||
419 | static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d) | 419 | static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) |
420 | { | 420 | { |
421 | if (usb_set_interface(d->udev,0,7) < 0) | 421 | if (usb_set_interface(adap->dev->udev, 0, 7) < 0) |
422 | err("set interface failed"); | 422 | err("set interface failed"); |
423 | 423 | ||
424 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 424 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
425 | 425 | ||
426 | if ((d->fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) | 426 | if ((adap->fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, &adap->dev->i2c_adap)) != NULL) |
427 | return 0; | 427 | return 0; |
428 | 428 | ||
429 | return -EIO; | 429 | return -EIO; |
430 | } | 430 | } |
431 | 431 | ||
432 | static int cxusb_mt352_frontend_attach(struct dvb_usb_device *d) | 432 | static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) |
433 | { /* used in both lgz201 and th7579 */ | 433 | { |
434 | if (usb_set_interface(d->udev,0,0) < 0) | 434 | /* used in both lgz201 and th7579 */ |
435 | if (usb_set_interface(adap->dev->udev, 0, 0) < 0) | ||
435 | err("set interface failed"); | 436 | err("set interface failed"); |
436 | 437 | ||
437 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 438 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
438 | 439 | ||
439 | if ((d->fe = dvb_attach(mt352_attach, &cxusb_mt352_config, &d->i2c_adap)) != NULL) | 440 | if ((adap->fe = dvb_attach(mt352_attach, &cxusb_mt352_config, &adap->dev->i2c_adap)) != NULL) |
440 | return 0; | 441 | return 0; |
441 | 442 | ||
442 | return -EIO; | 443 | return -EIO; |
443 | } | 444 | } |
444 | 445 | ||
445 | static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d) | 446 | static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) |
446 | { | 447 | { |
447 | if (usb_set_interface(d->udev,0,0) < 0) | 448 | if (usb_set_interface(adap->dev->udev, 0, 0) < 0) |
448 | err("set interface failed"); | 449 | err("set interface failed"); |
449 | 450 | ||
450 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 451 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
451 | 452 | ||
452 | if (((d->fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, &d->i2c_adap)) != NULL) || | 453 | if (((adap->fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, &adap->dev->i2c_adap)) != NULL) || |
453 | ((d->fe = dvb_attach(zl10353_attach, &cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL)) | 454 | ((adap->fe = dvb_attach(zl10353_attach, &cxusb_zl10353_dee1601_config, &adap->dev->i2c_adap)) != NULL)) |
454 | return 0; | 455 | return 0; |
455 | 456 | ||
456 | return -EIO; | 457 | return -EIO; |
@@ -480,11 +481,11 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, const | |||
480 | } | 481 | } |
481 | 482 | ||
482 | /* DVB USB Driver stuff */ | 483 | /* DVB USB Driver stuff */ |
483 | static struct dvb_usb_properties cxusb_medion_properties; | 484 | static struct dvb_usb_device_properties cxusb_medion_properties; |
484 | static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties; | 485 | static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties; |
485 | static struct dvb_usb_properties cxusb_bluebird_dee1601_properties; | 486 | static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties; |
486 | static struct dvb_usb_properties cxusb_bluebird_lgz201_properties; | 487 | static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties; |
487 | static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties; | 488 | static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties; |
488 | 489 | ||
489 | static int cxusb_probe(struct usb_interface *intf, | 490 | static int cxusb_probe(struct usb_interface *intf, |
490 | const struct usb_device_id *id) | 491 | const struct usb_device_id *id) |
@@ -516,24 +517,22 @@ static struct usb_device_id cxusb_table [] = { | |||
516 | }; | 517 | }; |
517 | MODULE_DEVICE_TABLE (usb, cxusb_table); | 518 | MODULE_DEVICE_TABLE (usb, cxusb_table); |
518 | 519 | ||
519 | static struct dvb_usb_properties cxusb_medion_properties = { | 520 | static struct dvb_usb_device_properties cxusb_medion_properties = { |
520 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 521 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
521 | 522 | ||
522 | .usb_ctrl = CYPRESS_FX2, | 523 | .usb_ctrl = CYPRESS_FX2, |
523 | 524 | ||
524 | .size_of_priv = sizeof(struct cxusb_state), | 525 | .size_of_priv = sizeof(struct cxusb_state), |
525 | 526 | ||
527 | .num_adapters = 1, | ||
528 | .adapter = { | ||
529 | { | ||
526 | .streaming_ctrl = cxusb_streaming_ctrl, | 530 | .streaming_ctrl = cxusb_streaming_ctrl, |
527 | .power_ctrl = cxusb_power_ctrl, | ||
528 | .frontend_attach = cxusb_cx22702_frontend_attach, | 531 | .frontend_attach = cxusb_cx22702_frontend_attach, |
529 | .tuner_attach = cxusb_fmd1216me_tuner_attach, | 532 | .tuner_attach = cxusb_fmd1216me_tuner_attach, |
530 | |||
531 | .i2c_algo = &cxusb_i2c_algo, | ||
532 | |||
533 | .generic_bulk_ctrl_endpoint = 0x01, | ||
534 | /* parameter for the MPEG2-data transfer */ | 533 | /* parameter for the MPEG2-data transfer */ |
535 | .urb = { | 534 | .stream = { |
536 | .type = DVB_USB_BULK, | 535 | .type = USB_BULK, |
537 | .count = 5, | 536 | .count = 5, |
538 | .endpoint = 0x02, | 537 | .endpoint = 0x02, |
539 | .u = { | 538 | .u = { |
@@ -543,6 +542,14 @@ static struct dvb_usb_properties cxusb_medion_properties = { | |||
543 | } | 542 | } |
544 | }, | 543 | }, |
545 | 544 | ||
545 | }, | ||
546 | }, | ||
547 | .power_ctrl = cxusb_power_ctrl, | ||
548 | |||
549 | .i2c_algo = &cxusb_i2c_algo, | ||
550 | |||
551 | .generic_bulk_ctrl_endpoint = 0x01, | ||
552 | |||
546 | .num_device_descs = 1, | 553 | .num_device_descs = 1, |
547 | .devices = { | 554 | .devices = { |
548 | { "Medion MD95700 (MDUSBTV-HYBRID)", | 555 | { "Medion MD95700 (MDUSBTV-HYBRID)", |
@@ -552,7 +559,7 @@ static struct dvb_usb_properties cxusb_medion_properties = { | |||
552 | } | 559 | } |
553 | }; | 560 | }; |
554 | 561 | ||
555 | static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | 562 | static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { |
556 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 563 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
557 | 564 | ||
558 | .usb_ctrl = DEVICE_SPECIFIC, | 565 | .usb_ctrl = DEVICE_SPECIFIC, |
@@ -563,22 +570,16 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | |||
563 | 570 | ||
564 | .size_of_priv = sizeof(struct cxusb_state), | 571 | .size_of_priv = sizeof(struct cxusb_state), |
565 | 572 | ||
573 | .num_adapters = 1, | ||
574 | .adapter = { | ||
575 | { | ||
566 | .streaming_ctrl = cxusb_streaming_ctrl, | 576 | .streaming_ctrl = cxusb_streaming_ctrl, |
567 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
568 | .frontend_attach = cxusb_lgdt3303_frontend_attach, | 577 | .frontend_attach = cxusb_lgdt3303_frontend_attach, |
569 | .tuner_attach = cxusb_lgdt3303_tuner_attach, | 578 | .tuner_attach = cxusb_lgdt3303_tuner_attach, |
570 | 579 | ||
571 | .i2c_algo = &cxusb_i2c_algo, | ||
572 | |||
573 | .rc_interval = 100, | ||
574 | .rc_key_map = dvico_portable_rc_keys, | ||
575 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
576 | .rc_query = cxusb_rc_query, | ||
577 | |||
578 | .generic_bulk_ctrl_endpoint = 0x01, | ||
579 | /* parameter for the MPEG2-data transfer */ | 580 | /* parameter for the MPEG2-data transfer */ |
580 | .urb = { | 581 | .stream = { |
581 | .type = DVB_USB_BULK, | 582 | .type = USB_BULK, |
582 | .count = 5, | 583 | .count = 5, |
583 | .endpoint = 0x02, | 584 | .endpoint = 0x02, |
584 | .u = { | 585 | .u = { |
@@ -587,6 +588,19 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | |||
587 | } | 588 | } |
588 | } | 589 | } |
589 | }, | 590 | }, |
591 | }, | ||
592 | }, | ||
593 | |||
594 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
595 | |||
596 | .i2c_algo = &cxusb_i2c_algo, | ||
597 | |||
598 | .rc_interval = 100, | ||
599 | .rc_key_map = dvico_portable_rc_keys, | ||
600 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
601 | .rc_query = cxusb_rc_query, | ||
602 | |||
603 | .generic_bulk_ctrl_endpoint = 0x01, | ||
590 | 604 | ||
591 | .num_device_descs = 1, | 605 | .num_device_descs = 1, |
592 | .devices = { | 606 | .devices = { |
@@ -597,7 +611,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | |||
597 | } | 611 | } |
598 | }; | 612 | }; |
599 | 613 | ||
600 | static struct dvb_usb_properties cxusb_bluebird_dee1601_properties = { | 614 | static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { |
601 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 615 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
602 | 616 | ||
603 | .usb_ctrl = DEVICE_SPECIFIC, | 617 | .usb_ctrl = DEVICE_SPECIFIC, |
@@ -608,22 +622,15 @@ static struct dvb_usb_properties cxusb_bluebird_dee1601_properties = { | |||
608 | 622 | ||
609 | .size_of_priv = sizeof(struct cxusb_state), | 623 | .size_of_priv = sizeof(struct cxusb_state), |
610 | 624 | ||
625 | .num_adapters = 1, | ||
626 | .adapter = { | ||
627 | { | ||
611 | .streaming_ctrl = cxusb_streaming_ctrl, | 628 | .streaming_ctrl = cxusb_streaming_ctrl, |
612 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
613 | .frontend_attach = cxusb_dee1601_frontend_attach, | 629 | .frontend_attach = cxusb_dee1601_frontend_attach, |
614 | .tuner_attach = cxusb_dee1601_tuner_attach, | 630 | .tuner_attach = cxusb_dee1601_tuner_attach, |
615 | |||
616 | .i2c_algo = &cxusb_i2c_algo, | ||
617 | |||
618 | .rc_interval = 150, | ||
619 | .rc_key_map = dvico_mce_rc_keys, | ||
620 | .rc_key_map_size = ARRAY_SIZE(dvico_mce_rc_keys), | ||
621 | .rc_query = cxusb_rc_query, | ||
622 | |||
623 | .generic_bulk_ctrl_endpoint = 0x01, | ||
624 | /* parameter for the MPEG2-data transfer */ | 631 | /* parameter for the MPEG2-data transfer */ |
625 | .urb = { | 632 | .stream = { |
626 | .type = DVB_USB_BULK, | 633 | .type = USB_BULK, |
627 | .count = 5, | 634 | .count = 5, |
628 | .endpoint = 0x04, | 635 | .endpoint = 0x04, |
629 | .u = { | 636 | .u = { |
@@ -632,6 +639,19 @@ static struct dvb_usb_properties cxusb_bluebird_dee1601_properties = { | |||
632 | } | 639 | } |
633 | } | 640 | } |
634 | }, | 641 | }, |
642 | }, | ||
643 | }, | ||
644 | |||
645 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
646 | |||
647 | .i2c_algo = &cxusb_i2c_algo, | ||
648 | |||
649 | .rc_interval = 150, | ||
650 | .rc_key_map = dvico_mce_rc_keys, | ||
651 | .rc_key_map_size = ARRAY_SIZE(dvico_mce_rc_keys), | ||
652 | .rc_query = cxusb_rc_query, | ||
653 | |||
654 | .generic_bulk_ctrl_endpoint = 0x01, | ||
635 | 655 | ||
636 | .num_device_descs = 2, | 656 | .num_device_descs = 2, |
637 | .devices = { | 657 | .devices = { |
@@ -646,7 +666,7 @@ static struct dvb_usb_properties cxusb_bluebird_dee1601_properties = { | |||
646 | } | 666 | } |
647 | }; | 667 | }; |
648 | 668 | ||
649 | static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = { | 669 | static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { |
650 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 670 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
651 | 671 | ||
652 | .usb_ctrl = DEVICE_SPECIFIC, | 672 | .usb_ctrl = DEVICE_SPECIFIC, |
@@ -657,22 +677,16 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = { | |||
657 | 677 | ||
658 | .size_of_priv = sizeof(struct cxusb_state), | 678 | .size_of_priv = sizeof(struct cxusb_state), |
659 | 679 | ||
680 | .num_adapters = 2, | ||
681 | .adapter = { | ||
682 | { | ||
660 | .streaming_ctrl = cxusb_streaming_ctrl, | 683 | .streaming_ctrl = cxusb_streaming_ctrl, |
661 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
662 | .frontend_attach = cxusb_mt352_frontend_attach, | 684 | .frontend_attach = cxusb_mt352_frontend_attach, |
663 | .tuner_attach = cxusb_lgz201_tuner_attach, | 685 | .tuner_attach = cxusb_lgz201_tuner_attach, |
664 | 686 | ||
665 | .i2c_algo = &cxusb_i2c_algo, | ||
666 | |||
667 | .rc_interval = 100, | ||
668 | .rc_key_map = dvico_portable_rc_keys, | ||
669 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
670 | .rc_query = cxusb_rc_query, | ||
671 | |||
672 | .generic_bulk_ctrl_endpoint = 0x01, | ||
673 | /* parameter for the MPEG2-data transfer */ | 687 | /* parameter for the MPEG2-data transfer */ |
674 | .urb = { | 688 | .stream = { |
675 | .type = DVB_USB_BULK, | 689 | .type = USB_BULK, |
676 | .count = 5, | 690 | .count = 5, |
677 | .endpoint = 0x04, | 691 | .endpoint = 0x04, |
678 | .u = { | 692 | .u = { |
@@ -681,7 +695,18 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = { | |||
681 | } | 695 | } |
682 | } | 696 | } |
683 | }, | 697 | }, |
698 | }, | ||
699 | }, | ||
700 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
701 | |||
702 | .i2c_algo = &cxusb_i2c_algo, | ||
684 | 703 | ||
704 | .rc_interval = 100, | ||
705 | .rc_key_map = dvico_portable_rc_keys, | ||
706 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
707 | .rc_query = cxusb_rc_query, | ||
708 | |||
709 | .generic_bulk_ctrl_endpoint = 0x01, | ||
685 | .num_device_descs = 1, | 710 | .num_device_descs = 1, |
686 | .devices = { | 711 | .devices = { |
687 | { "DViCO FusionHDTV DVB-T USB (LGZ201)", | 712 | { "DViCO FusionHDTV DVB-T USB (LGZ201)", |
@@ -691,7 +716,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgz201_properties = { | |||
691 | } | 716 | } |
692 | }; | 717 | }; |
693 | 718 | ||
694 | static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = { | 719 | static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { |
695 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 720 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
696 | 721 | ||
697 | .usb_ctrl = DEVICE_SPECIFIC, | 722 | .usb_ctrl = DEVICE_SPECIFIC, |
@@ -702,22 +727,16 @@ static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = { | |||
702 | 727 | ||
703 | .size_of_priv = sizeof(struct cxusb_state), | 728 | .size_of_priv = sizeof(struct cxusb_state), |
704 | 729 | ||
730 | .num_adapters = 1, | ||
731 | .adapter = { | ||
732 | { | ||
705 | .streaming_ctrl = cxusb_streaming_ctrl, | 733 | .streaming_ctrl = cxusb_streaming_ctrl, |
706 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
707 | .frontend_attach = cxusb_mt352_frontend_attach, | 734 | .frontend_attach = cxusb_mt352_frontend_attach, |
708 | .tuner_attach = cxusb_dtt7579_tuner_attach, | 735 | .tuner_attach = cxusb_dtt7579_tuner_attach, |
709 | 736 | ||
710 | .i2c_algo = &cxusb_i2c_algo, | ||
711 | |||
712 | .rc_interval = 100, | ||
713 | .rc_key_map = dvico_portable_rc_keys, | ||
714 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
715 | .rc_query = cxusb_rc_query, | ||
716 | |||
717 | .generic_bulk_ctrl_endpoint = 0x01, | ||
718 | /* parameter for the MPEG2-data transfer */ | 737 | /* parameter for the MPEG2-data transfer */ |
719 | .urb = { | 738 | .stream = { |
720 | .type = DVB_USB_BULK, | 739 | .type = USB_BULK, |
721 | .count = 5, | 740 | .count = 5, |
722 | .endpoint = 0x04, | 741 | .endpoint = 0x04, |
723 | .u = { | 742 | .u = { |
@@ -726,6 +745,18 @@ static struct dvb_usb_properties cxusb_bluebird_dtt7579_properties = { | |||
726 | } | 745 | } |
727 | } | 746 | } |
728 | }, | 747 | }, |
748 | }, | ||
749 | }, | ||
750 | .power_ctrl = cxusb_bluebird_power_ctrl, | ||
751 | |||
752 | .i2c_algo = &cxusb_i2c_algo, | ||
753 | |||
754 | .rc_interval = 100, | ||
755 | .rc_key_map = dvico_portable_rc_keys, | ||
756 | .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), | ||
757 | .rc_query = cxusb_rc_query, | ||
758 | |||
759 | .generic_bulk_ctrl_endpoint = 0x01, | ||
729 | 760 | ||
730 | .num_device_descs = 1, | 761 | .num_device_descs = 1, |
731 | .devices = { | 762 | .devices = { |