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 dib0700_rc_keys
[] = {
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
},
799 /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */
800 static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config
= {
803 /* 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,
804 * 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 */
805 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
806 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
846 static struct dibx000_agc_config stk7700p_7000p_mt2060_agc_config
= {
849 /* 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,
850 * 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 */
851 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
852 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0),
892 static struct dibx000_bandwidth_config stk7700p_pll_config
= {
896 (3 << 14) | (1 << 12) | (524 << 0),
902 static struct dib7000m_config stk7700p_dib7000m_config
= {
904 .output_mpeg2_in_188_bytes
= 1,
907 .agc_config_count
= 1,
908 .agc
= &stk7700p_7000m_mt2060_agc_config
,
909 .bw
= &stk7700p_pll_config
,
911 .gpio_dir
= DIB7000M_GPIO_DEFAULT_DIRECTIONS
,
912 .gpio_val
= DIB7000M_GPIO_DEFAULT_VALUES
,
913 .gpio_pwm_pos
= DIB7000M_GPIO_DEFAULT_PWM_POS
,
916 static struct dib7000p_config stk7700p_dib7000p_config
= {
917 .output_mpeg2_in_188_bytes
= 1,
919 .agc_config_count
= 1,
920 .agc
= &stk7700p_7000p_mt2060_agc_config
,
921 .bw
= &stk7700p_pll_config
,
923 .gpio_dir
= DIB7000M_GPIO_DEFAULT_DIRECTIONS
,
924 .gpio_val
= DIB7000M_GPIO_DEFAULT_VALUES
,
925 .gpio_pwm_pos
= DIB7000M_GPIO_DEFAULT_PWM_POS
,
928 static int stk7700p_frontend_attach(struct dvb_usb_adapter
*adap
)
930 struct dib0700_state
*st
= adap
->dev
->priv
;
931 /* unless there is no real power management in DVB - we leave the device on GPIO6 */
933 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
934 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0); msleep(50);
936 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1); msleep(10);
937 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
939 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0); msleep(10);
940 dib0700_ctrl_clock(adap
->dev
, 72, 1);
941 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1); msleep(100);
943 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
945 st
->mt2060_if1
[0] = 1220;
947 if (dib7000pc_detection(&adap
->dev
->i2c_adap
)) {
948 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 18, &stk7700p_dib7000p_config
);
949 st
->is_dib7000pc
= 1;
951 adap
->fe
= dvb_attach(dib7000m_attach
, &adap
->dev
->i2c_adap
, 18, &stk7700p_dib7000m_config
);
953 return adap
->fe
== NULL
? -ENODEV
: 0;
956 static struct mt2060_config stk7700p_mt2060_config
= {
960 static int stk7700p_tuner_attach(struct dvb_usb_adapter
*adap
)
962 struct i2c_adapter
*prim_i2c
= &adap
->dev
->i2c_adap
;
963 struct dib0700_state
*st
= adap
->dev
->priv
;
964 struct i2c_adapter
*tun_i2c
;
967 if (adap
->dev
->udev
->descriptor
.idVendor
== cpu_to_le16(USB_VID_HAUPPAUGE
) &&
968 adap
->dev
->udev
->descriptor
.idProduct
== cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK
)) {
969 if (!eeprom_read(prim_i2c
,0x58,&a
)) if1
=1220+a
;
971 if (st
->is_dib7000pc
)
972 tun_i2c
= dib7000p_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
974 tun_i2c
= dib7000m_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
976 return dvb_attach(mt2060_attach
, adap
->fe
, tun_i2c
, &stk7700p_mt2060_config
,
977 if1
) == NULL
? -ENODEV
: 0;
980 /* DIB7070 generic */
981 static struct dibx000_agc_config dib7070_agc_config
= {
982 BAND_UHF
| BAND_VHF
| BAND_LBAND
| BAND_SBAND
,
983 /* 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,
984 * 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 */
985 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
986 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1023 static int dib7070_tuner_reset(struct dvb_frontend
*fe
, int onoff
)
1025 deb_info("reset: %d", onoff
);
1026 return dib7000p_set_gpio(fe
, 8, 0, !onoff
);
1029 static int dib7070_tuner_sleep(struct dvb_frontend
*fe
, int onoff
)
1031 deb_info("sleep: %d", onoff
);
1032 return dib7000p_set_gpio(fe
, 9, 0, onoff
);
1035 static struct dib0070_config dib7070p_dib0070_config
[2] = {
1037 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1038 .reset
= dib7070_tuner_reset
,
1039 .sleep
= dib7070_tuner_sleep
,
1041 .clock_pad_drive
= 4,
1044 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1045 .reset
= dib7070_tuner_reset
,
1046 .sleep
= dib7070_tuner_sleep
,
1052 static struct dib0070_config dib7770p_dib0070_config
= {
1053 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1054 .reset
= dib7070_tuner_reset
,
1055 .sleep
= dib7070_tuner_sleep
,
1057 .clock_pad_drive
= 0,
1062 static int dib7070_set_param_override(struct dvb_frontend
*fe
, struct dvb_frontend_parameters
*fep
)
1064 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1065 struct dib0700_adapter_state
*state
= adap
->priv
;
1068 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1070 case BAND_VHF
: offset
= 950; break;
1072 default: offset
= 550; break;
1074 deb_info("WBD for DiB7000P: %d\n", offset
+ dib0070_wbd_offset(fe
));
1075 dib7000p_set_wbd_ref(fe
, offset
+ dib0070_wbd_offset(fe
));
1076 return state
->set_param_save(fe
, fep
);
1079 static int dib7770_set_param_override(struct dvb_frontend
*fe
,
1080 struct dvb_frontend_parameters
*fep
)
1082 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1083 struct dib0700_adapter_state
*state
= adap
->priv
;
1086 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1089 dib7000p_set_gpio(fe
, 0, 0, 1);
1094 dib7000p_set_gpio(fe
, 0, 0, 0);
1098 deb_info("WBD for DiB7000P: %d\n", offset
+ dib0070_wbd_offset(fe
));
1099 dib7000p_set_wbd_ref(fe
, offset
+ dib0070_wbd_offset(fe
));
1100 return state
->set_param_save(fe
, fep
);
1103 static int dib7770p_tuner_attach(struct dvb_usb_adapter
*adap
)
1105 struct dib0700_adapter_state
*st
= adap
->priv
;
1106 struct i2c_adapter
*tun_i2c
= dib7000p_get_i2c_master(adap
->fe
,
1107 DIBX000_I2C_INTERFACE_TUNER
, 1);
1109 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1110 &dib7770p_dib0070_config
) == NULL
)
1113 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1114 adap
->fe
->ops
.tuner_ops
.set_params
= dib7770_set_param_override
;
1118 static int dib7070p_tuner_attach(struct dvb_usb_adapter
*adap
)
1120 struct dib0700_adapter_state
*st
= adap
->priv
;
1121 struct i2c_adapter
*tun_i2c
= dib7000p_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1123 if (adap
->id
== 0) {
1124 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
, &dib7070p_dib0070_config
[0]) == NULL
)
1127 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
, &dib7070p_dib0070_config
[1]) == NULL
)
1131 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1132 adap
->fe
->ops
.tuner_ops
.set_params
= dib7070_set_param_override
;
1136 static int stk70x0p_pid_filter(struct dvb_usb_adapter
*adapter
, int index
, u16 pid
, int onoff
)
1138 return dib7000p_pid_filter(adapter
->fe
, index
, pid
, onoff
);
1141 static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter
*adapter
, int onoff
)
1143 return dib7000p_pid_filter_ctrl(adapter
->fe
, onoff
);
1146 static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz
= {
1150 (3 << 14) | (1 << 12) | (524 << 0),
1156 static struct dib7000p_config dib7070p_dib7000p_config
= {
1157 .output_mpeg2_in_188_bytes
= 1,
1159 .agc_config_count
= 1,
1160 .agc
= &dib7070_agc_config
,
1161 .bw
= &dib7070_bw_config_12_mhz
,
1162 .tuner_is_baseband
= 1,
1165 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1166 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1167 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1169 .hostbus_diversity
= 1,
1173 static int stk7070p_frontend_attach(struct dvb_usb_adapter
*adap
)
1175 struct usb_device_descriptor
*p
= &adap
->dev
->udev
->descriptor
;
1176 if (p
->idVendor
== cpu_to_le16(USB_VID_PINNACLE
) &&
1177 p
->idProduct
== cpu_to_le16(USB_PID_PINNACLE_PCTV72E
))
1178 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1180 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1182 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1183 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1184 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1185 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1187 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1190 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1192 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1194 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
1195 &dib7070p_dib7000p_config
) != 0) {
1196 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1201 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80,
1202 &dib7070p_dib7000p_config
);
1203 return adap
->fe
== NULL
? -ENODEV
: 0;
1206 /* DIB807x generic */
1207 static struct dibx000_agc_config dib807x_agc_config
[2] = {
1210 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1211 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1212 * P_agc_inv_pwm2=0,P_agc_inh_dc_rv_est=0,
1213 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1215 (0 << 15) | (0 << 14) | (7 << 11) | (0 << 10) | (0 << 9) |
1216 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1217 (0 << 0), /* setup*/
1220 10, /* time_stabiliz*/
1230 65535, /* agc1_max*/
1233 65535, /* agc2_max*/
1239 206, /* agc1_slope1*/
1240 255, /* agc1_slope2*/
1243 88, /* agc2_slope1*/
1244 90, /* agc2_slope2*/
1251 0, /* perform_agc_softsplit*/
1254 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0,
1255 * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0,
1256 * P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1257 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5,
1259 (0 << 15) | (0 << 14) | (1 << 11) | (0 << 10) | (0 << 9) |
1260 (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) |
1261 (0 << 0), /* setup */
1264 10, /* time_stabiliz*/
1274 65535, /* agc1_max*/
1277 65535, /* agc2_max*/
1283 206, /* agc1_slope1*/
1284 255, /* agc1_slope2*/
1287 88, /* agc2_slope1*/
1288 90, /* agc2_slope2*/
1295 0, /* perform_agc_softsplit*/
1299 static struct dibx000_bandwidth_config dib807x_bw_config_12_mhz
= {
1300 60000, 15000, /* internal, sampling*/
1301 1, 20, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass*/
1302 0, 0, 1, 1, 2, /* misc: refdiv, bypclk_div, IO_CLK_en_core,
1304 (3 << 14) | (1 << 12) | (599 << 0), /* sad_cfg: refsel, sel, freq_15k*/
1305 (0 << 25) | 0, /* ifreq = 0.000000 MHz*/
1307 12000000, /* xtal_hz*/
1310 static struct dib8000_config dib807x_dib8000_config
[2] = {
1312 .output_mpeg2_in_188_bytes
= 1,
1314 .agc_config_count
= 2,
1315 .agc
= dib807x_agc_config
,
1316 .pll
= &dib807x_bw_config_12_mhz
,
1317 .tuner_is_baseband
= 1,
1319 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1320 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1321 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1323 .hostbus_diversity
= 1,
1325 .agc_control
= &dib0070_ctrl_agc_filter
,
1326 .output_mode
= OUTMODE_MPEG2_FIFO
,
1329 .output_mpeg2_in_188_bytes
= 1,
1331 .agc_config_count
= 2,
1332 .agc
= dib807x_agc_config
,
1333 .pll
= &dib807x_bw_config_12_mhz
,
1334 .tuner_is_baseband
= 1,
1336 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1337 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1338 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1340 .hostbus_diversity
= 1,
1341 .agc_control
= &dib0070_ctrl_agc_filter
,
1342 .output_mode
= OUTMODE_MPEG2_FIFO
,
1347 static int dib80xx_tuner_reset(struct dvb_frontend
*fe
, int onoff
)
1349 return dib8000_set_gpio(fe
, 5, 0, !onoff
);
1352 static int dib80xx_tuner_sleep(struct dvb_frontend
*fe
, int onoff
)
1354 return dib8000_set_gpio(fe
, 0, 0, onoff
);
1357 static const struct dib0070_wbd_gain_cfg dib8070_wbd_gain_cfg
[] = {
1362 static struct dib0070_config dib807x_dib0070_config
[2] = {
1364 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1365 .reset
= dib80xx_tuner_reset
,
1366 .sleep
= dib80xx_tuner_sleep
,
1368 .clock_pad_drive
= 4,
1370 .force_crystal_mode
= 1,
1371 .enable_third_order_filter
= 1,
1373 .wbd_gain
= dib8070_wbd_gain_cfg
,
1374 .osc_buffer_state
= 0,
1375 .freq_offset_khz_uhf
= -100,
1376 .freq_offset_khz_vhf
= -100,
1378 .i2c_address
= DEFAULT_DIB0070_I2C_ADDRESS
,
1379 .reset
= dib80xx_tuner_reset
,
1380 .sleep
= dib80xx_tuner_sleep
,
1382 .clock_pad_drive
= 2,
1384 .force_crystal_mode
= 1,
1385 .enable_third_order_filter
= 1,
1387 .wbd_gain
= dib8070_wbd_gain_cfg
,
1388 .osc_buffer_state
= 0,
1389 .freq_offset_khz_uhf
= -25,
1390 .freq_offset_khz_vhf
= -25,
1394 static int dib807x_set_param_override(struct dvb_frontend
*fe
,
1395 struct dvb_frontend_parameters
*fep
)
1397 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1398 struct dib0700_adapter_state
*state
= adap
->priv
;
1400 u16 offset
= dib0070_wbd_offset(fe
);
1401 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1406 case BAND_UHF
: /* fall-thru wanted */
1408 offset
+= 250; break;
1410 deb_info("WBD for DiB8000: %d\n", offset
);
1411 dib8000_set_wbd_ref(fe
, offset
);
1413 return state
->set_param_save(fe
, fep
);
1416 static int dib807x_tuner_attach(struct dvb_usb_adapter
*adap
)
1418 struct dib0700_adapter_state
*st
= adap
->priv
;
1419 struct i2c_adapter
*tun_i2c
= dib8000_get_i2c_master(adap
->fe
,
1420 DIBX000_I2C_INTERFACE_TUNER
, 1);
1422 if (adap
->id
== 0) {
1423 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1424 &dib807x_dib0070_config
[0]) == NULL
)
1427 if (dvb_attach(dib0070_attach
, adap
->fe
, tun_i2c
,
1428 &dib807x_dib0070_config
[1]) == NULL
)
1432 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1433 adap
->fe
->ops
.tuner_ops
.set_params
= dib807x_set_param_override
;
1437 static int stk80xx_pid_filter(struct dvb_usb_adapter
*adapter
, int index
,
1440 return dib8000_pid_filter(adapter
->fe
, index
, pid
, onoff
);
1443 static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter
*adapter
,
1446 return dib8000_pid_filter_ctrl(adapter
->fe
, onoff
);
1450 static int stk807x_frontend_attach(struct dvb_usb_adapter
*adap
)
1452 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1454 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1455 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1456 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1458 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1460 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1463 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1465 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1467 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18,
1470 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80,
1471 &dib807x_dib8000_config
[0]);
1473 return adap
->fe
== NULL
? -ENODEV
: 0;
1477 static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter
*adap
)
1479 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1481 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1483 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1484 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1485 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1487 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1489 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1492 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1494 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1496 /* initialize IC 0 */
1497 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 0x22, 0x80);
1499 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80,
1500 &dib807x_dib8000_config
[0]);
1502 return adap
->fe
== NULL
? -ENODEV
: 0;
1505 static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter
*adap
)
1507 /* initialize IC 1 */
1508 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 0x12, 0x82);
1510 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x82,
1511 &dib807x_dib8000_config
[1]);
1513 return adap
->fe
== NULL
? -ENODEV
: 0;
1517 struct dibx000_agc_config dib8090_agc_config
[2] = {
1519 BAND_UHF
| BAND_VHF
| BAND_LBAND
| BAND_SBAND
,
1520 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1521 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1522 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1523 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1524 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1562 /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1,
1563 * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0,
1564 * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */
1565 (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8)
1566 | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0),
1604 static struct dibx000_bandwidth_config dib8090_pll_config_12mhz
= {
1608 (3 << 14) | (1 << 12) | (599 << 0),
1614 static int dib8090_get_adc_power(struct dvb_frontend
*fe
)
1616 return dib8000_get_adc_power(fe
, 1);
1619 static struct dib8000_config dib809x_dib8000_config
= {
1620 .output_mpeg2_in_188_bytes
= 1,
1622 .agc_config_count
= 2,
1623 .agc
= dib8090_agc_config
,
1624 .agc_control
= dib0090_dcc_freq
,
1625 .pll
= &dib8090_pll_config_12mhz
,
1626 .tuner_is_baseband
= 1,
1628 .gpio_dir
= DIB8000_GPIO_DEFAULT_DIRECTIONS
,
1629 .gpio_val
= DIB8000_GPIO_DEFAULT_VALUES
,
1630 .gpio_pwm_pos
= DIB8000_GPIO_DEFAULT_PWM_POS
,
1632 .hostbus_diversity
= 1,
1634 .output_mode
= OUTMODE_MPEG2_FIFO
,
1636 .diversity_delay
= 144,
1640 static struct dib0090_config dib809x_dib0090_config
= {
1644 .io
.pll_loopdiv
= 20,
1645 .io
.adc_clock_ratio
= 8,
1646 .io
.pll_int_loop_filt
= 0,
1647 .io
.clock_khz
= 12000,
1648 .reset
= dib80xx_tuner_reset
,
1649 .sleep
= dib80xx_tuner_sleep
,
1652 .i2c_address
= DEFAULT_DIB0090_I2C_ADDRESS
,
1653 .wbd_vhf_offset
= 100,
1654 .wbd_cband_offset
= 450,
1657 .get_adc_power
= dib8090_get_adc_power
,
1658 .freq_offset_khz_uhf
= 0,
1659 .freq_offset_khz_vhf
= -143,
1662 static int dib8096_set_param_override(struct dvb_frontend
*fe
,
1663 struct dvb_frontend_parameters
*fep
)
1665 struct dvb_usb_adapter
*adap
= fe
->dvb
->priv
;
1666 struct dib0700_adapter_state
*state
= adap
->priv
;
1667 u8 band
= BAND_OF_FREQUENCY(fep
->frequency
/1000);
1670 enum frontend_tune_state tune_state
= CT_SHUTDOWN
;
1671 u16 ltgain
, rf_gain_limit
;
1673 ret
= state
->set_param_save(fe
, fep
);
1688 offset
+= (dib0090_get_wbd_offset(fe
) * 8 * 18 / 33 + 1) / 2;
1689 dib8000_set_wbd_ref(fe
, offset
);
1692 if (band
== BAND_CBAND
) {
1693 deb_info("tuning in CBAND - soft-AGC startup\n");
1694 /* TODO specific wbd target for dib0090 - needed for startup ? */
1695 dib0090_set_tune_state(fe
, CT_AGC_START
);
1697 ret
= dib0090_gain_control(fe
);
1699 tune_state
= dib0090_get_tune_state(fe
);
1700 if (tune_state
== CT_AGC_STEP_0
)
1701 dib8000_set_gpio(fe
, 6, 0, 1);
1702 else if (tune_state
== CT_AGC_STEP_1
) {
1703 dib0090_get_current_gain(fe
, NULL
, NULL
, &rf_gain_limit
, <gain
);
1704 if (rf_gain_limit
== 0)
1705 dib8000_set_gpio(fe
, 6, 0, 0);
1707 } while (tune_state
< CT_AGC_STOP
);
1708 dib0090_pwm_gain_reset(fe
);
1709 dib8000_pwm_agc_reset(fe
);
1710 dib8000_set_tune_state(fe
, CT_DEMOD_START
);
1712 deb_info("not tuning in CBAND - standard AGC startup\n");
1713 dib0090_pwm_gain_reset(fe
);
1719 static int dib809x_tuner_attach(struct dvb_usb_adapter
*adap
)
1721 struct dib0700_adapter_state
*st
= adap
->priv
;
1722 struct i2c_adapter
*tun_i2c
= dib8000_get_i2c_master(adap
->fe
, DIBX000_I2C_INTERFACE_TUNER
, 1);
1724 if (dvb_attach(dib0090_register
, adap
->fe
, tun_i2c
, &dib809x_dib0090_config
) == NULL
)
1727 st
->set_param_save
= adap
->fe
->ops
.tuner_ops
.set_params
;
1728 adap
->fe
->ops
.tuner_ops
.set_params
= dib8096_set_param_override
;
1732 static int stk809x_frontend_attach(struct dvb_usb_adapter
*adap
)
1734 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1736 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1737 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1738 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1740 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1742 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1745 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1747 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1749 dib8000_i2c_enumeration(&adap
->dev
->i2c_adap
, 1, 18, 0x80);
1751 adap
->fe
= dvb_attach(dib8000_attach
, &adap
->dev
->i2c_adap
, 0x80, &dib809x_dib8000_config
);
1753 return adap
->fe
== NULL
? -ENODEV
: 0;
1757 static struct dib7000p_config stk7070pd_dib7000p_config
[2] = {
1759 .output_mpeg2_in_188_bytes
= 1,
1761 .agc_config_count
= 1,
1762 .agc
= &dib7070_agc_config
,
1763 .bw
= &dib7070_bw_config_12_mhz
,
1764 .tuner_is_baseband
= 1,
1767 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1768 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1769 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1771 .hostbus_diversity
= 1,
1773 .output_mpeg2_in_188_bytes
= 1,
1775 .agc_config_count
= 1,
1776 .agc
= &dib7070_agc_config
,
1777 .bw
= &dib7070_bw_config_12_mhz
,
1778 .tuner_is_baseband
= 1,
1781 .gpio_dir
= DIB7000P_GPIO_DEFAULT_DIRECTIONS
,
1782 .gpio_val
= DIB7000P_GPIO_DEFAULT_VALUES
,
1783 .gpio_pwm_pos
= DIB7000P_GPIO_DEFAULT_PWM_POS
,
1785 .hostbus_diversity
= 1,
1789 static int stk7070pd_frontend_attach0(struct dvb_usb_adapter
*adap
)
1791 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1793 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1794 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1795 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1796 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1798 dib0700_ctrl_clock(adap
->dev
, 72, 1);
1801 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1803 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1805 if (dib7000p_i2c_enumeration(&adap
->dev
->i2c_adap
, 2, 18,
1806 stk7070pd_dib7000p_config
) != 0) {
1807 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
1812 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x80, &stk7070pd_dib7000p_config
[0]);
1813 return adap
->fe
== NULL
? -ENODEV
: 0;
1816 static int stk7070pd_frontend_attach1(struct dvb_usb_adapter
*adap
)
1818 adap
->fe
= dvb_attach(dib7000p_attach
, &adap
->dev
->i2c_adap
, 0x82, &stk7070pd_dib7000p_config
[1]);
1819 return adap
->fe
== NULL
? -ENODEV
: 0;
1823 static struct s5h1411_config pinnacle_801e_config
= {
1824 .output_mode
= S5H1411_PARALLEL_OUTPUT
,
1825 .gpio
= S5H1411_GPIO_OFF
,
1826 .mpeg_timing
= S5H1411_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK
,
1827 .qam_if
= S5H1411_IF_44000
,
1828 .vsb_if
= S5H1411_IF_44000
,
1829 .inversion
= S5H1411_INVERSION_OFF
,
1830 .status_mode
= S5H1411_DEMODLOCKING
1833 /* Pinnacle PCTV HD Pro 801e GPIOs map:
1834 GPIO0 - currently unknown
1835 GPIO1 - xc5000 tuner reset
1836 GPIO2 - CX25843 sleep
1837 GPIO3 - currently unknown
1838 GPIO4 - currently unknown
1839 GPIO6 - currently unknown
1840 GPIO7 - currently unknown
1841 GPIO9 - currently unknown
1842 GPIO10 - CX25843 reset
1844 static int s5h1411_frontend_attach(struct dvb_usb_adapter
*adap
)
1846 struct dib0700_state
*st
= adap
->dev
->priv
;
1848 /* Make use of the new i2c functions from FW 1.20 */
1849 st
->fw_use_new_i2c_api
= 1;
1851 /* The s5h1411 requires the dib0700 to not be in master mode */
1852 st
->disable_streaming_master_mode
= 1;
1854 /* All msleep values taken from Windows USB trace */
1855 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 0);
1856 dib0700_set_gpio(adap
->dev
, GPIO3
, GPIO_OUT
, 0);
1857 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1859 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1861 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1863 dib0700_set_gpio(adap
->dev
, GPIO0
, GPIO_OUT
, 1);
1864 dib0700_set_gpio(adap
->dev
, GPIO9
, GPIO_OUT
, 1);
1865 dib0700_set_gpio(adap
->dev
, GPIO4
, GPIO_OUT
, 1);
1866 dib0700_set_gpio(adap
->dev
, GPIO7
, GPIO_OUT
, 1);
1867 dib0700_set_gpio(adap
->dev
, GPIO2
, GPIO_OUT
, 0);
1870 /* Put the CX25843 to sleep for now since we're in digital mode */
1871 dib0700_set_gpio(adap
->dev
, GPIO2
, GPIO_OUT
, 1);
1873 /* GPIOs are initialized, do the attach */
1874 adap
->fe
= dvb_attach(s5h1411_attach
, &pinnacle_801e_config
,
1875 &adap
->dev
->i2c_adap
);
1876 return adap
->fe
== NULL
? -ENODEV
: 0;
1879 static int dib0700_xc5000_tuner_callback(void *priv
, int component
,
1880 int command
, int arg
)
1882 struct dvb_usb_adapter
*adap
= priv
;
1884 if (command
== XC5000_TUNER_RESET
) {
1885 /* Reset the tuner */
1886 dib0700_set_gpio(adap
->dev
, GPIO1
, GPIO_OUT
, 0);
1888 dib0700_set_gpio(adap
->dev
, GPIO1
, GPIO_OUT
, 1);
1891 err("xc5000: unknown tuner callback command: %d\n", command
);
1898 static struct xc5000_config s5h1411_xc5000_tunerconfig
= {
1899 .i2c_address
= 0x64,
1903 static int xc5000_tuner_attach(struct dvb_usb_adapter
*adap
)
1905 /* FIXME: generalize & move to common area */
1906 adap
->fe
->callback
= dib0700_xc5000_tuner_callback
;
1908 return dvb_attach(xc5000_attach
, adap
->fe
, &adap
->dev
->i2c_adap
,
1909 &s5h1411_xc5000_tunerconfig
)
1910 == NULL
? -ENODEV
: 0;
1913 static struct lgdt3305_config hcw_lgdt3305_config
= {
1915 .mpeg_mode
= LGDT3305_MPEG_PARALLEL
,
1916 .tpclk_edge
= LGDT3305_TPCLK_FALLING_EDGE
,
1917 .tpvalid_polarity
= LGDT3305_TP_VALID_LOW
,
1919 .spectral_inversion
= 1,
1922 .usref_8vsb
= 0x0500,
1925 static struct mxl5007t_config hcw_mxl5007t_config
= {
1926 .xtal_freq_hz
= MxL_XTAL_25_MHZ
,
1927 .if_freq_hz
= MxL_IF_6_MHZ
,
1932 GPIO0 - LNA_CTR (H: LNA power enabled, L: LNA power disabled)
1933 GPIO1 - ANT_SEL (H: VPA, L: MCX)
1939 MXL is behind LG's i2c repeater. LG is on SCL2/SDA2 gpios on the DIB
1941 static int lgdt3305_frontend_attach(struct dvb_usb_adapter
*adap
)
1943 struct dib0700_state
*st
= adap
->dev
->priv
;
1945 /* Make use of the new i2c functions from FW 1.20 */
1946 st
->fw_use_new_i2c_api
= 1;
1948 st
->disable_streaming_master_mode
= 1;
1950 /* fe power enable */
1951 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 0);
1953 dib0700_set_gpio(adap
->dev
, GPIO6
, GPIO_OUT
, 1);
1957 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1959 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 0);
1961 dib0700_set_gpio(adap
->dev
, GPIO10
, GPIO_OUT
, 1);
1964 adap
->fe
= dvb_attach(lgdt3305_attach
,
1965 &hcw_lgdt3305_config
,
1966 &adap
->dev
->i2c_adap
);
1968 return adap
->fe
== NULL
? -ENODEV
: 0;
1971 static int mxl5007t_tuner_attach(struct dvb_usb_adapter
*adap
)
1973 return dvb_attach(mxl5007t_attach
, adap
->fe
,
1974 &adap
->dev
->i2c_adap
, 0x60,
1975 &hcw_mxl5007t_config
) == NULL
? -ENODEV
: 0;
1979 /* DVB-USB and USB stuff follows */
1980 struct usb_device_id dib0700_usb_id_table
[] = {
1981 /* 0 */ { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700P
) },
1982 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700P_PC
) },
1983 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500
) },
1984 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500_2
) },
1985 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK
) },
1986 /* 5 */ { USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_VOLAR
) },
1987 { USB_DEVICE(USB_VID_COMPRO
, USB_PID_COMPRO_VIDEOMATE_U500
) },
1988 { USB_DEVICE(USB_VID_UNIWILL
, USB_PID_UNIWILL_STK7700P
) },
1989 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_STK7700P
) },
1990 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK_2
) },
1991 /* 10 */{ USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_VOLAR_2
) },
1992 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV2000E
) },
1993 { USB_DEVICE(USB_VID_TERRATEC
,
1994 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY
) },
1995 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_TD_STICK
) },
1996 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7700D
) },
1997 /* 15 */{ USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7070P
) },
1998 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV_DVB_T_FLASH
) },
1999 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7070PD
) },
2000 { USB_DEVICE(USB_VID_PINNACLE
,
2001 USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T
) },
2002 { USB_DEVICE(USB_VID_COMPRO
, USB_PID_COMPRO_VIDEOMATE_U500_PC
) },
2003 /* 20 */{ USB_DEVICE(USB_VID_AVERMEDIA
, USB_PID_AVERMEDIA_EXPRESS
) },
2004 { USB_DEVICE(USB_VID_GIGABYTE
, USB_PID_GIGABYTE_U7000
) },
2005 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC
, USB_PID_ARTEC_T14BR
) },
2006 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3000
) },
2007 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3100
) },
2008 /* 25 */{ USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_STICK_3
) },
2009 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_MYTV_T
) },
2010 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_HT_USB_XE
) },
2011 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_EXPRESSCARD_320CX
) },
2012 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV72E
) },
2013 /* 30 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73E
) },
2014 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_EC372S
) },
2015 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_HT_EXPRESS
) },
2016 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_XXS
) },
2017 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_STK7700P_2
) },
2018 /* 35 */{ USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009
) },
2019 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_NOVA_T_500_3
) },
2020 { USB_DEVICE(USB_VID_GIGABYTE
, USB_PID_GIGABYTE_U8000
) },
2021 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700PH
) },
2022 { USB_DEVICE(USB_VID_ASUS
, USB_PID_ASUS_U3000H
) },
2023 /* 40 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV801E
) },
2024 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV801E_SE
) },
2025 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_EXPRESS
) },
2026 { USB_DEVICE(USB_VID_TERRATEC
,
2027 USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2
) },
2028 { USB_DEVICE(USB_VID_SONY
, USB_PID_SONY_PLAYTV
) },
2029 /* 45 */{ USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_PD378S
) },
2030 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_TIGER_ATSC
) },
2031 { USB_DEVICE(USB_VID_HAUPPAUGE
, USB_PID_HAUPPAUGE_TIGER_ATSC_B210
) },
2032 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_MC770
) },
2033 { USB_DEVICE(USB_VID_ELGATO
, USB_PID_ELGATO_EYETV_DTT
) },
2034 /* 50 */{ USB_DEVICE(USB_VID_ELGATO
, USB_PID_ELGATO_EYETV_DTT_Dlx
) },
2035 { USB_DEVICE(USB_VID_LEADTEK
, USB_PID_WINFAST_DTV_DONGLE_H
) },
2036 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_T3
) },
2037 { USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_T5
) },
2038 { USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700D
) },
2039 /* 55 */{ USB_DEVICE(USB_VID_YUAN
, USB_PID_YUAN_STK7700D_2
) },
2040 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73A
) },
2041 { USB_DEVICE(USB_VID_PCTV
, USB_PID_PINNACLE_PCTV73ESE
) },
2042 { USB_DEVICE(USB_VID_PCTV
, USB_PID_PINNACLE_PCTV282E
) },
2043 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK7770P
) },
2044 /* 60 */{ USB_DEVICE(USB_VID_TERRATEC
, USB_PID_TERRATEC_CINERGY_T_XXS_2
) },
2045 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK807XPVR
) },
2046 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK807XP
) },
2047 { USB_DEVICE(USB_VID_PIXELVIEW
, USB_PID_PIXELVIEW_SBTVD
) },
2048 { USB_DEVICE(USB_VID_EVOLUTEPC
, USB_PID_TVWAY_PLUS
) },
2049 /* 65 */{ USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV73ESE
) },
2050 { USB_DEVICE(USB_VID_PINNACLE
, USB_PID_PINNACLE_PCTV282E
) },
2051 { USB_DEVICE(USB_VID_DIBCOM
, USB_PID_DIBCOM_STK8096GP
) },
2052 { 0 } /* Terminating entry */
2054 MODULE_DEVICE_TABLE(usb
, dib0700_usb_id_table
);
2056 #define DIB0700_DEFAULT_DEVICE_PROPERTIES \
2057 .caps = DVB_USB_IS_AN_I2C_ADAPTER, \
2058 .usb_ctrl = DEVICE_SPECIFIC, \
2059 .firmware = "dvb-usb-dib0700-1.20.fw", \
2060 .download_firmware = dib0700_download_firmware, \
2061 .no_reconnect = 1, \
2062 .size_of_priv = sizeof(struct dib0700_state), \
2063 .i2c_algo = &dib0700_i2c_algo, \
2064 .identify_state = dib0700_identify_state
2066 #define DIB0700_DEFAULT_STREAMING_CONFIG(ep) \
2067 .streaming_ctrl = dib0700_streaming_ctrl, \
2074 .buffersize = 39480, \
2079 struct dvb_usb_device_properties dib0700_devices
[] = {
2081 DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2086 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2087 .pid_filter_count
= 32,
2088 .pid_filter
= stk70x0p_pid_filter
,
2089 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2090 .frontend_attach
= stk7700p_frontend_attach
,
2091 .tuner_attach
= stk7700p_tuner_attach
,
2093 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2097 .num_device_descs
= 8,
2099 { "DiBcom STK7700P reference design",
2100 { &dib0700_usb_id_table
[0], &dib0700_usb_id_table
[1] },
2103 { "Hauppauge Nova-T Stick",
2104 { &dib0700_usb_id_table
[4], &dib0700_usb_id_table
[9], NULL
},
2107 { "AVerMedia AVerTV DVB-T Volar",
2108 { &dib0700_usb_id_table
[5], &dib0700_usb_id_table
[10] },
2111 { "Compro Videomate U500",
2112 { &dib0700_usb_id_table
[6], &dib0700_usb_id_table
[19] },
2115 { "Uniwill STK7700P based (Hama and others)",
2116 { &dib0700_usb_id_table
[7], NULL
},
2119 { "Leadtek Winfast DTV Dongle (STK7700P based)",
2120 { &dib0700_usb_id_table
[8], &dib0700_usb_id_table
[34] },
2123 { "AVerMedia AVerTV DVB-T Express",
2124 { &dib0700_usb_id_table
[20] },
2128 { &dib0700_usb_id_table
[21], NULL
},
2133 .rc_interval
= DEFAULT_RC_INTERVAL
,
2134 .rc_key_map
= dib0700_rc_keys
,
2135 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2136 .rc_query
= dib0700_rc_query
2137 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2142 .frontend_attach
= bristol_frontend_attach
,
2143 .tuner_attach
= bristol_tuner_attach
,
2145 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2147 .frontend_attach
= bristol_frontend_attach
,
2148 .tuner_attach
= bristol_tuner_attach
,
2150 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2154 .num_device_descs
= 1,
2156 { "Hauppauge Nova-T 500 Dual DVB-T",
2157 { &dib0700_usb_id_table
[2], &dib0700_usb_id_table
[3], NULL
},
2162 .rc_interval
= DEFAULT_RC_INTERVAL
,
2163 .rc_key_map
= dib0700_rc_keys
,
2164 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2165 .rc_query
= dib0700_rc_query
2166 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2171 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2172 .pid_filter_count
= 32,
2173 .pid_filter
= stk70x0p_pid_filter
,
2174 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2175 .frontend_attach
= stk7700d_frontend_attach
,
2176 .tuner_attach
= stk7700d_tuner_attach
,
2178 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2180 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2181 .pid_filter_count
= 32,
2182 .pid_filter
= stk70x0p_pid_filter
,
2183 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2184 .frontend_attach
= stk7700d_frontend_attach
,
2185 .tuner_attach
= stk7700d_tuner_attach
,
2187 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2191 .num_device_descs
= 5,
2193 { "Pinnacle PCTV 2000e",
2194 { &dib0700_usb_id_table
[11], NULL
},
2197 { "Terratec Cinergy DT XS Diversity",
2198 { &dib0700_usb_id_table
[12], NULL
},
2201 { "Hauppauge Nova-TD Stick/Elgato Eye-TV Diversity",
2202 { &dib0700_usb_id_table
[13], NULL
},
2205 { "DiBcom STK7700D reference design",
2206 { &dib0700_usb_id_table
[14], NULL
},
2209 { "YUAN High-Tech DiBcom STK7700D",
2210 { &dib0700_usb_id_table
[55], NULL
},
2216 .rc_interval
= DEFAULT_RC_INTERVAL
,
2217 .rc_key_map
= dib0700_rc_keys
,
2218 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2219 .rc_query
= dib0700_rc_query
2221 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2226 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2227 .pid_filter_count
= 32,
2228 .pid_filter
= stk70x0p_pid_filter
,
2229 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2230 .frontend_attach
= stk7700P2_frontend_attach
,
2231 .tuner_attach
= stk7700d_tuner_attach
,
2233 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2237 .num_device_descs
= 3,
2239 { "ASUS My Cinema U3000 Mini DVBT Tuner",
2240 { &dib0700_usb_id_table
[23], NULL
},
2244 { &dib0700_usb_id_table
[31], NULL
},
2247 { "Terratec Cinergy T Express",
2248 { &dib0700_usb_id_table
[42], NULL
},
2253 .rc_interval
= DEFAULT_RC_INTERVAL
,
2254 .rc_key_map
= dib0700_rc_keys
,
2255 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2256 .rc_query
= dib0700_rc_query
2257 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2262 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2263 .pid_filter_count
= 32,
2264 .pid_filter
= stk70x0p_pid_filter
,
2265 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2266 .frontend_attach
= stk7070p_frontend_attach
,
2267 .tuner_attach
= dib7070p_tuner_attach
,
2269 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2271 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2275 .num_device_descs
= 11,
2277 { "DiBcom STK7070P reference design",
2278 { &dib0700_usb_id_table
[15], NULL
},
2281 { "Pinnacle PCTV DVB-T Flash Stick",
2282 { &dib0700_usb_id_table
[16], NULL
},
2285 { "Artec T14BR DVB-T",
2286 { &dib0700_usb_id_table
[22], NULL
},
2289 { "ASUS My Cinema U3100 Mini DVBT Tuner",
2290 { &dib0700_usb_id_table
[24], NULL
},
2293 { "Hauppauge Nova-T Stick",
2294 { &dib0700_usb_id_table
[25], NULL
},
2297 { "Hauppauge Nova-T MyTV.t",
2298 { &dib0700_usb_id_table
[26], NULL
},
2301 { "Pinnacle PCTV 72e",
2302 { &dib0700_usb_id_table
[29], NULL
},
2305 { "Pinnacle PCTV 73e",
2306 { &dib0700_usb_id_table
[30], NULL
},
2309 { "Elgato EyeTV DTT",
2310 { &dib0700_usb_id_table
[49], NULL
},
2314 { &dib0700_usb_id_table
[45], NULL
},
2317 { "Elgato EyeTV Dtt Dlx PD378S",
2318 { &dib0700_usb_id_table
[50], NULL
},
2323 .rc_interval
= DEFAULT_RC_INTERVAL
,
2324 .rc_key_map
= dib0700_rc_keys
,
2325 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2326 .rc_query
= dib0700_rc_query
2328 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2333 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2334 .pid_filter_count
= 32,
2335 .pid_filter
= stk70x0p_pid_filter
,
2336 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2337 .frontend_attach
= stk7070p_frontend_attach
,
2338 .tuner_attach
= dib7070p_tuner_attach
,
2340 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2342 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2346 .num_device_descs
= 3,
2348 { "Pinnacle PCTV 73A",
2349 { &dib0700_usb_id_table
[56], NULL
},
2352 { "Pinnacle PCTV 73e SE",
2353 { &dib0700_usb_id_table
[57], &dib0700_usb_id_table
[65], NULL
},
2356 { "Pinnacle PCTV 282e",
2357 { &dib0700_usb_id_table
[58], &dib0700_usb_id_table
[66], NULL
},
2362 .rc_interval
= DEFAULT_RC_INTERVAL
,
2363 .rc_key_map
= dib0700_rc_keys
,
2364 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2365 .rc_query
= dib0700_rc_query
2367 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2372 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2373 .pid_filter_count
= 32,
2374 .pid_filter
= stk70x0p_pid_filter
,
2375 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2376 .frontend_attach
= stk7070pd_frontend_attach0
,
2377 .tuner_attach
= dib7070p_tuner_attach
,
2379 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2381 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2383 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2384 .pid_filter_count
= 32,
2385 .pid_filter
= stk70x0p_pid_filter
,
2386 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2387 .frontend_attach
= stk7070pd_frontend_attach1
,
2388 .tuner_attach
= dib7070p_tuner_attach
,
2390 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2392 .size_of_priv
= sizeof(struct dib0700_adapter_state
),
2396 .num_device_descs
= 6,
2398 { "DiBcom STK7070PD reference design",
2399 { &dib0700_usb_id_table
[17], NULL
},
2402 { "Pinnacle PCTV Dual DVB-T Diversity Stick",
2403 { &dib0700_usb_id_table
[18], NULL
},
2406 { "Hauppauge Nova-TD Stick (52009)",
2407 { &dib0700_usb_id_table
[35], NULL
},
2410 { "Hauppauge Nova-TD-500 (84xxx)",
2411 { &dib0700_usb_id_table
[36], NULL
},
2414 { "Terratec Cinergy DT USB XS Diversity/ T5",
2415 { &dib0700_usb_id_table
[43],
2416 &dib0700_usb_id_table
[53], NULL
},
2420 { &dib0700_usb_id_table
[44], NULL
},
2424 .rc_interval
= DEFAULT_RC_INTERVAL
,
2425 .rc_key_map
= dib0700_rc_keys
,
2426 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2427 .rc_query
= dib0700_rc_query
2428 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2433 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2434 .pid_filter_count
= 32,
2435 .pid_filter
= stk70x0p_pid_filter
,
2436 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2437 .frontend_attach
= stk7700ph_frontend_attach
,
2438 .tuner_attach
= stk7700ph_tuner_attach
,
2440 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2442 .size_of_priv
= sizeof(struct
2443 dib0700_adapter_state
),
2447 .num_device_descs
= 9,
2449 { "Terratec Cinergy HT USB XE",
2450 { &dib0700_usb_id_table
[27], NULL
},
2453 { "Pinnacle Expresscard 320cx",
2454 { &dib0700_usb_id_table
[28], NULL
},
2457 { "Terratec Cinergy HT Express",
2458 { &dib0700_usb_id_table
[32], NULL
},
2461 { "Gigabyte U8000-RH",
2462 { &dib0700_usb_id_table
[37], NULL
},
2465 { "YUAN High-Tech STK7700PH",
2466 { &dib0700_usb_id_table
[38], NULL
},
2469 { "Asus My Cinema-U3000Hybrid",
2470 { &dib0700_usb_id_table
[39], NULL
},
2473 { "YUAN High-Tech MC770",
2474 { &dib0700_usb_id_table
[48], NULL
},
2477 { "Leadtek WinFast DTV Dongle H",
2478 { &dib0700_usb_id_table
[51], NULL
},
2481 { "YUAN High-Tech STK7700D",
2482 { &dib0700_usb_id_table
[54], NULL
},
2486 .rc_interval
= DEFAULT_RC_INTERVAL
,
2487 .rc_key_map
= dib0700_rc_keys
,
2488 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2489 .rc_query
= dib0700_rc_query
2490 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2494 .frontend_attach
= s5h1411_frontend_attach
,
2495 .tuner_attach
= xc5000_tuner_attach
,
2497 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2499 .size_of_priv
= sizeof(struct
2500 dib0700_adapter_state
),
2504 .num_device_descs
= 2,
2506 { "Pinnacle PCTV HD Pro USB Stick",
2507 { &dib0700_usb_id_table
[40], NULL
},
2510 { "Pinnacle PCTV HD USB Stick",
2511 { &dib0700_usb_id_table
[41], NULL
},
2515 .rc_interval
= DEFAULT_RC_INTERVAL
,
2516 .rc_key_map
= dib0700_rc_keys
,
2517 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2518 .rc_query
= dib0700_rc_query
2519 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2523 .frontend_attach
= lgdt3305_frontend_attach
,
2524 .tuner_attach
= mxl5007t_tuner_attach
,
2526 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2528 .size_of_priv
= sizeof(struct
2529 dib0700_adapter_state
),
2533 .num_device_descs
= 2,
2535 { "Hauppauge ATSC MiniCard (B200)",
2536 { &dib0700_usb_id_table
[46], NULL
},
2539 { "Hauppauge ATSC MiniCard (B210)",
2540 { &dib0700_usb_id_table
[47], NULL
},
2544 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2549 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2550 .pid_filter_count
= 32,
2551 .pid_filter
= stk70x0p_pid_filter
,
2552 .pid_filter_ctrl
= stk70x0p_pid_filter_ctrl
,
2553 .frontend_attach
= stk7070p_frontend_attach
,
2554 .tuner_attach
= dib7770p_tuner_attach
,
2556 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2559 sizeof(struct dib0700_adapter_state
),
2563 .num_device_descs
= 2,
2565 { "DiBcom STK7770P reference design",
2566 { &dib0700_usb_id_table
[59], NULL
},
2569 { "Terratec Cinergy T USB XXS (HD)/ T3",
2570 { &dib0700_usb_id_table
[33],
2571 &dib0700_usb_id_table
[52],
2572 &dib0700_usb_id_table
[60], NULL
},
2576 .rc_interval
= DEFAULT_RC_INTERVAL
,
2577 .rc_key_map
= dib0700_rc_keys
,
2578 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2579 .rc_query
= dib0700_rc_query
2580 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2584 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2585 .pid_filter_count
= 32,
2586 .pid_filter
= stk80xx_pid_filter
,
2587 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2588 .frontend_attach
= stk807x_frontend_attach
,
2589 .tuner_attach
= dib807x_tuner_attach
,
2591 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2594 sizeof(struct dib0700_adapter_state
),
2598 .num_device_descs
= 3,
2600 { "DiBcom STK807xP reference design",
2601 { &dib0700_usb_id_table
[62], NULL
},
2604 { "Prolink Pixelview SBTVD",
2605 { &dib0700_usb_id_table
[63], NULL
},
2608 { "EvolutePC TVWay+",
2609 { &dib0700_usb_id_table
[64], NULL
},
2614 .rc_interval
= DEFAULT_RC_INTERVAL
,
2615 .rc_key_map
= dib0700_rc_keys
,
2616 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2617 .rc_query
= dib0700_rc_query
2619 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2623 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2624 .pid_filter_count
= 32,
2625 .pid_filter
= stk80xx_pid_filter
,
2626 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2627 .frontend_attach
= stk807xpvr_frontend_attach0
,
2628 .tuner_attach
= dib807x_tuner_attach
,
2630 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2633 sizeof(struct dib0700_adapter_state
),
2636 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
| DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2637 .pid_filter_count
= 32,
2638 .pid_filter
= stk80xx_pid_filter
,
2639 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2640 .frontend_attach
= stk807xpvr_frontend_attach1
,
2641 .tuner_attach
= dib807x_tuner_attach
,
2643 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
2646 sizeof(struct dib0700_adapter_state
),
2650 .num_device_descs
= 1,
2652 { "DiBcom STK807xPVR reference design",
2653 { &dib0700_usb_id_table
[61], NULL
},
2658 .rc_interval
= DEFAULT_RC_INTERVAL
,
2659 .rc_key_map
= dib0700_rc_keys
,
2660 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2661 .rc_query
= dib0700_rc_query
2662 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES
,
2666 .caps
= DVB_USB_ADAP_HAS_PID_FILTER
|
2667 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF
,
2668 .pid_filter_count
= 32,
2669 .pid_filter
= stk80xx_pid_filter
,
2670 .pid_filter_ctrl
= stk80xx_pid_filter_ctrl
,
2671 .frontend_attach
= stk809x_frontend_attach
,
2672 .tuner_attach
= dib809x_tuner_attach
,
2674 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
2677 sizeof(struct dib0700_adapter_state
),
2681 .num_device_descs
= 1,
2683 { "DiBcom STK8096GP reference design",
2684 { &dib0700_usb_id_table
[67], NULL
},
2689 .rc_interval
= DEFAULT_RC_INTERVAL
,
2690 .rc_key_map
= dib0700_rc_keys
,
2691 .rc_key_map_size
= ARRAY_SIZE(dib0700_rc_keys
),
2692 .rc_query
= dib0700_rc_query
2696 int dib0700_device_count
= ARRAY_SIZE(dib0700_devices
);