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 static inline int m920x_read(struct usb_device
*udev
, u8 request
, u16 value
,
26 u16 index
, void *data
, int size
)
30 ret
= usb_control_msg(udev
, usb_rcvctrlpipe(udev
, 0),
31 request
, USB_TYPE_VENDOR
| USB_DIR_IN
,
32 value
, index
, data
, size
, 2000);
34 printk(KERN_INFO
"m920x_read = error: %d\n", ret
);
39 deb("m920x_read = no data\n");
46 static inline int m920x_write(struct usb_device
*udev
, u8 request
,
51 ret
= usb_control_msg(udev
, usb_sndctrlpipe(udev
, 0),
52 request
, USB_TYPE_VENDOR
| USB_DIR_OUT
,
53 value
, index
, NULL
, 0, 2000);
58 static int m920x_init(struct dvb_usb_device
*d
, struct m920x_inits
*rc_seq
)
62 /* Remote controller init. */
63 if (d
->props
.rc_query
) {
64 deb("Initialising remote control\n");
65 while (rc_seq
->address
) {
66 if ((ret
= m920x_write(d
->udev
, M9206_CORE
,
68 rc_seq
->address
)) != 0) {
69 deb("Initialising remote control failed\n");
76 deb("Initialising remote control success\n");
82 static int m920x_rc_query(struct dvb_usb_device
*d
, u32
*event
, int *state
)
84 struct m920x_state
*m
= d
->priv
;
88 if ((ret
= m920x_read(d
->udev
, M9206_CORE
, 0x0, M9206_RC_STATE
, rc_state
, 1)) != 0)
91 if ((ret
= m920x_read(d
->udev
, M9206_CORE
, 0x0, M9206_RC_KEY
, rc_state
+ 1, 1)) != 0)
94 for (i
= 0; i
< d
->props
.rc_key_map_size
; i
++)
95 if (d
->props
.rc_key_map
[i
].data
== rc_state
[1]) {
96 *event
= d
->props
.rc_key_map
[i
].event
;
100 *state
= REMOTE_NO_KEY_PRESSED
;
103 case 0x88: /* framing error or "invalid code" */
107 *state
= REMOTE_NO_KEY_PRESSED
;
114 *state
= REMOTE_KEY_PRESSED
;
118 /* prevent immediate auto-repeat */
119 if (++m
->rep_count
> 2)
120 *state
= REMOTE_KEY_REPEAT
;
122 *state
= REMOTE_NO_KEY_PRESSED
;
126 deb("Unexpected rc state %02x\n", rc_state
[0]);
127 *state
= REMOTE_NO_KEY_PRESSED
;
132 if (rc_state
[1] != 0)
133 deb("Unknown rc key %02x\n", rc_state
[1]);
135 *state
= REMOTE_NO_KEY_PRESSED
;
143 static int m920x_i2c_xfer(struct i2c_adapter
*adap
, struct i2c_msg msg
[], int num
)
145 struct dvb_usb_device
*d
= i2c_get_adapdata(adap
);
152 if (mutex_lock_interruptible(&d
->i2c_mutex
) < 0)
155 for (i
= 0; i
< num
; i
++) {
156 if (msg
[i
].flags
& (I2C_M_NO_RD_ACK
| I2C_M_IGNORE_NAK
| I2C_M_TEN
) || msg
[i
].len
== 0) {
157 /* For a 0 byte message, I think sending the address
158 * to index 0x80|0x40 would be the correct thing to
159 * do. However, zero byte messages are only used for
160 * probing, and since we don't know how to get the
161 * slave's ack, we can't probe. */
165 /* Send START & address/RW bit */
166 if (!(msg
[i
].flags
& I2C_M_NOSTART
)) {
167 if ((ret
= m920x_write(d
->udev
, M9206_I2C
,
169 (msg
[i
].flags
& I2C_M_RD
? 0x01 : 0), 0x80)) != 0)
171 /* Should check for ack here, if we knew how. */
173 if (msg
[i
].flags
& I2C_M_RD
) {
174 for (j
= 0; j
< msg
[i
].len
; j
++) {
175 /* Last byte of transaction?
176 * Send STOP, otherwise send ACK. */
177 int stop
= (i
+1 == num
&& j
+1 == msg
[i
].len
) ? 0x40 : 0x01;
179 if ((ret
= m920x_read(d
->udev
, M9206_I2C
, 0x0,
181 &msg
[i
].buf
[j
], 1)) != 0)
185 for (j
= 0; j
< msg
[i
].len
; j
++) {
186 /* Last byte of transaction? Then send STOP. */
187 int stop
= (i
+1 == num
&& j
+1 == msg
[i
].len
) ? 0x40 : 0x00;
189 if ((ret
= m920x_write(d
->udev
, M9206_I2C
, msg
[i
].buf
[j
], stop
)) != 0)
191 /* Should check for ack here too. */
198 mutex_unlock(&d
->i2c_mutex
);
203 static u32
m920x_i2c_func(struct i2c_adapter
*adapter
)
208 static struct i2c_algorithm m920x_i2c_algo
= {
209 .master_xfer
= m920x_i2c_xfer
,
210 .functionality
= m920x_i2c_func
,
214 static int m920x_set_filter(struct dvb_usb_adapter
*adap
,
215 int type
, int idx
, int pid
)
224 if ((ret
= m920x_write(adap
->dev
->udev
, M9206_FILTER
, pid
, (type
<< 8) | (idx
* 4) )) != 0)
227 if ((ret
= m920x_write(adap
->dev
->udev
, M9206_FILTER
, 0, (type
<< 8) | (idx
* 4) )) != 0)
233 static int m920x_update_filters(struct dvb_usb_adapter
*adap
)
235 struct m920x_state
*m
= adap
->dev
->priv
;
236 int enabled
= m
->filtering_enabled
;
237 int i
, ret
= 0, filter
= 0;
239 for (i
= 0; i
< M9206_MAX_FILTERS
; i
++)
240 if (m
->filters
[i
] == 8192)
243 /* Disable all filters */
244 if ((ret
= m920x_set_filter(adap
, 0x81, 1, enabled
)) != 0)
247 for (i
= 0; i
< M9206_MAX_FILTERS
; i
++)
248 if ((ret
= m920x_set_filter(adap
, 0x81, i
+ 2, 0)) != 0)
251 if ((ret
= m920x_set_filter(adap
, 0x82, 0, 0x0)) != 0)
256 for (i
= 0; i
< M9206_MAX_FILTERS
; i
++) {
257 if (m
->filters
[i
] == 0)
260 if ((ret
= m920x_set_filter(adap
, 0x81, filter
+ 2, m
->filters
[i
])) != 0)
267 if ((ret
= m920x_set_filter(adap
, 0x82, 0, 0x02f5)) != 0)
273 static int m920x_pid_filter_ctrl(struct dvb_usb_adapter
*adap
, int onoff
)
275 struct m920x_state
*m
= adap
->dev
->priv
;
277 m
->filtering_enabled
= onoff
? 1 : 0;
279 return m920x_update_filters(adap
);
282 static int m920x_pid_filter(struct dvb_usb_adapter
*adap
, int index
, u16 pid
, int onoff
)
284 struct m920x_state
*m
= adap
->dev
->priv
;
286 m
->filters
[index
] = onoff
? pid
: 0;
288 return m920x_update_filters(adap
);
291 static int m920x_firmware_download(struct usb_device
*udev
, const struct firmware
*fw
)
293 u16 value
, index
, size
;
295 int i
, pass
, ret
= 0;
297 buff
= kmalloc(65536, GFP_KERNEL
);
299 if ((ret
= m920x_read(udev
, M9206_FILTER
, 0x0, 0x8000, read
, 4)) != 0)
301 deb("%x %x %x %x\n", read
[0], read
[1], read
[2], read
[3]);
303 if ((ret
= m920x_read(udev
, M9206_FW
, 0x0, 0x0, read
, 1)) != 0)
305 deb("%x\n", read
[0]);
307 for (pass
= 0; pass
< 2; pass
++) {
308 for (i
= 0; i
+ (sizeof(u16
) * 3) < fw
->size
;) {
309 value
= le16_to_cpu(*(u16
*)(fw
->data
+ i
));
312 index
= le16_to_cpu(*(u16
*)(fw
->data
+ i
));
315 size
= le16_to_cpu(*(u16
*)(fw
->data
+ i
));
319 /* Will stall if using fw->data ... */
320 memcpy(buff
, fw
->data
+ i
, size
);
322 ret
= usb_control_msg(udev
, usb_sndctrlpipe(udev
,0),
324 USB_TYPE_VENDOR
| USB_DIR_OUT
,
325 value
, index
, buff
, size
, 20);
327 deb("error while uploading fw!\n");
336 deb("bad firmware file!\n");
344 /* m920x will disconnect itself from the bus after this. */
345 (void) m920x_write(udev
, M9206_CORE
, 0x01, M9206_FW_GO
);
346 deb("firmware uploaded!\n");
354 /* Callbacks for DVB USB */
355 static int m920x_identify_state(struct usb_device
*udev
,
356 struct dvb_usb_device_properties
*props
,
357 struct dvb_usb_device_description
**desc
,
360 struct usb_host_interface
*alt
;
362 alt
= usb_altnum_to_altsetting(usb_ifnum_to_if(udev
, 0), 1);
363 *cold
= (alt
== NULL
) ? 1 : 0;
368 /* demod configurations */
369 static int m920x_mt352_demod_init(struct dvb_frontend
*fe
)
371 u8 config
[] = { CONFIG
, 0x3d };
372 u8 clock
[] = { CLOCK_CTL
, 0x30 };
373 u8 reset
[] = { RESET
, 0x80 };
374 u8 adc_ctl
[] = { ADC_CTL_1
, 0x40 };
375 u8 agc
[] = { AGC_TARGET
, 0x1c, 0x20 };
376 u8 sec_agc
[] = { 0x69, 0x00, 0xff, 0xff, 0x40, 0xff, 0x00, 0x40, 0x40 };
377 u8 unk1
[] = { 0x93, 0x1a };
378 u8 unk2
[] = { 0xb5, 0x7a };
380 mt352_write(fe
, config
, ARRAY_SIZE(config
));
381 mt352_write(fe
, clock
, ARRAY_SIZE(clock
));
382 mt352_write(fe
, reset
, ARRAY_SIZE(reset
));
383 mt352_write(fe
, adc_ctl
, ARRAY_SIZE(adc_ctl
));
384 mt352_write(fe
, agc
, ARRAY_SIZE(agc
));
385 mt352_write(fe
, sec_agc
, ARRAY_SIZE(sec_agc
));
386 mt352_write(fe
, unk1
, ARRAY_SIZE(unk1
));
387 mt352_write(fe
, unk2
, ARRAY_SIZE(unk2
));
389 deb("Demod init!\n");
394 static struct mt352_config m920x_mt352_config
= {
395 .demod_address
= 0x0f,
397 .demod_init
= m920x_mt352_demod_init
,
400 static struct tda1004x_config m920x_tda10046_08_config
= {
401 .demod_address
= 0x08,
404 .ts_mode
= TDA10046_TS_SERIAL
,
405 .xtal_freq
= TDA10046_XTAL_16M
,
406 .if_freq
= TDA10046_FREQ_045
,
407 .agc_config
= TDA10046_AGC_TDA827X
,
408 .gpio_config
= TDA10046_GPTRI
,
409 .request_firmware
= NULL
,
412 static struct tda1004x_config m920x_tda10046_0b_config
= {
413 .demod_address
= 0x0b,
416 .ts_mode
= TDA10046_TS_SERIAL
,
417 .xtal_freq
= TDA10046_XTAL_16M
,
418 .if_freq
= TDA10046_FREQ_045
,
419 .agc_config
= TDA10046_AGC_TDA827X
,
420 .gpio_config
= TDA10046_GPTRI
,
421 .request_firmware
= NULL
, /* uses firmware EEPROM */
424 /* tuner configurations */
425 static struct qt1010_config m920x_qt1010_config
= {
429 /* Callbacks for DVB USB */
430 static int m920x_mt352_frontend_attach(struct dvb_usb_adapter
*adap
)
432 deb("%s\n",__FUNCTION__
);
434 if ((adap
->fe
= dvb_attach(mt352_attach
,
436 &adap
->dev
->i2c_adap
)) == NULL
)
442 static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter
*adap
)
444 deb("%s\n",__FUNCTION__
);
446 if ((adap
->fe
= dvb_attach(tda10046_attach
,
447 &m920x_tda10046_08_config
,
448 &adap
->dev
->i2c_adap
)) == NULL
)
454 static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter
*adap
)
456 deb("%s\n",__FUNCTION__
);
458 if ((adap
->fe
= dvb_attach(tda10046_attach
,
459 &m920x_tda10046_0b_config
,
460 &adap
->dev
->i2c_adap
)) == NULL
)
466 static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter
*adap
)
468 deb("%s\n",__FUNCTION__
);
470 if (dvb_attach(qt1010_attach
, adap
->fe
, &adap
->dev
->i2c_adap
, &m920x_qt1010_config
) == NULL
)
476 static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter
*adap
)
478 deb("%s\n",__FUNCTION__
);
480 if (dvb_attach(tda827x_attach
, adap
->fe
, 0x60, &adap
->dev
->i2c_adap
, NULL
) == NULL
)
486 static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter
*adap
)
488 deb("%s\n",__FUNCTION__
);
490 if (dvb_attach(tda827x_attach
, adap
->fe
, 0x61, &adap
->dev
->i2c_adap
, NULL
) == NULL
)
496 /* device-specific initialization */
497 static struct m920x_inits megasky_rc_init
[] = {
498 { M9206_RC_INIT2
, 0xa8 },
499 { M9206_RC_INIT1
, 0x51 },
500 { } /* terminating entry */
503 static struct m920x_inits tvwalkertwin_rc_init
[] = {
504 { M9206_RC_INIT2
, 0x00 },
505 { M9206_RC_INIT1
, 0xef },
509 { } /* terminating entry */
513 static struct dvb_usb_rc_key megasky_rc_keys
[] = {
514 { 0x0, 0x12, KEY_POWER
},
515 { 0x0, 0x1e, KEY_CYCLEWINDOWS
}, /* min/max */
516 { 0x0, 0x02, KEY_CHANNELUP
},
517 { 0x0, 0x05, KEY_CHANNELDOWN
},
518 { 0x0, 0x03, KEY_VOLUMEUP
},
519 { 0x0, 0x06, KEY_VOLUMEDOWN
},
520 { 0x0, 0x04, KEY_MUTE
},
521 { 0x0, 0x07, KEY_OK
}, /* TS */
522 { 0x0, 0x08, KEY_STOP
},
523 { 0x0, 0x09, KEY_MENU
}, /* swap */
524 { 0x0, 0x0a, KEY_REWIND
},
525 { 0x0, 0x1b, KEY_PAUSE
},
526 { 0x0, 0x1f, KEY_FASTFORWARD
},
527 { 0x0, 0x0c, KEY_RECORD
},
528 { 0x0, 0x0d, KEY_CAMERA
}, /* screenshot */
529 { 0x0, 0x0e, KEY_COFFEE
}, /* "MTS" */
532 static struct dvb_usb_rc_key tvwalkertwin_rc_keys
[] = {
533 { 0x0, 0x01, KEY_ZOOM
}, /* Full Screen */
534 { 0x0, 0x02, KEY_CAMERA
}, /* snapshot */
535 { 0x0, 0x03, KEY_MUTE
},
536 { 0x0, 0x04, KEY_REWIND
},
537 { 0x0, 0x05, KEY_PLAYPAUSE
}, /* Play/Pause */
538 { 0x0, 0x06, KEY_FASTFORWARD
},
539 { 0x0, 0x07, KEY_RECORD
},
540 { 0x0, 0x08, KEY_STOP
},
541 { 0x0, 0x09, KEY_TIME
}, /* Timeshift */
542 { 0x0, 0x0c, KEY_COFFEE
}, /* Recall */
543 { 0x0, 0x0e, KEY_CHANNELUP
},
544 { 0x0, 0x12, KEY_POWER
},
545 { 0x0, 0x15, KEY_MENU
}, /* source */
546 { 0x0, 0x18, KEY_CYCLEWINDOWS
}, /* TWIN PIP */
547 { 0x0, 0x1a, KEY_CHANNELDOWN
},
548 { 0x0, 0x1b, KEY_VOLUMEDOWN
},
549 { 0x0, 0x1e, KEY_VOLUMEUP
},
552 /* DVB USB Driver stuff */
553 static struct dvb_usb_device_properties megasky_properties
;
554 static struct dvb_usb_device_properties digivox_mini_ii_properties
;
555 static struct dvb_usb_device_properties tvwalkertwin_properties
;
556 static struct dvb_usb_device_properties dposh_properties
;
558 static int m920x_probe(struct usb_interface
*intf
,
559 const struct usb_device_id
*id
)
561 struct dvb_usb_device
*d
;
562 struct usb_host_interface
*alt
;
564 struct m920x_inits
*rc_init_seq
= NULL
;
565 int bInterfaceNumber
= intf
->cur_altsetting
->desc
.bInterfaceNumber
;
567 deb("Probing for m920x device at interface %d\n", bInterfaceNumber
);
569 if (bInterfaceNumber
== 0) {
570 /* Single-tuner device, or first interface on
574 if ((ret
= dvb_usb_device_init(intf
, &megasky_properties
,
575 THIS_MODULE
, &d
)) == 0) {
576 rc_init_seq
= megasky_rc_init
;
580 if ((ret
= dvb_usb_device_init(intf
, &digivox_mini_ii_properties
,
581 THIS_MODULE
, &d
)) == 0) {
582 /* No remote control, so no rc_init_seq */
586 /* This configures both tuners on the TV Walker Twin */
587 if ((ret
= dvb_usb_device_init(intf
, &tvwalkertwin_properties
,
588 THIS_MODULE
, &d
)) == 0) {
589 rc_init_seq
= tvwalkertwin_rc_init
;
593 if ((ret
= dvb_usb_device_init(intf
, &dposh_properties
,
594 THIS_MODULE
, &d
)) == 0) {
595 /* Remote controller not supported yet. */
601 /* Another interface on a multi-tuner device */
603 /* The LifeView TV Walker Twin gets here, but struct
604 * tvwalkertwin_properties already configured both
605 * tuners, so there is nothing for us to do here
612 alt
= usb_altnum_to_altsetting(intf
, 1);
614 deb("No alt found!\n");
618 ret
= usb_set_interface(d
->udev
, alt
->desc
.bInterfaceNumber
,
619 alt
->desc
.bAlternateSetting
);
623 if ((ret
= m920x_init(d
, rc_init_seq
)) != 0)
629 static struct usb_device_id m920x_table
[] = {
630 { USB_DEVICE(USB_VID_MSI
, USB_PID_MSI_MEGASKY580
) },
631 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC
,
632 USB_PID_MSI_DIGI_VOX_MINI_II
) },
633 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC
,
634 USB_PID_LIFEVIEW_TV_WALKER_TWIN_COLD
) },
635 { USB_DEVICE(USB_VID_ANUBIS_ELECTRONIC
,
636 USB_PID_LIFEVIEW_TV_WALKER_TWIN_WARM
) },
637 { USB_DEVICE(USB_VID_DPOSH
, USB_PID_DPOSH_M9206_COLD
) },
638 { USB_DEVICE(USB_VID_DPOSH
, USB_PID_DPOSH_M9206_WARM
) },
639 { } /* Terminating entry */
641 MODULE_DEVICE_TABLE (usb
, m920x_table
);
643 static struct dvb_usb_device_properties megasky_properties
= {
644 .caps
= DVB_USB_IS_AN_I2C_ADAPTER
,
646 .usb_ctrl
= DEVICE_SPECIFIC
,
647 .firmware
= "dvb-usb-megasky-02.fw",
648 .download_firmware
= m920x_firmware_download
,
651 .rc_key_map
= megasky_rc_keys
,
652 .rc_key_map_size
= ARRAY_SIZE(megasky_rc_keys
),
653 .rc_query
= m920x_rc_query
,
655 .size_of_priv
= sizeof(struct m920x_state
),
657 .identify_state
= m920x_identify_state
,
660 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
661 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
663 .pid_filter_count
= 8,
664 .pid_filter
= m920x_pid_filter
,
665 .pid_filter_ctrl
= m920x_pid_filter_ctrl
,
667 .frontend_attach
= m920x_mt352_frontend_attach
,
668 .tuner_attach
= m920x_qt1010_tuner_attach
,
681 .i2c_algo
= &m920x_i2c_algo
,
683 .num_device_descs
= 1,
685 { "MSI Mega Sky 580 DVB-T USB2.0",
686 { &m920x_table
[0], NULL
},
692 static struct dvb_usb_device_properties digivox_mini_ii_properties
= {
693 .caps
= DVB_USB_IS_AN_I2C_ADAPTER
,
695 .usb_ctrl
= DEVICE_SPECIFIC
,
696 .firmware
= "dvb-usb-digivox-02.fw",
697 .download_firmware
= m920x_firmware_download
,
699 .size_of_priv
= sizeof(struct m920x_state
),
701 .identify_state
= m920x_identify_state
,
704 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
705 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
707 .pid_filter_count
= 8,
708 .pid_filter
= m920x_pid_filter
,
709 .pid_filter_ctrl
= m920x_pid_filter_ctrl
,
711 .frontend_attach
= m920x_tda10046_08_frontend_attach
,
712 .tuner_attach
= m920x_tda8275_60_tuner_attach
,
720 .buffersize
= 0x4000,
725 .i2c_algo
= &m920x_i2c_algo
,
727 .num_device_descs
= 1,
729 { "MSI DIGI VOX mini II DVB-T USB2.0",
730 { &m920x_table
[1], NULL
},
736 /* LifeView TV Walker Twin support by Nick Andrew <nick@nick-andrew.net>
738 * LifeView TV Walker Twin has 1 x M9206, 2 x TDA10046, 2 x TDA8275A
739 * TDA10046 #0 is located at i2c address 0x08
740 * TDA10046 #1 is located at i2c address 0x0b (presently disabled - not yet working)
741 * TDA8275A #0 is located at i2c address 0x60
742 * TDA8275A #1 is located at i2c address 0x61 (presently disabled - not yet working)
744 static struct dvb_usb_device_properties tvwalkertwin_properties
= {
745 .caps
= DVB_USB_IS_AN_I2C_ADAPTER
,
747 .usb_ctrl
= DEVICE_SPECIFIC
,
748 .firmware
= "dvb-usb-tvwalkert.fw",
749 .download_firmware
= m920x_firmware_download
,
752 .rc_key_map
= tvwalkertwin_rc_keys
,
753 .rc_key_map_size
= ARRAY_SIZE(tvwalkertwin_rc_keys
),
754 .rc_query
= m920x_rc_query
,
756 .size_of_priv
= sizeof(struct m920x_state
),
758 .identify_state
= m920x_identify_state
,
761 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
762 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
764 .pid_filter_count
= 8,
765 .pid_filter
= m920x_pid_filter
,
766 .pid_filter_ctrl
= m920x_pid_filter_ctrl
,
768 .frontend_attach
= m920x_tda10046_08_frontend_attach
,
769 .tuner_attach
= m920x_tda8275_60_tuner_attach
,
781 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
782 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
784 .pid_filter_count
= 8,
785 .pid_filter
= m920x_pid_filter
,
786 .pid_filter_ctrl
= m920x_pid_filter_ctrl
,
788 .frontend_attach
= m920x_tda10046_0b_frontend_attach
,
789 .tuner_attach
= m920x_tda8275_61_tuner_attach
,
802 .i2c_algo
= &m920x_i2c_algo
,
804 .num_device_descs
= 1,
806 { .name
= "LifeView TV Walker Twin DVB-T USB2.0",
807 .cold_ids
= { &m920x_table
[2], NULL
},
808 .warm_ids
= { &m920x_table
[3], NULL
},
813 static struct dvb_usb_device_properties dposh_properties
= {
814 .caps
= DVB_USB_IS_AN_I2C_ADAPTER
,
816 .usb_ctrl
= DEVICE_SPECIFIC
,
817 .firmware
= "dvb-usb-dposh-01.fw",
818 .download_firmware
= m920x_firmware_download
,
820 .size_of_priv
= sizeof(struct m920x_state
),
822 .identify_state
= m920x_identify_state
,
825 /* Hardware pid filters don't work with this device/firmware */
827 .frontend_attach
= m920x_mt352_frontend_attach
,
828 .tuner_attach
= m920x_qt1010_tuner_attach
,
841 .i2c_algo
= &m920x_i2c_algo
,
843 .num_device_descs
= 1,
845 { .name
= "Dposh DVB-T USB2.0",
846 .cold_ids
= { &m920x_table
[4], NULL
},
847 .warm_ids
= { &m920x_table
[5], NULL
},
852 static struct usb_driver m920x_driver
= {
853 .name
= "dvb_usb_m920x",
854 .probe
= m920x_probe
,
855 .disconnect
= dvb_usb_device_exit
,
856 .id_table
= m920x_table
,
860 static int __init
m920x_module_init(void)
864 if ((ret
= usb_register(&m920x_driver
))) {
865 err("usb_register failed. Error number %d", ret
);
872 static void __exit
m920x_module_exit(void)
874 /* deregister this driver from the USB subsystem */
875 usb_deregister(&m920x_driver
);
878 module_init (m920x_module_init
);
879 module_exit (m920x_module_exit
);
881 MODULE_AUTHOR("Aapo Tahkola <aet@rasterburn.org>");
882 MODULE_DESCRIPTION("DVB Driver for ULI M920x");
883 MODULE_VERSION("0.1");
884 MODULE_LICENSE("GPL");