1 /* Linux driver for devices based on the DiBcom DiB0700 USB bridge
3 * This program is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU General Public License as published by the Free
5 * Software Foundation, version 2.
7 * Copyright (C) 2005-9 DiBcom, SA et al
11 #include "dib3000mc.h"
17 #include "tuner-xc2028.h"
25 static int force_lna_activation
;
26 module_param(force_lna_activation
, int, 0644);
27 MODULE_PARM_DESC(force_lna_activation
, "force the activation of Low-Noise-Amplifyer(s) (LNA), "
28 "if applicable for the device (default: 0=automatic/off).");
30 struct dib0700_adapter_state
{
31 int (*set_param_save
) (struct dvb_frontend
*, struct dvb_frontend_parameters
*);
34 /* Hauppauge Nova-T 500 (aka Bristol)
35 * has a LNA on GPIO0 which is enabled by setting 1 */
36 static struct mt2060_config bristol_mt2060_config
[2] = {
46 static struct dibx000_agc_config bristol_dib3000p_mt2060_agc_config
= {
47 .band_caps
= BAND_VHF
| BAND_UHF
,
48 .setup
= (1 << 8) | (5 << 5) | (0 << 4) | (0 << 3) | (0 << 2) | (2 << 0),
68 static struct dib3000mc_config bristol_dib3000mc_config
[2] = {
69 { .agc
= &bristol_dib3000p_mt2060_agc_config
,
71 .ln_adc_level
= 0x1cc7,
72 .output_mpeg2_in_188_bytes
= 1,
74 { .agc
= &bristol_dib3000p_mt2060_agc_config
,
76 .ln_adc_level
= 0x1cc7,
77 .output_mpeg2_in_188_bytes
= 1,
81 static int bristol_frontend_attach(struct dvb_usb_adapter
*adap
)
83 struct dib0700_state
*st
= adap
->dev
->priv
;
85 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0); msleep(10);
86 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1); msleep(10);
87 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0); msleep(10);
88 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1); msleep(10);
90 if (force_lna_activation
)
91 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
93 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 0);
95 if (dib3000mc_i2c_enumeration(&adap
->dev
->i2c_adap
, 2, DEFAULT_DIB3000P_I2C_ADDRESS
, bristol_dib3000mc_config
) != 0) {
96 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0); msleep(10);
100 st
->mt2060_if1
[adap
->id
] = 1220;
101 return (adap
->fe
= dvb_attach(dib3000mc_attach
, &adap
->dev
->i2c_adap
,
102 (10 + adap
->id
) << 1, &bristol_dib3000mc_config
[adap
->id
])) == NULL
? -ENODEV
: 0;
105 static int eeprom_read(struct i2c_adapter
*adap
,u8 adrs
,u8
*pval
)
107 struct i2c_msg msg
[2] = {
108 { .addr
= 0x50, .flags
= 0, .buf
= &adrs
, .len
= 1 },
109 { .addr
= 0x50, .flags
= I2C_M_RD
, .buf
= pval
, .len
= 1 },
111 if (i2c_transfer(adap
, msg
, 2) != 2) return -EREMOTEIO
;
115 static int bristol_tuner_attach(struct dvb_usb_adapter
*adap
)
117 struct i2c_adapter
*prim_i2c
= &adap
->dev
->i2c_adap
;
118 struct i2c_adapter
*tun_i2c
= dib3000mc_get_tuner_i2c_master(adap
->fe
, 1);
121 if (adap
->dev
->udev
->descriptor
.idVendor
== cpu_to_le16(USB_VID_HAUPPAUGE
) &&
122 adap
->dev
->udev
->descriptor
.idProduct
== cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2
)) {
123 if (!eeprom_read(prim_i2c
,0x59 + adap
->id
,&a
)) if1
=1220+a
;
125 return dvb_attach(mt2060_attach
,adap
->fe
, tun_i2c
,&bristol_mt2060_config
[adap
->id
],
126 if1
) == NULL
? -ENODEV
: 0;
129 /* STK7700D: Pinnacle/Terratec/Hauppauge Dual DVB-T Diversity */
132 static struct dibx000_agc_config stk7700d_7000p_mt2266_agc_config
[2] = {
136 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm2=1,
137 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
138 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8)
139 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
174 BAND_VHF
| BAND_LBAND
,
176 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm2=1,
177 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
178 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8)
179 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
216 static struct dibx000_bandwidth_config stk7700d_mt2266_pll_config
= {
220 (3 << 14) | (1 << 12) | (524 << 0),
225 static struct dib7000p_config stk7700d_dib7000p_mt2266_config
[] = {
226 { .output_mpeg2_in_188_bytes
= 1,
227 .hostbus_diversity
= 1,
228 .tuner_is_baseband
= 1,
230 .agc_config_count
= 2,
231 .agc
= stk7700d_7000p_mt2266_agc_config
,
232 .bw
= &stk7700d_mt2266_pll_config
,
234 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
235 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
236 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
238 { .output_mpeg2_in_188_bytes
= 1,
239 .hostbus_diversity
= 1,
240 .tuner_is_baseband
= 1,
242 .agc_config_count
= 2,
243 .agc
= stk7700d_7000p_mt2266_agc_config
,
244 .bw
= &stk7700d_mt2266_pll_config
,
246 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
247 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
248 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
252 static struct mt2266_config stk7700d_mt2266_config
[2] = {
253 { .i2c_address
= 0x60
255 { .i2c_address
= 0x60
259 static int stk7700P2_frontend_attach(struct dvb_usb_adapter
*adap
)
262 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
264 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
265 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
266 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
267 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
269 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
271 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
272 stk7700d_dib7000p_mt2266_config
)
274 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__
);
279 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
,0x80+(adap
->id
<< 1),
280 &stk7700d_dib7000p_mt2266_config
[adap
->id
]);
282 return adap
->fe
== NULL
? -ENODEV
: 0;
285 static int stk7700d_frontend_attach(struct dvb_usb_adapter
*adap
)
288 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
290 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
291 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
292 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
293 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
295 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
297 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
298 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 2, 18,
299 stk7700d_dib7000p_mt2266_config
)
301 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__
);
306 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
,0x80+(adap
->id
<< 1),
307 &stk7700d_dib7000p_mt2266_config
[adap
->id
]);
309 return adap
->fe
== NULL
? -ENODEV
: 0;
312 static int stk7700d_tuner_attach(struct dvb_usb_adapter
*adap
)
314 struct i2c_adapter
*tun_i2c
;
315 tun_i2c
= dib7000p_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
316 return dvb_attach(mt2266_attach
, adap
->fe
, tun_i2c
,
317 &stk7700d_mt2266_config
[adap
->id
]) == NULL
? -ENODEV
: 0;
320 /* STK7700-PH: Digital/Analog Hybrid Tuner, e.h. Cinergy HT USB HE */
321 static struct dibx000_agc_config xc3028_agc_config
= {
322 BAND_VHF
| BAND_UHF
, /* band_caps */
324 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0,
325 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
326 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
327 (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
328 (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), /* setup */
331 21, /* time_stabiliz */
343 39718, /* agc2_max */
352 29, /* agc2_slope1 */
353 29, /* agc2_slope2 */
360 1, /* perform_agc_softsplit */
363 /* PLL Configuration for COFDM BW_MHz = 8.00 with external clock = 30.00 */
364 static struct dibx000_bandwidth_config xc3028_bw_config
= {
365 60000, 30000, /* internal, sampling */
366 1, 8, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass */
367 0, 0, 1, 1, 0, /* misc: refdiv, bypclk_div, IO_CLK_en_core, ADClkSrc,
369 (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */
370 (1 << 25) | 5816102, /* ifreq = 5.200000 MHz */
372 30000000, /* xtal_hz */
375 static struct dib7000p_config stk7700ph_dib7700_xc3028_config
= {
376 .output_mpeg2_in_188_bytes
= 1,
377 .tuner_is_baseband
= 1,
379 .agc_config_count
= 1,
380 .agc
= &xc3028_agc_config
,
381 .bw
= &xc3028_bw_config
,
383 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
384 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
385 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
388 static int stk7700ph_xc3028_callback(void *ptr
, int component
,
389 int command
, int arg
)
391 struct dvb_usb_adapter
*adap
= ptr
;
394 case XC2028_TUNER_RESET
:
395 /* Send the tuner in then out of reset */
396 dib7000p_set_gpio(adap
->fe
, 8, 0, 0); msleep(10);
397 dib7000p_set_gpio(adap
->fe
, 8, 0, 1);
399 case XC2028_RESET_CLK
:
402 err("%s: unknown command %d, arg %d\n", __func__
,
409 static struct xc2028_ctrl stk7700ph_xc3028_ctrl
= {
410 .fname
= XC2028_DEFAULT_FIRMWARE
,
412 .demod
= XC3028_FE_DIBCOM52
,
415 static struct xc2028_config stk7700ph_xc3028_config
= {
417 .ctrl
= &stk7700ph_xc3028_ctrl
,
420 static int stk7700ph_frontend_attach(struct dvb_usb_adapter
*adap
)
422 struct usb_device_descriptor
*desc
= &adap
->dev
->udev
->descriptor
;
424 if (desc
->idVendor
== cpu_to_le16(USB_VID_PINNACLE
) &&
425 desc
->idProduct
== cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX
))
426 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
428 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
430 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
431 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
432 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
433 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
435 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
437 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
440 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
441 &stk7700ph_dib7700_xc3028_config
) != 0) {
442 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
447 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80,
448 &stk7700ph_dib7700_xc3028_config
);
450 return adap
->fe
== NULL
? -ENODEV
: 0;
453 static int stk7700ph_tuner_attach(struct dvb_usb_adapter
*adap
)
455 struct i2c_adapter
*tun_i2c
;
457 tun_i2c
= dib7000p_get_i2c_master(adap
->fe
,
458 DIBX000_I2C_INTERFACE_TUNER
, 1);
460 stk7700ph_xc3028_config
.i2c_adap
= tun_i2c
;
462 /* FIXME: generalize & move to common area */
463 adap
->fe
->callback
= stk7700ph_xc3028_callback
;
465 return dvb_attach(xc2028_attach
, adap
->fe
, &stk7700ph_xc3028_config
)
466 == NULL
? -ENODEV
: 0;
469 #define DEFAULT_RC_INTERVAL 50
471 static u8 rc_request
[] = { REQUEST_POLL_RC
, 0 };
473 /* Number of keypresses to ignore before start repeating */
474 #define RC_REPEAT_DELAY 6
476 static int dib0700_rc_query(struct dvb_usb_device
*d
, u32
*event
, int *state
)
480 struct dvb_usb_rc_key
*keymap
= d
->props
.rc_key_map
;
481 struct dib0700_state
*st
= d
->priv
;
484 *state
= REMOTE_NO_KEY_PRESSED
;
486 if (st
->fw_version
>= 0x10200) {
487 /* For 1.20 firmware , We need to keep the RC polling
488 callback so we can reuse the input device setup in
489 dvb-usb-remote.c. However, the actual work is being done
490 in the bulk URB completion handler. */
494 i
=dib0700_ctrl_rd(d
,rc_request
,2,key
,4);
496 err("RC Query Failed");
500 /* losing half of KEY_0 events from Philipps rc5 remotes.. */
501 if (key
[0]==0 && key
[1]==0 && key
[2]==0 && key
[3]==0) return 0;
503 /* info("%d: %2X %2X %2X %2X",dvb_usb_dib0700_ir_proto,(int)key[3-2],(int)key[3-3],(int)key[3-1],(int)key[3]); */
505 dib0700_rc_setup(d
); /* reset ir sensor data to prevent false events */
507 switch (dvb_usb_dib0700_ir_proto
) {
509 /* NEC protocol sends repeat code as 0 0 0 FF */
510 if ((key
[3-2] == 0x00) && (key
[3-3] == 0x00) &&
513 if (st
->rc_counter
> RC_REPEAT_DELAY
) {
514 *event
= d
->last_event
;
515 *state
= REMOTE_KEY_PRESSED
;
516 st
->rc_counter
= RC_REPEAT_DELAY
;
520 for (i
=0;i
<d
->props
.rc_key_map_size
; i
++) {
521 if (rc5_custom(&keymap
[i
]) == key
[3-2] &&
522 rc5_data(&keymap
[i
]) == key
[3-3]) {
524 *event
= keymap
[i
].event
;
525 *state
= REMOTE_KEY_PRESSED
;
526 d
->last_event
= keymap
[i
].event
;
533 /* RC-5 protocol changes toggle bit on new keypress */
534 for (i
= 0; i
< d
->props
.rc_key_map_size
; i
++) {
535 if (rc5_custom(&keymap
[i
]) == key
[3-2] &&
536 rc5_data(&keymap
[i
]) == key
[3-3]) {
537 if (d
->last_event
== keymap
[i
].event
&&
538 key
[3-1] == st
->rc_toggle
) {
540 /* prevents unwanted double hits */
541 if (st
->rc_counter
> RC_REPEAT_DELAY
) {
542 *event
= d
->last_event
;
543 *state
= REMOTE_KEY_PRESSED
;
544 st
->rc_counter
= RC_REPEAT_DELAY
;
550 *event
= keymap
[i
].event
;
551 *state
= REMOTE_KEY_PRESSED
;
552 st
->rc_toggle
= key
[3-1];
553 d
->last_event
= keymap
[i
].event
;
560 err("Unknown remote controller key: %2X %2X %2X %2X", (int) key
[3-2], (int) key
[3-3], (int) key
[3-1], (int) key
[3]);
565 static struct dvb_usb_rc_key ir_codes_dib0700_table
[] = {
566 /* Key codes for the tiny Pinnacle remote*/
567 { 0x0700, KEY_MUTE
},
568 { 0x0701, KEY_MENU
}, /* Pinnacle logo */
569 { 0x0739, KEY_POWER
},
570 { 0x0703, KEY_VOLUMEUP
},
571 { 0x0709, KEY_VOLUMEDOWN
},
572 { 0x0706, KEY_CHANNELUP
},
573 { 0x070c, KEY_CHANNELDOWN
},
584 { 0x0724, KEY_SCREEN
}, /* 'Square' key */
585 { 0x072a, KEY_TEXT
}, /* 'T' key */
586 { 0x072d, KEY_REWIND
},
587 { 0x0730, KEY_PLAY
},
588 { 0x0733, KEY_FASTFORWARD
},
589 { 0x0736, KEY_RECORD
},
590 { 0x073c, KEY_STOP
},
591 { 0x073f, KEY_CANCEL
}, /* '?' key */
592 /* Key codes for the Terratec Cinergy DT XS Diversity, similar to cinergyT2.c */
593 { 0xeb01, KEY_POWER
},
603 { 0xeb0b, KEY_VIDEO
},
605 { 0xeb0d, KEY_REFRESH
},
608 { 0xeb11, KEY_LEFT
},
610 { 0xeb13, KEY_RIGHT
},
611 { 0xeb14, KEY_DOWN
},
612 { 0xeb16, KEY_INFO
},
614 { 0xeb18, KEY_GREEN
},
615 { 0xeb19, KEY_YELLOW
},
616 { 0xeb1a, KEY_BLUE
},
617 { 0xeb1b, KEY_CHANNELUP
},
618 { 0xeb1c, KEY_VOLUMEUP
},
619 { 0xeb1d, KEY_MUTE
},
620 { 0xeb1e, KEY_VOLUMEDOWN
},
621 { 0xeb1f, KEY_CHANNELDOWN
},
622 { 0xeb40, KEY_PAUSE
},
623 { 0xeb41, KEY_HOME
},
624 { 0xeb42, KEY_MENU
}, /* DVD Menu */
625 { 0xeb43, KEY_SUBTITLE
},
626 { 0xeb44, KEY_TEXT
}, /* Teletext */
627 { 0xeb45, KEY_DELETE
},
630 { 0xeb48, KEY_STOP
},
631 { 0xeb49, KEY_VIDEO
},
632 { 0xeb4a, KEY_AUDIO
}, /* Music */
633 { 0xeb4b, KEY_SCREEN
}, /* Pic */
634 { 0xeb4c, KEY_PLAY
},
635 { 0xeb4d, KEY_BACK
},
636 { 0xeb4e, KEY_REWIND
},
637 { 0xeb4f, KEY_FASTFORWARD
},
638 { 0xeb54, KEY_PREVIOUS
},
639 { 0xeb58, KEY_RECORD
},
640 { 0xeb5c, KEY_NEXT
},
642 /* Key codes for the Haupauge WinTV Nova-TD, copied from nova-t-usb2.c (Nova-T USB2) */
653 { 0x1e0a, KEY_KPASTERISK
},
655 { 0x1e0c, KEY_RADIO
},
656 { 0x1e0d, KEY_MENU
},
657 { 0x1e0e, KEY_GRAVE
}, /* # */
658 { 0x1e0f, KEY_MUTE
},
659 { 0x1e10, KEY_VOLUMEUP
},
660 { 0x1e11, KEY_VOLUMEDOWN
},
661 { 0x1e12, KEY_CHANNEL
},
663 { 0x1e15, KEY_DOWN
},
664 { 0x1e16, KEY_LEFT
},
665 { 0x1e17, KEY_RIGHT
},
666 { 0x1e18, KEY_VIDEO
},
667 { 0x1e19, KEY_AUDIO
},
668 { 0x1e1a, KEY_MEDIA
},
671 { 0x1e1e, KEY_NEXT
},
672 { 0x1e1f, KEY_BACK
},
673 { 0x1e20, KEY_CHANNELUP
},
674 { 0x1e21, KEY_CHANNELDOWN
},
675 { 0x1e24, KEY_LAST
}, /* Skip backwards */
678 { 0x1e2e, KEY_GREEN
},
679 { 0x1e30, KEY_PAUSE
},
680 { 0x1e32, KEY_REWIND
},
681 { 0x1e34, KEY_FASTFORWARD
},
682 { 0x1e35, KEY_PLAY
},
683 { 0x1e36, KEY_STOP
},
684 { 0x1e37, KEY_RECORD
},
685 { 0x1e38, KEY_YELLOW
},
686 { 0x1e3b, KEY_GOTO
},
687 { 0x1e3d, KEY_POWER
},
689 /* Key codes for the Leadtek Winfast DTV Dongle */
690 { 0x0042, KEY_POWER
},
691 { 0x077c, KEY_TUNER
},
692 { 0x0f4e, KEY_PRINT
}, /* PREVIEW */
693 { 0x0840, KEY_SCREEN
}, /* full screen toggle*/
694 { 0x0f71, KEY_DOT
}, /* frequency */
705 { 0x0e4e, KEY_CLEAR
},
706 { 0x047c, KEY_CHANNEL
}, /* show channel number */
707 { 0x0f41, KEY_LAST
}, /* recall */
708 { 0x0342, KEY_MUTE
},
709 { 0x064c, KEY_RESERVED
}, /* PIP button*/
710 { 0x0172, KEY_SHUFFLE
}, /* SNAPSHOT */
711 { 0x0c4e, KEY_PLAYPAUSE
}, /* TIMESHIFT */
712 { 0x0b70, KEY_RECORD
},
713 { 0x037d, KEY_VOLUMEUP
},
714 { 0x017d, KEY_VOLUMEDOWN
},
715 { 0x0242, KEY_CHANNELUP
},
716 { 0x007d, KEY_CHANNELDOWN
},
718 /* Key codes for Nova-TD "credit card" remote control. */
729 { 0x1d0a, KEY_TEXT
},
730 { 0x1d0d, KEY_MENU
},
731 { 0x1d0f, KEY_MUTE
},
732 { 0x1d10, KEY_VOLUMEUP
},
733 { 0x1d11, KEY_VOLUMEDOWN
},
734 { 0x1d12, KEY_CHANNEL
},
736 { 0x1d15, KEY_DOWN
},
737 { 0x1d16, KEY_LEFT
},
738 { 0x1d17, KEY_RIGHT
},
740 { 0x1d1e, KEY_NEXT
},
741 { 0x1d1f, KEY_BACK
},
742 { 0x1d20, KEY_CHANNELUP
},
743 { 0x1d21, KEY_CHANNELDOWN
},
744 { 0x1d24, KEY_LAST
},
746 { 0x1d30, KEY_PAUSE
},
747 { 0x1d32, KEY_REWIND
},
748 { 0x1d34, KEY_FASTFORWARD
},
749 { 0x1d35, KEY_PLAY
},
750 { 0x1d36, KEY_STOP
},
751 { 0x1d37, KEY_RECORD
},
752 { 0x1d3b, KEY_GOTO
},
753 { 0x1d3d, KEY_POWER
},
755 /* Key codes for the Pixelview SBTVD remote (proto NEC) */
756 { 0x8613, KEY_MUTE
},
757 { 0x8612, KEY_POWER
},
768 { 0x860d, KEY_CHANNELUP
},
769 { 0x8619, KEY_CHANNELDOWN
},
770 { 0x8610, KEY_VOLUMEUP
},
771 { 0x860c, KEY_VOLUMEDOWN
},
773 { 0x860a, KEY_CAMERA
},
774 { 0x860b, KEY_ZOOM
},
775 { 0x861b, KEY_BACKSPACE
},
776 { 0x8615, KEY_ENTER
},
779 { 0x861e, KEY_DOWN
},
780 { 0x860e, KEY_LEFT
},
781 { 0x860f, KEY_RIGHT
},
783 { 0x8618, KEY_RECORD
},
784 { 0x861a, KEY_STOP
},
786 /* Key codes for the EvolutePC TVWay+ remote (proto NEC) */
787 { 0x7a00, KEY_MENU
},
788 { 0x7a01, KEY_RECORD
},
789 { 0x7a02, KEY_PLAY
},
790 { 0x7a03, KEY_STOP
},
791 { 0x7a10, KEY_CHANNELUP
},
792 { 0x7a11, KEY_CHANNELDOWN
},
793 { 0x7a12, KEY_VOLUMEUP
},
794 { 0x7a13, KEY_VOLUMEDOWN
},
795 { 0x7a40, KEY_POWER
},
796 { 0x7a41, KEY_MUTE
},
798 /* Key codes for the Elgato EyeTV Diversity silver remote,
799 set dvb_usb_dib0700_ir_proto=0 */
800 { 0x4501, KEY_POWER
},
801 { 0x4502, KEY_MUTE
},
811 { 0x450c, KEY_LAST
},
813 { 0x450e, KEY_ENTER
},
815 { 0x4510, KEY_CHANNELUP
},
816 { 0x4511, KEY_GREEN
},
817 { 0x4512, KEY_VOLUMEDOWN
},
819 { 0x4514, KEY_VOLUMEUP
},
820 { 0x4515, KEY_YELLOW
},
821 { 0x4516, KEY_CHANNELDOWN
},
822 { 0x4517, KEY_BLUE
},
823 { 0x4518, KEY_LEFT
}, /* Skip backwards */
824 { 0x4519, KEY_PLAYPAUSE
},
825 { 0x451a, KEY_RIGHT
}, /* Skip forward */
826 { 0x451b, KEY_REWIND
},
827 { 0x451c, KEY_L
}, /* Live */
828 { 0x451d, KEY_FASTFORWARD
},
829 { 0x451e, KEY_STOP
}, /* 'Reveal' for Teletext */
830 { 0x451f, KEY_MENU
}, /* KEY_TEXT for Teletext */
831 { 0x4540, KEY_RECORD
}, /* Font 'Size' for Teletext */
832 { 0x4541, KEY_SCREEN
}, /* Full screen toggle, 'Hold' for Teletext */
833 { 0x4542, KEY_SELECT
}, /* Select video input, 'Select' for Teletext */
836 /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */
837 static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config
= {
840 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0,
841 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
842 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
843 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
883 static struct dibx000_agc_config stk7700p_7000p_mt2060_agc_config
= {
886 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0,
887 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */
888 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
889 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
929 static struct dibx000_bandwidth_config stk7700p_pll_config
= {
933 (3 << 14) | (1 << 12) | (524 << 0),
939 static struct dib7000m_config stk7700p_dib7000m_config
= {
941 .output_mpeg2_in_188_bytes
= 1,
944 .agc_config_count
= 1,
945 .agc
= &stk7700p_7000m_mt2060_agc_config
,
946 .bw
= &stk7700p_pll_config
,
948 .gpio_dir
= DIB7000M_GPIO_DEFAULT_DIRECTIONS
,
949 .gpio_val
= DIB7000M_GPIO_DEFAULT_VALUES
,
950 .gpio_pwm_pos
= DIB7000M_GPIO_DEFAULT_PWM_POS
,
953 static struct dib7000p_config stk7700p_dib7000p_config
= {
954 .output_mpeg2_in_188_bytes
= 1,
956 .agc_config_count
= 1,
957 .agc
= &stk7700p_7000p_mt2060_agc_config
,
958 .bw
= &stk7700p_pll_config
,
960 .gpio_dir
= DIB7000M_GPIO_DEFAULT_DIRECTIONS
,
961 .gpio_val
= DIB7000M_GPIO_DEFAULT_VALUES
,
962 .gpio_pwm_pos
= DIB7000M_GPIO_DEFAULT_PWM_POS
,
965 static int stk7700p_frontend_attach(struct dvb_usb_adapter
*adap
)
967 struct dib0700_state
*st
= adap
->dev
->priv
;
968 /* unless there is no real power management in DVB - we leave the device on GPIO6 */
970 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
971 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0); msleep(50);
973 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1); msleep(10);
974 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
976 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0); msleep(10);
977 dib0700_ctrl_clock(adap
->dev
, 72, 1);
978 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1); msleep(100);
980 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
982 st
->mt2060_if1
[0] = 1220;
984 if (dib7000pc_detection(&adap
->dev
->i2c_adap
)) {
985 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 18, &stk7700p_dib7000p_config
);
986 st
->is_dib7000pc
= 1;
988 adap
->fe
= dvb_attach(dib7000m_attach
, &adap
->dev
->i2c_adap
, 18, &stk7700p_dib7000m_config
);
990 return adap
->fe
== NULL
? -ENODEV
: 0;
993 static struct mt2060_config stk7700p_mt2060_config
= {
997 static int stk7700p_tuner_attach(struct dvb_usb_adapter
*adap
)
999 struct i2c_adapter
*prim_i2c
= &adap
->dev
->i2c_adap
;
1000 struct dib0700_state
*st
= adap
->dev
->priv
;
1001 struct i2c_adapter
*tun_i2c
;
1004 if (adap
->dev
->udev
->descriptor
.idVendor
== cpu_to_le16(USB_VID_HAUPPAUGE
) &&
1005 adap
->dev
->udev
->descriptor
.idProduct
== cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK
)) {
1006 if (!eeprom_read(prim_i2c
,0x58,&a
)) if1
=1220+a
;
1008 if (st
->is_dib7000pc
)
1009 tun_i2c
= dib7000p_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1011 tun_i2c
= dib7000m_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1013 return dvb_attach(mt2060_attach
, adap
->fe
, tun_i2c
, &stk7700p_mt2060_config
,
1014 if1
) == NULL
? -ENODEV
: 0;
1017 /* DIB7070 generic */
1018 static struct dibx000_agc_config dib7070_agc_config
= {
1019 BAND_UHF
| BAND_VHF
| BAND_LBAND
| BAND_SBAND
,
1020 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0,
1021 * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1022 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1023 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1060 static int dib7070_tuner_reset(struct dvb_frontend
*fe
, int onoff
)
1062 deb_info("reset: %d", onoff
);
1063 return dib7000p_set_gpio(fe
, 8, 0, !onoff
);
1066 static int dib7070_tuner_sleep(struct dvb_frontend
*fe
, int onoff
)
1068 deb_info("sleep: %d", onoff
);
1069 return dib7000p_set_gpio(fe
, 9, 0, onoff
);
1072 static struct dib0070_config dib7070p_dib0070_config
[2] = {
1074 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1075 .reset
= dib7070_tuner_reset
,
1076 .sleep
= dib7070_tuner_sleep
,
1078 .clock_pad_drive
= 4,
1081 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1082 .reset
= dib7070_tuner_reset
,
1083 .sleep
= dib7070_tuner_sleep
,
1089 static struct dib0070_config dib7770p_dib0070_config
= {
1090 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1091 .reset
= dib7070_tuner_reset
,
1092 .sleep
= dib7070_tuner_sleep
,
1094 .clock_pad_drive
= 0,
1099 static int dib7070_set_param_override(struct dvb_frontend
*fe
, struct dvb_frontend_parameters
*fep
)
1101 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1102 struct dib0700_adapter_state
*state
= adap
->priv
;
1105 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1107 case BAND_VHF
: offset
= 950; break;
1109 default: offset
= 550; break;
1111 deb_info("WBD for DiB7000P: %d\n", offset
+ dib0070_wbd_offset(fe
));
1112 dib7000p_set_wbd_ref(fe
, offset
+ dib0070_wbd_offset(fe
));
1113 return state
->set_param_save(fe
, fep
);
1116 static int dib7770_set_param_override(struct dvb_frontend
*fe
,
1117 struct dvb_frontend_parameters
*fep
)
1119 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1120 struct dib0700_adapter_state
*state
= adap
->priv
;
1123 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1126 dib7000p_set_gpio(fe
, 0, 0, 1);
1131 dib7000p_set_gpio(fe
, 0, 0, 0);
1135 deb_info("WBD for DiB7000P: %d\n", offset
+ dib0070_wbd_offset(fe
));
1136 dib7000p_set_wbd_ref(fe
, offset
+ dib0070_wbd_offset(fe
));
1137 return state
->set_param_save(fe
, fep
);
1140 static int dib7770p_tuner_attach(struct dvb_usb_adapter
*adap
)
1142 struct dib0700_adapter_state
*st
= adap
->priv
;
1143 struct i2c_adapter
*tun_i2c
= dib7000p_get_i2c_master(adap
->fe
,
1144 DIBX000_I2C_INTERFACE_TUNER
, 1);
1146 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1147 &dib7770p_dib0070_config
) == NULL
)
1150 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1151 adap
->fe
->ops
.tuner_ops
.set_params
= dib7770_set_param_override
;
1155 static int dib7070p_tuner_attach(struct dvb_usb_adapter
*adap
)
1157 struct dib0700_adapter_state
*st
= adap
->priv
;
1158 struct i2c_adapter
*tun_i2c
= dib7000p_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1160 if (adap
->id
== 0) {
1161 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
, &dib7070p_dib0070_config
[0]) == NULL
)
1164 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
, &dib7070p_dib0070_config
[1]) == NULL
)
1168 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1169 adap
->fe
->ops
.tuner_ops
.set_params
= dib7070_set_param_override
;
1173 static int stk70x0p_pid_filter(struct dvb_usb_adapter
*adapter
, int index
, u16 pid
, int onoff
)
1175 return dib7000p_pid_filter(adapter
->fe
, index
, pid
, onoff
);
1178 static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter
*adapter
, int onoff
)
1180 return dib7000p_pid_filter_ctrl(adapter
->fe
, onoff
);
1183 static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz
= {
1187 (3 << 14) | (1 << 12) | (524 << 0),
1193 static struct dib7000p_config dib7070p_dib7000p_config
= {
1194 .output_mpeg2_in_188_bytes
= 1,
1196 .agc_config_count
= 1,
1197 .agc
= &dib7070_agc_config
,
1198 .bw
= &dib7070_bw_config_12_mhz
,
1199 .tuner_is_baseband
= 1,
1202 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1203 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1204 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1206 .hostbus_diversity
= 1,
1210 static int stk7070p_frontend_attach(struct dvb_usb_adapter
*adap
)
1212 struct usb_device_descriptor
*p
= &adap
->dev
->udev
->descriptor
;
1213 if (p
->idVendor
== cpu_to_le16(USB_VID_PINNACLE
) &&
1214 p
->idProduct
== cpu_to_le16(USB_PID_PINNACLE_PCTV72E
))
1215 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1217 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1219 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1220 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1221 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1222 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1224 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1227 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1229 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1231 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
1232 &dib7070p_dib7000p_config
) != 0) {
1233 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1238 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80,
1239 &dib7070p_dib7000p_config
);
1240 return adap
->fe
== NULL
? -ENODEV
: 0;
1244 static struct dib7000p_config dib7770p_dib7000p_config
= {
1245 .output_mpeg2_in_188_bytes
= 1,
1247 .agc_config_count
= 1,
1248 .agc
= &dib7070_agc_config
,
1249 .bw
= &dib7070_bw_config_12_mhz
,
1250 .tuner_is_baseband
= 1,
1253 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1254 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1255 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1257 .hostbus_diversity
= 1,
1258 .enable_current_mirror
= 1,
1261 static int stk7770p_frontend_attach(struct dvb_usb_adapter
*adap
)
1263 struct usb_device_descriptor
*p
= &adap
->dev
->udev
->descriptor
;
1264 if (p
->idVendor
== cpu_to_le16(USB_VID_PINNACLE
) &&
1265 p
->idProduct
== cpu_to_le16(USB_PID_PINNACLE_PCTV72E
))
1266 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1268 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1270 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1271 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1272 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1273 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1275 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1278 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1280 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1282 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
1283 &dib7770p_dib7000p_config
) != 0) {
1284 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1289 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80,
1290 &dib7770p_dib7000p_config
);
1291 return adap
->fe
== NULL
? -ENODEV
: 0;
1294 /* DIB807x generic */
1295 static struct dibx000_agc_config dib807x_agc_config
[2] = {
1298 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1299 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1300 * P_agc_inv_pwm2=0,P_agc_inh_dc_rv_est=0,
1301 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1303 (0 << 15) | (0 << 14) | (7 << 11) | (0 << 10) | (0 << 9) |
1304 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1305 (0 << 0), /* setup*/
1308 10, /* time_stabiliz*/
1318 65535, /* agc1_max*/
1321 65535, /* agc2_max*/
1327 206, /* agc1_slope1*/
1328 255, /* agc1_slope2*/
1331 88, /* agc2_slope1*/
1332 90, /* agc2_slope2*/
1339 0, /* perform_agc_softsplit*/
1342 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1343 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1344 * P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1345 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1347 (0 << 15) | (0 << 14) | (1 << 11) | (0 << 10) | (0 << 9) |
1348 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1349 (0 << 0), /* setup */
1352 10, /* time_stabiliz*/
1362 65535, /* agc1_max*/
1365 65535, /* agc2_max*/
1371 206, /* agc1_slope1*/
1372 255, /* agc1_slope2*/
1375 88, /* agc2_slope1*/
1376 90, /* agc2_slope2*/
1383 0, /* perform_agc_softsplit*/
1387 static struct dibx000_bandwidth_config dib807x_bw_config_12_mhz
= {
1388 60000, 15000, /* internal, sampling*/
1389 1, 20, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass*/
1390 0, 0, 1, 1, 2, /* misc: refdiv, bypclk_div, IO_CLK_en_core,
1392 (3 << 14) | (1 << 12) | (599 << 0), /* sad_cfg: refsel, sel, freq_15k*/
1393 (0 << 25) | 0, /* ifreq = 0.000000 MHz*/
1395 12000000, /* xtal_hz*/
1398 static struct dib8000_config dib807x_dib8000_config
[2] = {
1400 .output_mpeg2_in_188_bytes
= 1,
1402 .agc_config_count
= 2,
1403 .agc
= dib807x_agc_config
,
1404 .pll
= &dib807x_bw_config_12_mhz
,
1405 .tuner_is_baseband
= 1,
1407 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1408 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1409 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1411 .hostbus_diversity
= 1,
1413 .agc_control
= &dib0070_ctrl_agc_filter
,
1414 .output_mode
= OUTMODE_MPEG2_FIFO
,
1417 .output_mpeg2_in_188_bytes
= 1,
1419 .agc_config_count
= 2,
1420 .agc
= dib807x_agc_config
,
1421 .pll
= &dib807x_bw_config_12_mhz
,
1422 .tuner_is_baseband
= 1,
1424 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1425 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1426 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1428 .hostbus_diversity
= 1,
1429 .agc_control
= &dib0070_ctrl_agc_filter
,
1430 .output_mode
= OUTMODE_MPEG2_FIFO
,
1435 static int dib80xx_tuner_reset(struct dvb_frontend
*fe
, int onoff
)
1437 return dib8000_set_gpio(fe
, 5, 0, !onoff
);
1440 static int dib80xx_tuner_sleep(struct dvb_frontend
*fe
, int onoff
)
1442 return dib8000_set_gpio(fe
, 0, 0, onoff
);
1445 static const struct dib0070_wbd_gain_cfg dib8070_wbd_gain_cfg
[] = {
1450 static struct dib0070_config dib807x_dib0070_config
[2] = {
1452 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1453 .reset
= dib80xx_tuner_reset
,
1454 .sleep
= dib80xx_tuner_sleep
,
1456 .clock_pad_drive
= 4,
1458 .force_crystal_mode
= 1,
1459 .enable_third_order_filter
= 1,
1461 .wbd_gain
= dib8070_wbd_gain_cfg
,
1462 .osc_buffer_state
= 0,
1463 .freq_offset_khz_uhf
= -100,
1464 .freq_offset_khz_vhf
= -100,
1466 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1467 .reset
= dib80xx_tuner_reset
,
1468 .sleep
= dib80xx_tuner_sleep
,
1470 .clock_pad_drive
= 2,
1472 .force_crystal_mode
= 1,
1473 .enable_third_order_filter
= 1,
1475 .wbd_gain
= dib8070_wbd_gain_cfg
,
1476 .osc_buffer_state
= 0,
1477 .freq_offset_khz_uhf
= -25,
1478 .freq_offset_khz_vhf
= -25,
1482 static int dib807x_set_param_override(struct dvb_frontend
*fe
,
1483 struct dvb_frontend_parameters
*fep
)
1485 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1486 struct dib0700_adapter_state
*state
= adap
->priv
;
1488 u16 offset
= dib0070_wbd_offset(fe
);
1489 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1494 case BAND_UHF
: /* fall-thru wanted */
1496 offset
+= 250; break;
1498 deb_info("WBD for DiB8000: %d\n", offset
);
1499 dib8000_set_wbd_ref(fe
, offset
);
1501 return state
->set_param_save(fe
, fep
);
1504 static int dib807x_tuner_attach(struct dvb_usb_adapter
*adap
)
1506 struct dib0700_adapter_state
*st
= adap
->priv
;
1507 struct i2c_adapter
*tun_i2c
= dib8000_get_i2c_master(adap
->fe
,
1508 DIBX000_I2C_INTERFACE_TUNER
, 1);
1510 if (adap
->id
== 0) {
1511 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1512 &dib807x_dib0070_config
[0]) == NULL
)
1515 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1516 &dib807x_dib0070_config
[1]) == NULL
)
1520 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1521 adap
->fe
->ops
.tuner_ops
.set_params
= dib807x_set_param_override
;
1525 static int stk80xx_pid_filter(struct dvb_usb_adapter
*adapter
, int index
,
1528 return dib8000_pid_filter(adapter
->fe
, index
, pid
, onoff
);
1531 static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter
*adapter
,
1534 return dib8000_pid_filter_ctrl(adapter
->fe
, onoff
);
1538 static int stk807x_frontend_attach(struct dvb_usb_adapter
*adap
)
1540 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1542 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1543 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1544 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1546 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1548 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1551 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1553 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1555 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
1558 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80,
1559 &dib807x_dib8000_config
[0]);
1561 return adap
->fe
== NULL
? -ENODEV
: 0;
1565 static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter
*adap
)
1567 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1569 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1571 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1572 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1573 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1575 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1577 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1580 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1582 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1584 /* initialize IC 0 */
1585 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 0x22, 0x80);
1587 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80,
1588 &dib807x_dib8000_config
[0]);
1590 return adap
->fe
== NULL
? -ENODEV
: 0;
1593 static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter
*adap
)
1595 /* initialize IC 1 */
1596 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 0x12, 0x82);
1598 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x82,
1599 &dib807x_dib8000_config
[1]);
1601 return adap
->fe
== NULL
? -ENODEV
: 0;
1605 struct dibx000_agc_config dib8090_agc_config
[2] = {
1607 BAND_UHF
| BAND_VHF
| BAND_LBAND
| BAND_SBAND
,
1608 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1609 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1610 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1611 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1612 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1650 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1651 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1652 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1653 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1654 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1692 static struct dibx000_bandwidth_config dib8090_pll_config_12mhz
= {
1696 (3 << 14) | (1 << 12) | (599 << 0),
1702 static int dib8090_get_adc_power(struct dvb_frontend
*fe
)
1704 return dib8000_get_adc_power(fe
, 1);
1707 static struct dib8000_config dib809x_dib8000_config
= {
1708 .output_mpeg2_in_188_bytes
= 1,
1710 .agc_config_count
= 2,
1711 .agc
= dib8090_agc_config
,
1712 .agc_control
= dib0090_dcc_freq
,
1713 .pll
= &dib8090_pll_config_12mhz
,
1714 .tuner_is_baseband
= 1,
1716 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1717 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1718 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1720 .hostbus_diversity
= 1,
1722 .output_mode
= OUTMODE_MPEG2_FIFO
,
1724 .diversity_delay
= 144,
1728 static struct dib0090_config dib809x_dib0090_config
= {
1732 .io
.pll_loopdiv
= 20,
1733 .io
.adc_clock_ratio
= 8,
1734 .io
.pll_int_loop_filt
= 0,
1735 .io
.clock_khz
= 12000,
1736 .reset
= dib80xx_tuner_reset
,
1737 .sleep
= dib80xx_tuner_sleep
,
1740 .i2c_address
= DEFAULT_DIB0090_I2C_ADDRESS
,
1741 .wbd_vhf_offset
= 100,
1742 .wbd_cband_offset
= 450,
1745 .get_adc_power
= dib8090_get_adc_power
,
1746 .freq_offset_khz_uhf
= 0,
1747 .freq_offset_khz_vhf
= -143,
1750 static int dib8096_set_param_override(struct dvb_frontend
*fe
,
1751 struct dvb_frontend_parameters
*fep
)
1753 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1754 struct dib0700_adapter_state
*state
= adap
->priv
;
1755 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1758 enum frontend_tune_state tune_state
= CT_SHUTDOWN
;
1759 u16 ltgain
, rf_gain_limit
;
1761 ret
= state
->set_param_save(fe
, fep
);
1776 offset
+= (dib0090_get_wbd_offset(fe
) * 8 * 18 / 33 + 1) / 2;
1777 dib8000_set_wbd_ref(fe
, offset
);
1780 if (band
== BAND_CBAND
) {
1781 deb_info("tuning in CBAND - soft-AGC startup\n");
1782 /* TODO specific wbd target for dib0090 - needed for startup ? */
1783 dib0090_set_tune_state(fe
, CT_AGC_START
);
1785 ret
= dib0090_gain_control(fe
);
1787 tune_state
= dib0090_get_tune_state(fe
);
1788 if (tune_state
== CT_AGC_STEP_0
)
1789 dib8000_set_gpio(fe
, 6, 0, 1);
1790 else if (tune_state
== CT_AGC_STEP_1
) {
1791 dib0090_get_current_gain(fe
, NULL
, NULL
, &rf_gain_limit
, <gain
);
1792 if (rf_gain_limit
== 0)
1793 dib8000_set_gpio(fe
, 6, 0, 0);
1795 } while (tune_state
< CT_AGC_STOP
);
1796 dib0090_pwm_gain_reset(fe
);
1797 dib8000_pwm_agc_reset(fe
);
1798 dib8000_set_tune_state(fe
, CT_DEMOD_START
);
1800 deb_info("not tuning in CBAND - standard AGC startup\n");
1801 dib0090_pwm_gain_reset(fe
);
1807 static int dib809x_tuner_attach(struct dvb_usb_adapter
*adap
)
1809 struct dib0700_adapter_state
*st
= adap
->priv
;
1810 struct i2c_adapter
*tun_i2c
= dib8000_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1812 if (dvb_attach(dib0090_register
, adap
->fe
, tun_i2c
, &dib809x_dib0090_config
) == NULL
)
1815 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1816 adap
->fe
->ops
.tuner_ops
.set_params
= dib8096_set_param_override
;
1820 static int stk809x_frontend_attach(struct dvb_usb_adapter
*adap
)
1822 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1824 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1825 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1826 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1828 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1830 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1833 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1835 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1837 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18, 0x80);
1839 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80, &dib809x_dib8000_config
);
1841 return adap
->fe
== NULL
? -ENODEV
: 0;
1845 static struct dib7000p_config stk7070pd_dib7000p_config
[2] = {
1847 .output_mpeg2_in_188_bytes
= 1,
1849 .agc_config_count
= 1,
1850 .agc
= &dib7070_agc_config
,
1851 .bw
= &dib7070_bw_config_12_mhz
,
1852 .tuner_is_baseband
= 1,
1855 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1856 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1857 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1859 .hostbus_diversity
= 1,
1861 .output_mpeg2_in_188_bytes
= 1,
1863 .agc_config_count
= 1,
1864 .agc
= &dib7070_agc_config
,
1865 .bw
= &dib7070_bw_config_12_mhz
,
1866 .tuner_is_baseband
= 1,
1869 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1870 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1871 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1873 .hostbus_diversity
= 1,
1877 static int stk7070pd_frontend_attach0(struct dvb_usb_adapter
*adap
)
1879 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1881 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1882 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1883 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1884 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1886 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1889 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1891 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1893 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 2, 18,
1894 stk7070pd_dib7000p_config
) != 0) {
1895 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1900 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80, &stk7070pd_dib7000p_config
[0]);
1901 return adap
->fe
== NULL
? -ENODEV
: 0;
1904 static int stk7070pd_frontend_attach1(struct dvb_usb_adapter
*adap
)
1906 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x82, &stk7070pd_dib7000p_config
[1]);
1907 return adap
->fe
== NULL
? -ENODEV
: 0;
1911 static struct s5h1411_config pinnacle_801e_config
= {
1912 .output_mode
= S5H1411_PARALLEL_OUTPUT
,
1913 .gpio
= S5H1411_GPIO_OFF
,
1914 .mpeg_timing
= S5H1411_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK
,
1915 .qam_if
= S5H1411_IF_44000
,
1916 .vsb_if
= S5H1411_IF_44000
,
1917 .inversion
= S5H1411_INVERSION_OFF
,
1918 .status_mode
= S5H1411_DEMODLOCKING
1921 /* Pinnacle PCTV HD Pro 801e GPIOs map:
1922 GPIO0 - currently unknown
1923 GPIO1 - xc5000 tuner reset
1924 GPIO2 - CX25843 sleep
1925 GPIO3 - currently unknown
1926 GPIO4 - currently unknown
1927 GPIO6 - currently unknown
1928 GPIO7 - currently unknown
1929 GPIO9 - currently unknown
1930 GPIO10 - CX25843 reset
1932 static int s5h1411_frontend_attach(struct dvb_usb_adapter
*adap
)
1934 struct dib0700_state
*st
= adap
->dev
->priv
;
1936 /* Make use of the new i2c functions from FW 1.20 */
1937 st
->fw_use_new_i2c_api
= 1;
1939 /* The s5h1411 requires the dib0700 to not be in master mode */
1940 st
->disable_streaming_master_mode
= 1;
1942 /* All msleep values taken from Windows USB trace */
1943 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 0);
1944 dib0700_set_gpio(adap
->dev
, GPIO3
, GPIO_OUT
, 0);
1945 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1947 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1949 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1951 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1952 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1953 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1954 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1955 dib0700_set_gpio(adap
->dev
, GPIO2
, GPIO_OUT
, 0);
1958 /* Put the CX25843 to sleep for now since we're in digital mode */
1959 dib0700_set_gpio(adap
->dev
, GPIO2
, GPIO_OUT
, 1);
1961 /* GPIOs are initialized, do the attach */
1962 adap
->fe
= dvb_attach(s5h1411_attach
, &pinnacle_801e_config
,
1963 &adap
->dev
->i2c_adap
);
1964 return adap
->fe
== NULL
? -ENODEV
: 0;
1967 static int dib0700_xc5000_tuner_callback(void *priv
, int component
,
1968 int command
, int arg
)
1970 struct dvb_usb_adapter
*adap
= priv
;
1972 if (command
== XC5000_TUNER_RESET
) {
1973 /* Reset the tuner */
1974 dib0700_set_gpio(adap
->dev
, GPIO1
, GPIO_OUT
, 0);
1976 dib0700_set_gpio(adap
->dev
, GPIO1
, GPIO_OUT
, 1);
1979 err("xc5000: unknown tuner callback command: %d\n", command
);
1986 static struct xc5000_config s5h1411_xc5000_tunerconfig
= {
1987 .i2c_address
= 0x64,
1991 static int xc5000_tuner_attach(struct dvb_usb_adapter
*adap
)
1993 /* FIXME: generalize & move to common area */
1994 adap
->fe
->callback
= dib0700_xc5000_tuner_callback
;
1996 return dvb_attach(xc5000_attach
, adap
->fe
, &adap
->dev
->i2c_adap
,
1997 &s5h1411_xc5000_tunerconfig
)
1998 == NULL
? -ENODEV
: 0;
2001 static struct lgdt3305_config hcw_lgdt3305_config
= {
2003 .mpeg_mode
= LGDT3305_MPEG_PARALLEL
,
2004 .tpclk_edge
= LGDT3305_TPCLK_FALLING_EDGE
,
2005 .tpvalid_polarity
= LGDT3305_TP_VALID_LOW
,
2007 .spectral_inversion
= 1,
2010 .usref_8vsb
= 0x0500,
2013 static struct mxl5007t_config hcw_mxl5007t_config
= {
2014 .xtal_freq_hz
= MxL_XTAL_25_MHZ
,
2015 .if_freq_hz
= MxL_IF_6_MHZ
,
2020 GPIO0 - LNA_CTR (H: LNA power enabled, L: LNA power disabled)
2021 GPIO1 - ANT_SEL (H: VPA, L: MCX)
2027 MXL is behind LG's i2c repeater. LG is on SCL2/SDA2 gpios on the DIB
2029 static int lgdt3305_frontend_attach(struct dvb_usb_adapter
*adap
)
2031 struct dib0700_state
*st
= adap
->dev
->priv
;
2033 /* Make use of the new i2c functions from FW 1.20 */
2034 st
->fw_use_new_i2c_api
= 1;
2036 st
->disable_streaming_master_mode
= 1;
2038 /* fe power enable */
2039 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
2041 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
2045 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
2047 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
2049 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
2052 adap
->fe
= dvb_attach(lgdt3305_attach
,
2053 &hcw_lgdt3305_config
,
2054 &adap
->dev
->i2c_adap
);
2056 return adap
->fe
== NULL
? -ENODEV
: 0;
2059 static int mxl5007t_tuner_attach(struct dvb_usb_adapter
*adap
)
2061 return dvb_attach(mxl5007t_attach
, adap
->fe
,
2062 &adap
->dev
->i2c_adap
, 0x60,
2063 &hcw_mxl5007t_config
) == NULL
? -ENODEV
: 0;
2067 /* DVB-USB and USB stuff follows */
2068 struct usb_device_id dib0700_usb_id_table
[] = {
2069 /* 0 */ { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700P
) },
2070 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700P_PC
) },
2071 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500
) },
2072 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500_2
) },
2073 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK
) },
2074 /* 5 */ { USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_VOLAR
) },
2075 { USB_DEVICE(USB_VID_COMPRO
, USB_PID_COMPRO_VIDEOMATE_U500
) },
2076 { USB_DEVICE(USB_VID_UNIWILL
, USB_PID_UNIWILL_STK7700P
) },
2077 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_STK7700P
) },
2078 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK_2
) },
2079 /* 10 */{ USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_VOLAR_2
) },
2080 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV2000E
) },
2081 { USB_DEVICE(USB_VID_TERRATEC
,
2082 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY
) },
2083 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_TD_STICK
) },
2084 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700D
) },
2085 /* 15 */{ USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7070P
) },
2086 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV_DVB_T_FLASH
) },
2087 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7070PD
) },
2088 { USB_DEVICE(USB_VID_PINNACLE
,
2089 USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T
) },
2090 { USB_DEVICE(USB_VID_COMPRO
, USB_PID_COMPRO_VIDEOMATE_U500_PC
) },
2091 /* 20 */{ USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_EXPRESS
) },
2092 { USB_DEVICE(USB_VID_GIGABYTE
, USB_PID_GIGABYTE_U7000
) },
2093 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC
, USB_PID_ARTEC_T14BR
) },
2094 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3000
) },
2095 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3100
) },
2096 /* 25 */{ USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK_3
) },
2097 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_MYTV_T
) },
2098 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_HT_USB_XE
) },
2099 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_EXPRESSCARD_320CX
) },
2100 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV72E
) },
2101 /* 30 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73E
) },
2102 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_EC372S
) },
2103 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_HT_EXPRESS
) },
2104 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_XXS
) },
2105 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_STK7700P_2
) },
2106 /* 35 */{ USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009
) },
2107 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500_3
) },
2108 { USB_DEVICE(USB_VID_GIGABYTE
, USB_PID_GIGABYTE_U8000
) },
2109 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700PH
) },
2110 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3000H
) },
2111 /* 40 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV801E
) },
2112 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV801E_SE
) },
2113 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_EXPRESS
) },
2114 { USB_DEVICE(USB_VID_TERRATEC
,
2115 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2
) },
2116 { USB_DEVICE(USB_VID_SONY
, USB_PID_SONY_PLAYTV
) },
2117 /* 45 */{ USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_PD378S
) },
2118 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_TIGER_ATSC
) },
2119 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_TIGER_ATSC_B210
) },
2120 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_MC770
) },
2121 { USB_DEVICE(USB_VID_ELGATO
, USB_PID_ELGATO_EYETV_DTT
) },
2122 /* 50 */{ USB_DEVICE(USB_VID_ELGATO
, USB_PID_ELGATO_EYETV_DTT_Dlx
) },
2123 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_H
) },
2124 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_T3
) },
2125 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_T5
) },
2126 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700D
) },
2127 /* 55 */{ USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700D_2
) },
2128 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73A
) },
2129 { USB_DEVICE(USB_VID_PCTV
, USB_PID_PINNACLE_PCTV73ESE
) },
2130 { USB_DEVICE(USB_VID_PCTV
, USB_PID_PINNACLE_PCTV282E
) },
2131 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7770P
) },
2132 /* 60 */{ USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_XXS_2
) },
2133 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK807XPVR
) },
2134 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK807XP
) },
2135 { USB_DEVICE_VER(USB_VID_PIXELVIEW
, USB_PID_PIXELVIEW_SBTVD
, 0x000, 0x3f00) },
2136 { USB_DEVICE(USB_VID_EVOLUTEPC
, USB_PID_TVWAY_PLUS
) },
2137 /* 65 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73ESE
) },
2138 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV282E
) },
2139 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK8096GP
) },
2140 { USB_DEVICE(USB_VID_ELGATO
, USB_PID_ELGATO_EYETV_DIVERSITY
) },
2141 { 0 } /* Terminating entry */
2143 MODULE_DEVICE_TABLE(usb
, dib0700_usb_id_table
);
2145 #define DIB0700_DEFAULT_DEVICE_PROPERTIES \
2146 .caps = DVB_USB_IS_AN_I2C_ADAPTER, \
2147 .usb_ctrl = DEVICE_SPECIFIC, \
2148 .firmware = "dvb-usb-dib0700-1.20.fw", \
2149 .download_firmware = dib0700_download_firmware, \
2150 .no_reconnect = 1, \
2151 .size_of_priv = sizeof(struct dib0700_state), \
2152 .i2c_algo = &dib0700_i2c_algo, \
2153 .identify_state = dib0700_identify_state
2155 #define DIB0700_DEFAULT_STREAMING_CONFIG(ep) \
2156 .streaming_ctrl = dib0700_streaming_ctrl, \
2163 .buffersize = 39480, \
2168 struct dvb_usb_device_properties dib0700_devices
[] = {
2170 DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2175 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2176 .pid_filter_count
= 32,
2177 .pid_filter
= stk70x0p_pid_filter
,
2178 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2179 .frontend_attach
= stk7700p_frontend_attach
,
2180 .tuner_attach
= stk7700p_tuner_attach
,
2182 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2186 .num_device_descs
= 8,
2188 { "DiBcom STK7700P reference design",
2189 { &dib0700_usb_id_table
[0], &dib0700_usb_id_table
[1] },
2192 { "Hauppauge Nova-T Stick",
2193 { &dib0700_usb_id_table
[4], &dib0700_usb_id_table
[9], NULL
},
2196 { "AVerMedia AVerTV DVB-T Volar",
2197 { &dib0700_usb_id_table
[5], &dib0700_usb_id_table
[10] },
2200 { "Compro Videomate U500",
2201 { &dib0700_usb_id_table
[6], &dib0700_usb_id_table
[19] },
2204 { "Uniwill STK7700P based (Hama and others)",
2205 { &dib0700_usb_id_table
[7], NULL
},
2208 { "Leadtek Winfast DTV Dongle (STK7700P based)",
2209 { &dib0700_usb_id_table
[8], &dib0700_usb_id_table
[34] },
2212 { "AVerMedia AVerTV DVB-T Express",
2213 { &dib0700_usb_id_table
[20] },
2217 { &dib0700_usb_id_table
[21], NULL
},
2222 .rc_interval
= DEFAULT_RC_INTERVAL
,
2223 .rc_key_map
= ir_codes_dib0700_table
,
2224 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2225 .rc_query
= dib0700_rc_query
2226 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2231 .frontend_attach
= bristol_frontend_attach
,
2232 .tuner_attach
= bristol_tuner_attach
,
2234 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2236 .frontend_attach
= bristol_frontend_attach
,
2237 .tuner_attach
= bristol_tuner_attach
,
2239 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2243 .num_device_descs
= 1,
2245 { "Hauppauge Nova-T 500 Dual DVB-T",
2246 { &dib0700_usb_id_table
[2], &dib0700_usb_id_table
[3], NULL
},
2251 .rc_interval
= DEFAULT_RC_INTERVAL
,
2252 .rc_key_map
= ir_codes_dib0700_table
,
2253 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2254 .rc_query
= dib0700_rc_query
2255 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2260 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2261 .pid_filter_count
= 32,
2262 .pid_filter
= stk70x0p_pid_filter
,
2263 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2264 .frontend_attach
= stk7700d_frontend_attach
,
2265 .tuner_attach
= stk7700d_tuner_attach
,
2267 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2269 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2270 .pid_filter_count
= 32,
2271 .pid_filter
= stk70x0p_pid_filter
,
2272 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2273 .frontend_attach
= stk7700d_frontend_attach
,
2274 .tuner_attach
= stk7700d_tuner_attach
,
2276 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2280 .num_device_descs
= 5,
2282 { "Pinnacle PCTV 2000e",
2283 { &dib0700_usb_id_table
[11], NULL
},
2286 { "Terratec Cinergy DT XS Diversity",
2287 { &dib0700_usb_id_table
[12], NULL
},
2290 { "Hauppauge Nova-TD Stick/Elgato Eye-TV Diversity",
2291 { &dib0700_usb_id_table
[13], NULL
},
2294 { "DiBcom STK7700D reference design",
2295 { &dib0700_usb_id_table
[14], NULL
},
2298 { "YUAN High-Tech DiBcom STK7700D",
2299 { &dib0700_usb_id_table
[55], NULL
},
2305 .rc_interval
= DEFAULT_RC_INTERVAL
,
2306 .rc_key_map
= ir_codes_dib0700_table
,
2307 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2308 .rc_query
= dib0700_rc_query
2310 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2315 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2316 .pid_filter_count
= 32,
2317 .pid_filter
= stk70x0p_pid_filter
,
2318 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2319 .frontend_attach
= stk7700P2_frontend_attach
,
2320 .tuner_attach
= stk7700d_tuner_attach
,
2322 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2326 .num_device_descs
= 3,
2328 { "ASUS My Cinema U3000 Mini DVBT Tuner",
2329 { &dib0700_usb_id_table
[23], NULL
},
2333 { &dib0700_usb_id_table
[31], NULL
},
2336 { "Terratec Cinergy T Express",
2337 { &dib0700_usb_id_table
[42], NULL
},
2342 .rc_interval
= DEFAULT_RC_INTERVAL
,
2343 .rc_key_map
= ir_codes_dib0700_table
,
2344 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2345 .rc_query
= dib0700_rc_query
2346 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2351 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2352 .pid_filter_count
= 32,
2353 .pid_filter
= stk70x0p_pid_filter
,
2354 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2355 .frontend_attach
= stk7070p_frontend_attach
,
2356 .tuner_attach
= dib7070p_tuner_attach
,
2358 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2360 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2364 .num_device_descs
= 11,
2366 { "DiBcom STK7070P reference design",
2367 { &dib0700_usb_id_table
[15], NULL
},
2370 { "Pinnacle PCTV DVB-T Flash Stick",
2371 { &dib0700_usb_id_table
[16], NULL
},
2374 { "Artec T14BR DVB-T",
2375 { &dib0700_usb_id_table
[22], NULL
},
2378 { "ASUS My Cinema U3100 Mini DVBT Tuner",
2379 { &dib0700_usb_id_table
[24], NULL
},
2382 { "Hauppauge Nova-T Stick",
2383 { &dib0700_usb_id_table
[25], NULL
},
2386 { "Hauppauge Nova-T MyTV.t",
2387 { &dib0700_usb_id_table
[26], NULL
},
2390 { "Pinnacle PCTV 72e",
2391 { &dib0700_usb_id_table
[29], NULL
},
2394 { "Pinnacle PCTV 73e",
2395 { &dib0700_usb_id_table
[30], NULL
},
2398 { "Elgato EyeTV DTT",
2399 { &dib0700_usb_id_table
[49], NULL
},
2403 { &dib0700_usb_id_table
[45], NULL
},
2406 { "Elgato EyeTV Dtt Dlx PD378S",
2407 { &dib0700_usb_id_table
[50], NULL
},
2412 .rc_interval
= DEFAULT_RC_INTERVAL
,
2413 .rc_key_map
= ir_codes_dib0700_table
,
2414 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2415 .rc_query
= dib0700_rc_query
2417 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2422 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2423 .pid_filter_count
= 32,
2424 .pid_filter
= stk70x0p_pid_filter
,
2425 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2426 .frontend_attach
= stk7070p_frontend_attach
,
2427 .tuner_attach
= dib7070p_tuner_attach
,
2429 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2431 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2435 .num_device_descs
= 3,
2437 { "Pinnacle PCTV 73A",
2438 { &dib0700_usb_id_table
[56], NULL
},
2441 { "Pinnacle PCTV 73e SE",
2442 { &dib0700_usb_id_table
[57], &dib0700_usb_id_table
[65], NULL
},
2445 { "Pinnacle PCTV 282e",
2446 { &dib0700_usb_id_table
[58], &dib0700_usb_id_table
[66], NULL
},
2451 .rc_interval
= DEFAULT_RC_INTERVAL
,
2452 .rc_key_map
= ir_codes_dib0700_table
,
2453 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2454 .rc_query
= dib0700_rc_query
2456 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2461 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2462 .pid_filter_count
= 32,
2463 .pid_filter
= stk70x0p_pid_filter
,
2464 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2465 .frontend_attach
= stk7070pd_frontend_attach0
,
2466 .tuner_attach
= dib7070p_tuner_attach
,
2468 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2470 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2472 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2473 .pid_filter_count
= 32,
2474 .pid_filter
= stk70x0p_pid_filter
,
2475 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2476 .frontend_attach
= stk7070pd_frontend_attach1
,
2477 .tuner_attach
= dib7070p_tuner_attach
,
2479 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2481 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2485 .num_device_descs
= 7,
2487 { "DiBcom STK7070PD reference design",
2488 { &dib0700_usb_id_table
[17], NULL
},
2491 { "Pinnacle PCTV Dual DVB-T Diversity Stick",
2492 { &dib0700_usb_id_table
[18], NULL
},
2495 { "Hauppauge Nova-TD Stick (52009)",
2496 { &dib0700_usb_id_table
[35], NULL
},
2499 { "Hauppauge Nova-TD-500 (84xxx)",
2500 { &dib0700_usb_id_table
[36], NULL
},
2503 { "Terratec Cinergy DT USB XS Diversity/ T5",
2504 { &dib0700_usb_id_table
[43],
2505 &dib0700_usb_id_table
[53], NULL
},
2509 { &dib0700_usb_id_table
[44], NULL
},
2512 { "Elgato EyeTV Diversity",
2513 { &dib0700_usb_id_table
[68], NULL
},
2517 .rc_interval
= DEFAULT_RC_INTERVAL
,
2518 .rc_key_map
= ir_codes_dib0700_table
,
2519 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2520 .rc_query
= dib0700_rc_query
2521 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2526 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2527 .pid_filter_count
= 32,
2528 .pid_filter
= stk70x0p_pid_filter
,
2529 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2530 .frontend_attach
= stk7700ph_frontend_attach
,
2531 .tuner_attach
= stk7700ph_tuner_attach
,
2533 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2535 .size_of_priv
= sizeof(struct
2536 dib0700_adapter_state
),
2540 .num_device_descs
= 9,
2542 { "Terratec Cinergy HT USB XE",
2543 { &dib0700_usb_id_table
[27], NULL
},
2546 { "Pinnacle Expresscard 320cx",
2547 { &dib0700_usb_id_table
[28], NULL
},
2550 { "Terratec Cinergy HT Express",
2551 { &dib0700_usb_id_table
[32], NULL
},
2554 { "Gigabyte U8000-RH",
2555 { &dib0700_usb_id_table
[37], NULL
},
2558 { "YUAN High-Tech STK7700PH",
2559 { &dib0700_usb_id_table
[38], NULL
},
2562 { "Asus My Cinema-U3000Hybrid",
2563 { &dib0700_usb_id_table
[39], NULL
},
2566 { "YUAN High-Tech MC770",
2567 { &dib0700_usb_id_table
[48], NULL
},
2570 { "Leadtek WinFast DTV Dongle H",
2571 { &dib0700_usb_id_table
[51], NULL
},
2574 { "YUAN High-Tech STK7700D",
2575 { &dib0700_usb_id_table
[54], NULL
},
2579 .rc_interval
= DEFAULT_RC_INTERVAL
,
2580 .rc_key_map
= ir_codes_dib0700_table
,
2581 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2582 .rc_query
= dib0700_rc_query
2583 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2587 .frontend_attach
= s5h1411_frontend_attach
,
2588 .tuner_attach
= xc5000_tuner_attach
,
2590 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2592 .size_of_priv
= sizeof(struct
2593 dib0700_adapter_state
),
2597 .num_device_descs
= 2,
2599 { "Pinnacle PCTV HD Pro USB Stick",
2600 { &dib0700_usb_id_table
[40], NULL
},
2603 { "Pinnacle PCTV HD USB Stick",
2604 { &dib0700_usb_id_table
[41], NULL
},
2608 .rc_interval
= DEFAULT_RC_INTERVAL
,
2609 .rc_key_map
= ir_codes_dib0700_table
,
2610 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2611 .rc_query
= dib0700_rc_query
2612 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2616 .frontend_attach
= lgdt3305_frontend_attach
,
2617 .tuner_attach
= mxl5007t_tuner_attach
,
2619 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2621 .size_of_priv
= sizeof(struct
2622 dib0700_adapter_state
),
2626 .num_device_descs
= 2,
2628 { "Hauppauge ATSC MiniCard (B200)",
2629 { &dib0700_usb_id_table
[46], NULL
},
2632 { "Hauppauge ATSC MiniCard (B210)",
2633 { &dib0700_usb_id_table
[47], NULL
},
2637 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2642 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2643 .pid_filter_count
= 32,
2644 .pid_filter
= stk70x0p_pid_filter
,
2645 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2646 .frontend_attach
= stk7770p_frontend_attach
,
2647 .tuner_attach
= dib7770p_tuner_attach
,
2649 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2652 sizeof(struct dib0700_adapter_state
),
2656 .num_device_descs
= 2,
2658 { "DiBcom STK7770P reference design",
2659 { &dib0700_usb_id_table
[59], NULL
},
2662 { "Terratec Cinergy T USB XXS (HD)/ T3",
2663 { &dib0700_usb_id_table
[33],
2664 &dib0700_usb_id_table
[52],
2665 &dib0700_usb_id_table
[60], NULL
},
2669 .rc_interval
= DEFAULT_RC_INTERVAL
,
2670 .rc_key_map
= ir_codes_dib0700_table
,
2671 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2672 .rc_query
= dib0700_rc_query
2673 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2677 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2678 .pid_filter_count
= 32,
2679 .pid_filter
= stk80xx_pid_filter
,
2680 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2681 .frontend_attach
= stk807x_frontend_attach
,
2682 .tuner_attach
= dib807x_tuner_attach
,
2684 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2687 sizeof(struct dib0700_adapter_state
),
2691 .num_device_descs
= 3,
2693 { "DiBcom STK807xP reference design",
2694 { &dib0700_usb_id_table
[62], NULL
},
2697 { "Prolink Pixelview SBTVD",
2698 { &dib0700_usb_id_table
[63], NULL
},
2701 { "EvolutePC TVWay+",
2702 { &dib0700_usb_id_table
[64], NULL
},
2707 .rc_interval
= DEFAULT_RC_INTERVAL
,
2708 .rc_key_map
= ir_codes_dib0700_table
,
2709 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2710 .rc_query
= dib0700_rc_query
2712 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2716 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2717 .pid_filter_count
= 32,
2718 .pid_filter
= stk80xx_pid_filter
,
2719 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2720 .frontend_attach
= stk807xpvr_frontend_attach0
,
2721 .tuner_attach
= dib807x_tuner_attach
,
2723 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2726 sizeof(struct dib0700_adapter_state
),
2729 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2730 .pid_filter_count
= 32,
2731 .pid_filter
= stk80xx_pid_filter
,
2732 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2733 .frontend_attach
= stk807xpvr_frontend_attach1
,
2734 .tuner_attach
= dib807x_tuner_attach
,
2736 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2739 sizeof(struct dib0700_adapter_state
),
2743 .num_device_descs
= 1,
2745 { "DiBcom STK807xPVR reference design",
2746 { &dib0700_usb_id_table
[61], NULL
},
2751 .rc_interval
= DEFAULT_RC_INTERVAL
,
2752 .rc_key_map
= ir_codes_dib0700_table
,
2753 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2754 .rc_query
= dib0700_rc_query
2755 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2759 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
2760 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2761 .pid_filter_count
= 32,
2762 .pid_filter
= stk80xx_pid_filter
,
2763 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2764 .frontend_attach
= stk809x_frontend_attach
,
2765 .tuner_attach
= dib809x_tuner_attach
,
2767 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2770 sizeof(struct dib0700_adapter_state
),
2774 .num_device_descs
= 1,
2776 { "DiBcom STK8096GP reference design",
2777 { &dib0700_usb_id_table
[67], NULL
},
2782 .rc_interval
= DEFAULT_RC_INTERVAL
,
2783 .rc_key_map
= ir_codes_dib0700_table
,
2784 .rc_key_map_size
= ARRAY_SIZE(ir_codes_dib0700_table
),
2785 .rc_query
= dib0700_rc_query
2789 int dib0700_device_count
= ARRAY_SIZE(dib0700_devices
);