aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/m920x.c
diff options
context:
space:
mode:
authorPierre Willenbrock <pierre@pirsoft.de>2007-03-18 18:54:07 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:44:59 -0400
commitd4ca23b188d458ef508649a0c6866937b48d4bf8 (patch)
treeb2d4311a27becfc3175d1fb499cf02a2466cbe09 /drivers/media/dvb/dvb-usb/m920x.c
parent08cdf94c076121cd0214ef9ea18ae3fbb9ace684 (diff)
V4L/DVB (5459): M920x: add support for Anubis Electronics / MSI Digi Vox Mini II
Add support for Anubis Electronics "Lifeview" (USB-ID: 0x10fd:0x1513) Signed-off-by: Pierre Willenbrock <pierre@pirsoft.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/m920x.c')
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.c83
1 files changed, 82 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index fd6583bed335..45d7bc214c18 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -14,6 +14,8 @@
14#include "mt352.h" 14#include "mt352.h"
15#include "mt352_priv.h" 15#include "mt352_priv.h"
16#include "qt1010.h" 16#include "qt1010.h"
17#include "tda1004x.h"
18#include "tda827x.h"
17 19
18/* debug */ 20/* debug */
19static int dvb_usb_m920x_debug; 21static int dvb_usb_m920x_debug;
@@ -414,8 +416,40 @@ static int megasky_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
414 return 0; 416 return 0;
415} 417}
416 418
419static struct tda1004x_config digivox_tda10046_config = {
420 .demod_address = 0x08,
421 .invert = 0,
422 .invert_oclk = 0,
423 .ts_mode = TDA10046_TS_SERIAL,
424 .xtal_freq = TDA10046_XTAL_16M,
425 .if_freq = TDA10046_FREQ_045,
426 .agc_config = TDA10046_AGC_TDA827X,
427 .gpio_config = TDA10046_GPTRI,
428 .request_firmware = NULL,
429};
430
431static int digivox_tda10046_frontend_attach(struct dvb_usb_adapter *adap)
432{
433 deb_rc("digivox_tda10046_frontend_attach!\n");
434
435 if ((adap->fe = dvb_attach(tda10046_attach, &digivox_tda10046_config,
436 &adap->dev->i2c_adap)) == NULL)
437 return -EIO;
438
439 return 0;
440}
441
442static int digivox_tda8275_tuner_attach(struct dvb_usb_adapter *adap)
443{
444 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap,
445 NULL) == NULL)
446 return -ENODEV;
447 return 0;
448}
449
417/* DVB USB Driver stuff */ 450/* DVB USB Driver stuff */
418static struct dvb_usb_device_properties megasky_properties; 451static struct dvb_usb_device_properties megasky_properties;
452static struct dvb_usb_device_properties digivox_mini_ii_properties;
419 453
420static int m920x_probe(struct usb_interface *intf, 454static int m920x_probe(struct usb_interface *intf,
421 const struct usb_device_id *id) 455 const struct usb_device_id *id)
@@ -426,7 +460,8 @@ static int m920x_probe(struct usb_interface *intf,
426 460
427 deb_rc("Probed!\n"); 461 deb_rc("Probed!\n");
428 462
429 if ((ret = dvb_usb_device_init(intf, &megasky_properties, THIS_MODULE, &d)) == 0) 463 if (((ret = dvb_usb_device_init(intf, &megasky_properties, THIS_MODULE, &d)) == 0) ||
464 ((ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties, THIS_MODULE, &d)) == 0))
430 goto found; 465 goto found;
431 466
432 return ret; 467 return ret;
@@ -451,6 +486,8 @@ found:
451 486
452static struct usb_device_id m920x_table [] = { 487static struct usb_device_id m920x_table [] = {
453 { USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) }, 488 { USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) },
489 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
490 USB_PID_MSI_DIGI_VOX_MINI_II) },
454 { } /* Terminating entry */ 491 { } /* Terminating entry */
455}; 492};
456MODULE_DEVICE_TABLE (usb, m920x_table); 493MODULE_DEVICE_TABLE (usb, m920x_table);
@@ -500,6 +537,50 @@ static struct dvb_usb_device_properties megasky_properties = {
500 { "MSI Mega Sky 580 DVB-T USB2.0", 537 { "MSI Mega Sky 580 DVB-T USB2.0",
501 { &m920x_table[0], NULL }, 538 { &m920x_table[0], NULL },
502 { NULL }, 539 { NULL },
540 }
541 }
542};
543
544static struct dvb_usb_device_properties digivox_mini_ii_properties = {
545 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
546
547 .usb_ctrl = DEVICE_SPECIFIC,
548 .firmware = "dvb-usb-digivox-02.fw",
549 .download_firmware = m9206_firmware_download,
550
551 .size_of_priv = sizeof(struct m9206_state),
552
553 .identify_state = m920x_identify_state,
554 .num_adapters = 1,
555 .adapter = {{
556 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
557 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
558
559 .pid_filter_count = 8,
560 .pid_filter = m9206_pid_filter,
561 .pid_filter_ctrl = m9206_pid_filter_ctrl,
562
563 .frontend_attach = digivox_tda10046_frontend_attach,
564 .tuner_attach = digivox_tda8275_tuner_attach,
565
566 .stream = {
567 .type = USB_BULK,
568 .count = 8,
569 .endpoint = 0x81,
570 .u = {
571 .bulk = {
572 .buffersize = 0x4000,
573 }
574 }
575 },
576 }},
577 .i2c_algo = &m9206_i2c_algo,
578
579 .num_device_descs = 1,
580 .devices = {
581 { "MSI DIGI VOX mini II DVB-T USB2.0",
582 { &m920x_table[1], NULL },
583 { NULL },
503 }, 584 },
504 } 585 }
505}; 586};