1 /* DVB USB compliant linux driver for MSI Mega Sky 580 DVB-T USB2.0 receiver
3 * Copyright (C) 2006 Aapo Tahkola (aet@rasterburn.org)
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation, version 2.
9 * see Documentation/dvb/README.dvb-usb for more information
15 #include "mt352_priv.h"
21 static int dvb_usb_m920x_debug;
22 module_param_named(debug,dvb_usb_m920x_debug, int, 0644);
23 MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
25 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
27 static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid);
29 static inline int m920x_read(struct usb_device *udev, u8 request, u16 value,
30 u16 index, void *data, int size)
34 ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
35 request, USB_TYPE_VENDOR | USB_DIR_IN,
36 value, index, data, size, 2000);
38 printk(KERN_INFO "m920x_read = error: %d\n", ret);
43 deb("m920x_read = no data\n");
50 static inline int m920x_write(struct usb_device *udev, u8 request,
55 ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
56 request, USB_TYPE_VENDOR | USB_DIR_OUT,
57 value, index, NULL, 0, 2000);
62 static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq)
64 int ret = 0, i, epi, flags = 0;
65 int adap_enabled[M9206_MAX_ADAPTERS] = { 0 };
67 /* Remote controller init. */
68 if (d->props.rc_query) {
69 deb("Initialising remote control\n");
70 while (rc_seq->address) {
71 if ((ret = m920x_write(d->udev, M9206_CORE,
73 rc_seq->address)) != 0) {
74 deb("Initialising remote control failed\n");
81 deb("Initialising remote control success\n");
84 for (i = 0; i < d->props.num_adapters; i++)
85 flags |= d->adapter[i].props.caps;
87 /* Some devices(Dposh) might crash if we attempt touch at all. */
88 if (flags & DVB_USB_ADAP_HAS_PID_FILTER) {
89 for (i = 0; i < d->props.num_adapters; i++) {
90 epi = d->adapter[i].props.stream.endpoint - 0x81;
92 if (epi < 0 || epi >= M9206_MAX_ADAPTERS) {
93 printk(KERN_INFO "m920x: Unexpected adapter endpoint!\n");
97 adap_enabled[epi] = 1;
100 for (i = 0; i < M9206_MAX_ADAPTERS; i++) {
104 if ((ret = m920x_set_filter(d, 0x81 + i, 0, 0x0)) != 0)
107 if ((ret = m920x_set_filter(d, 0x81 + i, 0, 0x02f5)) != 0)
115 static int m920x_init_ep(struct usb_interface *intf)
117 struct usb_device *udev = interface_to_usbdev(intf);
118 struct usb_host_interface *alt;
120 if ((alt = usb_altnum_to_altsetting(intf, 1)) == NULL) {
121 deb("No alt found!\n");
125 return usb_set_interface(udev, alt->desc.bInterfaceNumber,
126 alt->desc.bAlternateSetting);
129 static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
131 struct m920x_state *m = d->priv;
135 if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_STATE, rc_state, 1)) != 0)
138 if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0)
141 for (i = 0; i < d->props.rc_key_map_size; i++)
142 if (d->props.rc_key_map[i].data == rc_state[1]) {
143 *event = d->props.rc_key_map[i].event;
145 switch(rc_state[0]) {
147 *state = REMOTE_NO_KEY_PRESSED;
150 case 0x88: /* framing error or "invalid code" */
154 *state = REMOTE_NO_KEY_PRESSED;
161 *state = REMOTE_KEY_PRESSED;
165 /* prevent immediate auto-repeat */
166 if (++m->rep_count > 2)
167 *state = REMOTE_KEY_REPEAT;
169 *state = REMOTE_NO_KEY_PRESSED;
173 deb("Unexpected rc state %02x\n", rc_state[0]);
174 *state = REMOTE_NO_KEY_PRESSED;
179 if (rc_state[1] != 0)
180 deb("Unknown rc key %02x\n", rc_state[1]);
182 *state = REMOTE_NO_KEY_PRESSED;
190 static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
192 struct dvb_usb_device *d = i2c_get_adapdata(adap);
199 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
202 for (i = 0; i < num; i++) {
203 if (msg[i].flags & (I2C_M_NO_RD_ACK | I2C_M_IGNORE_NAK | I2C_M_TEN) || msg[i].len == 0) {
204 /* For a 0 byte message, I think sending the address
205 * to index 0x80|0x40 would be the correct thing to
206 * do. However, zero byte messages are only used for
207 * probing, and since we don't know how to get the
208 * slave's ack, we can't probe. */
212 /* Send START & address/RW bit */
213 if (!(msg[i].flags & I2C_M_NOSTART)) {
214 if ((ret = m920x_write(d->udev, M9206_I2C,
216 (msg[i].flags & I2C_M_RD ? 0x01 : 0), 0x80)) != 0)
218 /* Should check for ack here, if we knew how. */
220 if (msg[i].flags & I2C_M_RD) {
221 for (j = 0; j < msg[i].len; j++) {
222 /* Last byte of transaction?
223 * Send STOP, otherwise send ACK. */
224 int stop = (i+1 == num && j+1 == msg[i].len) ? 0x40 : 0x01;
226 if ((ret = m920x_read(d->udev, M9206_I2C, 0x0,
228 &msg[i].buf[j], 1)) != 0)
232 for (j = 0; j < msg[i].len; j++) {
233 /* Last byte of transaction? Then send STOP. */
234 int stop = (i+1 == num && j+1 == msg[i].len) ? 0x40 : 0x00;
236 if ((ret = m920x_write(d->udev, M9206_I2C, msg[i].buf[j], stop)) != 0)
238 /* Should check for ack here too. */
245 mutex_unlock(&d->i2c_mutex);
250 static u32 m920x_i2c_func(struct i2c_adapter *adapter)
255 static struct i2c_algorithm m920x_i2c_algo = {
256 .master_xfer = m920x_i2c_xfer,
257 .functionality = m920x_i2c_func,
261 static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid)
270 if ((ret = m920x_write(d->udev, M9206_FILTER, pid, (type << 8) | (idx * 4) )) != 0)
273 if ((ret = m920x_write(d->udev, M9206_FILTER, 0, (type << 8) | (idx * 4) )) != 0)
279 static int m920x_update_filters(struct dvb_usb_adapter *adap)
281 struct m920x_state *m = adap->dev->priv;
282 int enabled = m->filtering_enabled[adap->id];
283 int i, ret = 0, filter = 0;
284 int ep = adap->props.stream.endpoint;
286 for (i = 0; i < M9206_MAX_FILTERS; i++)
287 if (m->filters[adap->id][i] == 8192)
290 /* Disable all filters */
291 if ((ret = m920x_set_filter(adap->dev, ep, 1, enabled)) != 0)
294 for (i = 0; i < M9206_MAX_FILTERS; i++)
295 if ((ret = m920x_set_filter(adap->dev, ep, i + 2, 0)) != 0)
300 for (i = 0; i < M9206_MAX_FILTERS; i++) {
301 if (m->filters[adap->id][i] == 0)
304 if ((ret = m920x_set_filter(adap->dev, ep, filter + 2, m->filters[adap->id][i])) != 0)
314 static int m920x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
316 struct m920x_state *m = adap->dev->priv;
318 m->filtering_enabled[adap->id] = onoff ? 1 : 0;
320 return m920x_update_filters(adap);
323 static int m920x_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff)
325 struct m920x_state *m = adap->dev->priv;
327 m->filters[adap->id][index] = onoff ? pid : 0;
329 return m920x_update_filters(adap);
332 static int m920x_firmware_download(struct usb_device *udev, const struct firmware *fw)
334 u16 value, index, size;
336 int i, pass, ret = 0;
338 buff = kmalloc(65536, GFP_KERNEL);
340 if ((ret = m920x_read(udev, M9206_FILTER, 0x0, 0x8000, read, 4)) != 0)
342 deb("%x %x %x %x\n", read[0], read[1], read[2], read[3]);
344 if ((ret = m920x_read(udev, M9206_FW, 0x0, 0x0, read, 1)) != 0)
346 deb("%x\n", read[0]);
348 for (pass = 0; pass < 2; pass++) {
349 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) {
350 value = le16_to_cpu(*(u16 *)(fw->data + i));
353 index = le16_to_cpu(*(u16 *)(fw->data + i));
356 size = le16_to_cpu(*(u16 *)(fw->data + i));
360 /* Will stall if using fw->data ... */
361 memcpy(buff, fw->data + i, size);
363 ret = usb_control_msg(udev, usb_sndctrlpipe(udev,0),
365 USB_TYPE_VENDOR | USB_DIR_OUT,
366 value, index, buff, size, 20);
368 deb("error while uploading fw!\n");
377 deb("bad firmware file!\n");
385 /* m920x will disconnect itself from the bus after this. */
386 (void) m920x_write(udev, M9206_CORE, 0x01, M9206_FW_GO);
387 deb("firmware uploaded!\n");
395 /* Callbacks for DVB USB */
396 static int m920x_identify_state(struct usb_device *udev,
397 struct dvb_usb_device_properties *props,
398 struct dvb_usb_device_description **desc,
401 struct usb_host_interface *alt;
403 alt = usb_altnum_to_altsetting(usb_ifnum_to_if(udev, 0), 1);
404 *cold = (alt == NULL) ? 1 : 0;
409 /* demod configurations */
410 static int m920x_mt352_demod_init(struct dvb_frontend *fe)
413 u8 config[] = { CONFIG, 0x3d };
414 u8 clock[] = { CLOCK_CTL, 0x30 };
415 u8 reset[] = { RESET, 0x80 };
416 u8 adc_ctl[] = { ADC_CTL_1, 0x40 };
417 u8 agc[] = { AGC_TARGET, 0x1c, 0x20 };
418 u8 sec_agc[] = { 0x69, 0x00, 0xff, 0xff, 0x40, 0xff, 0x00, 0x40, 0x40 };
419 u8 unk1[] = { 0x93, 0x1a };
420 u8 unk2[] = { 0xb5, 0x7a };
422 deb("Demod init!\n");
424 if ((ret = mt352_write(fe, config, ARRAY_SIZE(config))) != 0)
426 if ((ret = mt352_write(fe, clock, ARRAY_SIZE(clock))) != 0)
428 if ((ret = mt352_write(fe, reset, ARRAY_SIZE(reset))) != 0)
430 if ((ret = mt352_write(fe, adc_ctl, ARRAY_SIZE(adc_ctl))) != 0)
432 if ((ret = mt352_write(fe, agc, ARRAY_SIZE(agc))) != 0)
434 if ((ret = mt352_write(fe, sec_agc, ARRAY_SIZE(sec_agc))) != 0)
436 if ((ret = mt352_write(fe, unk1, ARRAY_SIZE(unk1))) != 0)
438 if ((ret = mt352_write(fe, unk2, ARRAY_SIZE(unk2))) != 0)
444 static struct mt352_config m920x_mt352_config = {
445 .demod_address = 0x0f,
447 .demod_init = m920x_mt352_demod_init,
450 static struct tda1004x_config m920x_tda10046_08_config = {
451 .demod_address = 0x08,
454 .ts_mode = TDA10046_TS_SERIAL,
455 .xtal_freq = TDA10046_XTAL_16M,
456 .if_freq = TDA10046_FREQ_045,
457 .agc_config = TDA10046_AGC_TDA827X,
458 .gpio_config = TDA10046_GPTRI,
459 .request_firmware = NULL,
462 static struct tda1004x_config m920x_tda10046_0b_config = {
463 .demod_address = 0x0b,
466 .ts_mode = TDA10046_TS_SERIAL,
467 .xtal_freq = TDA10046_XTAL_16M,
468 .if_freq = TDA10046_FREQ_045,
469 .agc_config = TDA10046_AGC_TDA827X,
470 .gpio_config = TDA10046_GPTRI,
471 .request_firmware = NULL, /* uses firmware EEPROM */
474 /* tuner configurations */
475 static struct qt1010_config m920x_qt1010_config = {
479 /* Callbacks for DVB USB */
480 static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap)
482 deb("%s\n",__func__);
484 if ((adap->fe = dvb_attach(mt352_attach,
486 &adap->dev->i2c_adap)) == NULL)
492 static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap)
494 deb("%s\n",__func__);
496 if ((adap->fe = dvb_attach(tda10046_attach,
497 &m920x_tda10046_08_config,
498 &adap->dev->i2c_adap)) == NULL)
504 static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap)
506 deb("%s\n",__func__);
508 if ((adap->fe = dvb_attach(tda10046_attach,
509 &m920x_tda10046_0b_config,
510 &adap->dev->i2c_adap)) == NULL)
516 static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap)
518 deb("%s\n",__func__);
520 if (dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL)
526 static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap)
528 deb("%s\n",__func__);
530 if (dvb_attach(tda827x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL)
536 static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap)
538 deb("%s\n",__func__);
540 if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL)
546 /* device-specific initialization */
547 static struct m920x_inits megasky_rc_init [] = {
548 { M9206_RC_INIT2, 0xa8 },
549 { M9206_RC_INIT1, 0x51 },
550 { } /* terminating entry */
553 static struct m920x_inits tvwalkertwin_rc_init [] = {
554 { M9206_RC_INIT2, 0x00 },
555 { M9206_RC_INIT1, 0xef },
559 { } /* terminating entry */
563 static struct dvb_usb_rc_key megasky_rc_keys [] = {
564 { 0x0, 0x12, KEY_POWER },
565 { 0x0, 0x1e, KEY_CYCLEWINDOWS }, /* min/max */
566 { 0x0, 0x02, KEY_CHANNELUP },
567 { 0x0, 0x05, KEY_CHANNELDOWN },
568 { 0x0, 0x03, KEY_VOLUMEUP },
569 { 0x0, 0x06, KEY_VOLUMEDOWN },
570 { 0x0, 0x04, KEY_MUTE },
571 { 0x0, 0x07, KEY_OK }, /* TS */
572 { 0x0, 0x08, KEY_STOP },
573 { 0x0, 0x09, KEY_MENU }, /* swap */
574 { 0x0, 0x0a, KEY_REWIND },
575 { 0x0, 0x1b, KEY_PAUSE },
576 { 0x0, 0x1f, KEY_FASTFORWARD },
577 { 0x0, 0x0c, KEY_RECORD },
578 { 0x0, 0x0d, KEY_CAMERA }, /* screenshot */
579 { 0x0, 0x0e, KEY_COFFEE }, /* "MTS" */
582 static struct dvb_usb_rc_key tvwalkertwin_rc_keys [] = {
583 { 0x0, 0x01, KEY_ZOOM }, /* Full Screen */
584 { 0x0, 0x02, KEY_CAMERA }, /* snapshot */
585 { 0x0, 0x03, KEY_MUTE },
586 { 0x0, 0x04, KEY_REWIND },
587 { 0x0, 0x05, KEY_PLAYPAUSE }, /* Play/Pause */
588 { 0x0, 0x06, KEY_FASTFORWARD },
589 { 0x0, 0x07, KEY_RECORD },
590 { 0x0, 0x08, KEY_STOP },
591 { 0x0, 0x09, KEY_TIME }, /* Timeshift */
592 { 0x0, 0x0c, KEY_COFFEE }, /* Recall */
593 { 0x0, 0x0e, KEY_CHANNELUP },
594 { 0x0, 0x12, KEY_POWER },
595 { 0x0, 0x15, KEY_MENU }, /* source */
596 { 0x0, 0x18, KEY_CYCLEWINDOWS }, /* TWIN PIP */
597 { 0x0, 0x1a, KEY_CHANNELDOWN },
598 { 0x0, 0x1b, KEY_VOLUMEDOWN },
599 { 0x0, 0x1e, KEY_VOLUMEUP },
602 /* DVB USB Driver stuff */
603 static struct dvb_usb_device_properties megasky_properties;
604 static struct dvb_usb_device_properties digivox_mini_ii_properties;
605 static struct dvb_usb_device_properties tvwalkertwin_properties;
606 static struct dvb_usb_device_properties dposh_properties;
608 static int m920x_probe(struct usb_interface *intf,
609 const struct usb_device_id *id)
611 struct dvb_usb_device *d = NULL;
613 struct m920x_inits *rc_init_seq = NULL;
614 int bInterfaceNumber = intf->cur_altsetting->desc.bInterfaceNumber;
616 deb("Probing for m920x device at interface %d\n", bInterfaceNumber);
618 if (bInterfaceNumber == 0) {
619 /* Single-tuner device, or first interface on
623 ret = dvb_usb_device_init(intf, &megasky_properties,
624 THIS_MODULE, &d, adapter_nr);
626 rc_init_seq = megasky_rc_init;
630 ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties,
631 THIS_MODULE, &d, adapter_nr);
633 /* No remote control, so no rc_init_seq */
637 /* This configures both tuners on the TV Walker Twin */
638 ret = dvb_usb_device_init(intf, &tvwalkertwin_properties,
639 THIS_MODULE, &d, adapter_nr);
641 rc_init_seq = tvwalkertwin_rc_init;
645 ret = dvb_usb_device_init(intf, &dposh_properties,
646 THIS_MODULE, &d, adapter_nr);
648 /* Remote controller not supported yet. */
654 /* Another interface on a multi-tuner device */
656 /* The LifeView TV Walker Twin gets here, but struct
657 * tvwalkertwin_properties already configured both
658 * tuners, so there is nothing for us to do here
663 if ((ret = m920x_init_ep(intf)) < 0)
666 if (d && (ret = m920x_init(d, rc_init_seq)) != 0)
672 static struct usb_device_id m920x_table [] = {
673 { USB_DEVICE(USB_VID_MSI, USB_PID_MSI_MEGASKY580) },
674 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
675 USB_PID_MSI_DIGI_VOX_MINI_II) },
676 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
677 USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD) },
678 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC,
679 USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM) },
680 { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_COLD) },
681 { USB_DEVICE(USB_VID_DPOSH, USB_PID_DPOSH_M9206_WARM) },
682 { } /* Terminating entry */
684 MODULE_DEVICE_TABLE (usb, m920x_table);
686 static struct dvb_usb_device_properties megasky_properties = {
687 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
689 .usb_ctrl = DEVICE_SPECIFIC,
690 .firmware = "dvb-usb-megasky-02.fw",
691 .download_firmware = m920x_firmware_download,
694 .rc_key_map = megasky_rc_keys,
695 .rc_key_map_size = ARRAY_SIZE(megasky_rc_keys),
696 .rc_query = m920x_rc_query,
698 .size_of_priv = sizeof(struct m920x_state),
700 .identify_state = m920x_identify_state,
703 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
704 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
706 .pid_filter_count = 8,
707 .pid_filter = m920x_pid_filter,
708 .pid_filter_ctrl = m920x_pid_filter_ctrl,
710 .frontend_attach = m920x_mt352_frontend_attach,
711 .tuner_attach = m920x_qt1010_tuner_attach,
724 .i2c_algo = &m920x_i2c_algo,
726 .num_device_descs = 1,
728 { "MSI Mega Sky 580 DVB-T USB2.0",
729 { &m920x_table[0], NULL },
735 static struct dvb_usb_device_properties digivox_mini_ii_properties = {
736 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
738 .usb_ctrl = DEVICE_SPECIFIC,
739 .firmware = "dvb-usb-digivox-02.fw",
740 .download_firmware = m920x_firmware_download,
742 .size_of_priv = sizeof(struct m920x_state),
744 .identify_state = m920x_identify_state,
747 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
748 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
750 .pid_filter_count = 8,
751 .pid_filter = m920x_pid_filter,
752 .pid_filter_ctrl = m920x_pid_filter_ctrl,
754 .frontend_attach = m920x_tda10046_08_frontend_attach,
755 .tuner_attach = m920x_tda8275_60_tuner_attach,
763 .buffersize = 0x4000,
768 .i2c_algo = &m920x_i2c_algo,
770 .num_device_descs = 1,
772 { "MSI DIGI VOX mini II DVB-T USB2.0",
773 { &m920x_table[1], NULL },
779 /* LifeView TV Walker Twin support by Nick Andrew <nick@nick-andrew.net>
781 * LifeView TV Walker Twin has 1 x M9206, 2 x TDA10046, 2 x TDA8275A
782 * TDA10046 #0 is located at i2c address 0x08
783 * TDA10046 #1 is located at i2c address 0x0b
784 * TDA8275A #0 is located at i2c address 0x60
785 * TDA8275A #1 is located at i2c address 0x61
787 static struct dvb_usb_device_properties tvwalkertwin_properties = {
788 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
790 .usb_ctrl = DEVICE_SPECIFIC,
791 .firmware = "dvb-usb-tvwalkert.fw",
792 .download_firmware = m920x_firmware_download,
795 .rc_key_map = tvwalkertwin_rc_keys,
796 .rc_key_map_size = ARRAY_SIZE(tvwalkertwin_rc_keys),
797 .rc_query = m920x_rc_query,
799 .size_of_priv = sizeof(struct m920x_state),
801 .identify_state = m920x_identify_state,
804 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
805 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
807 .pid_filter_count = 8,
808 .pid_filter = m920x_pid_filter,
809 .pid_filter_ctrl = m920x_pid_filter_ctrl,
811 .frontend_attach = m920x_tda10046_08_frontend_attach,
812 .tuner_attach = m920x_tda8275_60_tuner_attach,
824 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
825 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
827 .pid_filter_count = 8,
828 .pid_filter = m920x_pid_filter,
829 .pid_filter_ctrl = m920x_pid_filter_ctrl,
831 .frontend_attach = m920x_tda10046_0b_frontend_attach,
832 .tuner_attach = m920x_tda8275_61_tuner_attach,
845 .i2c_algo = &m920x_i2c_algo,
847 .num_device_descs = 1,
849 { .name = "LifeView TV Walker Twin DVB-T USB2.0",
850 .cold_ids = { &m920x_table[2], NULL },
851 .warm_ids = { &m920x_table[3], NULL },
856 static struct dvb_usb_device_properties dposh_properties = {
857 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
859 .usb_ctrl = DEVICE_SPECIFIC,
860 .firmware = "dvb-usb-dposh-01.fw",
861 .download_firmware = m920x_firmware_download,
863 .size_of_priv = sizeof(struct m920x_state),
865 .identify_state = m920x_identify_state,
868 /* Hardware pid filters don't work with this device/firmware */
870 .frontend_attach = m920x_mt352_frontend_attach,
871 .tuner_attach = m920x_qt1010_tuner_attach,
884 .i2c_algo = &m920x_i2c_algo,
886 .num_device_descs = 1,
888 { .name = "Dposh DVB-T USB2.0",
889 .cold_ids = { &m920x_table[4], NULL },
890 .warm_ids = { &m920x_table[5], NULL },
895 static struct usb_driver m920x_driver = {
896 .name = "dvb_usb_m920x",
897 .probe = m920x_probe,
898 .disconnect = dvb_usb_device_exit,
899 .id_table = m920x_table,
903 static int __init m920x_module_init(void)
907 if ((ret = usb_register(&m920x_driver))) {
908 err("usb_register failed. Error number %d", ret);
915 static void __exit m920x_module_exit(void)
917 /* deregister this driver from the USB subsystem */
918 usb_deregister(&m920x_driver);
921 module_init (m920x_module_init);
922 module_exit (m920x_module_exit);
924 MODULE_AUTHOR("Aapo Tahkola <aet@rasterburn.org>");
925 MODULE_DESCRIPTION("DVB Driver for ULI M920x");
926 MODULE_VERSION("0.1");
927 MODULE_LICENSE("GPL");