aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <pboettcher@dibcom.fr>2007-07-27 09:08:51 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:03:43 -0400
commitb6884a17fc70e979ef34e4b5560988b522bb50a0 (patch)
treea1be75fb986d578f810d3cd017dbaa678c068b99 /drivers/media/dvb/dvb-usb
parentb2a657603e7285bf05b86ad198111b5403c57b41 (diff)
V4L/DVB (5954): Sync with DiBcom Driver Release 2.1.3 + some improvements
This changesets syncs the OpenSource driver for DiBcom demodulators with version 2.1.3 of DiBcom reference driver. There were some improvements since the last release for linux-dvb, e.g.: - stepped AGC startup - less space for initialization - diversity synchronization Furthermore this changeset contains the following things: - latest AGC settings for MT2266-based devices (namely Nova-TD and other) will improve the sensitivity - support for STK7700D reference design in dib0700-devices - remove some line-breaks when debugging is enabled - getting rid of layer between frontend_parameters and ofdm_channel used in dib*-drivers Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c148
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h1
2 files changed, 102 insertions, 47 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 122d9d4b4baa..04b66f6e659f 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -4,7 +4,7 @@
4 * under the terms of the GNU General Public License as published by the Free 4 * under the terms of the GNU General Public License as published by the Free
5 * Software Foundation, version 2. 5 * Software Foundation, version 2.
6 * 6 *
7 * Copyright (C) 2005-6 DiBcom, SA 7 * Copyright (C) 2005-7 DiBcom, SA
8 */ 8 */
9#include "dib0700.h" 9#include "dib0700.h"
10 10
@@ -99,41 +99,87 @@ static int bristol_tuner_attach(struct dvb_usb_adapter *adap)
99 99
100/* STK7700D: Pinnacle Dual DVB-T Diversity */ 100/* STK7700D: Pinnacle Dual DVB-T Diversity */
101 101
102static struct dibx000_agc_config stk7700d_7000p_mt2266_agc_config = { 102/* MT226x */
103 BAND_UHF/* | BAND_VHF*/, 103static struct dibx000_agc_config stk7700d_7000p_mt2266_agc_config[2] = {
104 0xE64, // setup 104 {
105 2372, // inv_gain 105 BAND_UHF, // band_caps
106 21, // time_stabiliz 106
107 107 /* 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,
108 0, // alpha_level 108 * 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 */
109 118, // thlock 109 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), // setup
110 110
111 0, // wbd_inv 111 1130, // inv_gain
112 0, // wbd_ref 112 21, // time_stabiliz
113 0, // wbd_sel 113
114 0, // wbd_alpha 114 0, // alpha_level
115 115 118, // thlock
116 65535, // agc1_max 116
117 0, // agc1_min 117 0, // wbd_inv
118 65535, // agc2_max 118 3530, // wbd_ref
119 23592, // agc2_min 119 1, // wbd_sel
120 0, // agc1_pt1 120 0, // wbd_alpha
121 128, // agc1_pt2 121
122 128, // agc1_pt3 122 65535, // agc1_max
123 128, // agc1_slope1 123 33770, // agc1_min
124 0, // agc1_slope2 124 65535, // agc2_max
125 128, // agc2_pt1 125 23592, // agc2_min
126 253, // agc2_pt2 126
127 81, // agc2_slope1 127 0, // agc1_pt1
128 0, // agc2_slope2 128 62, // agc1_pt2
129 129 255, // agc1_pt3
130 17, // alpha_mant 130 64, // agc1_slope1
131 27, // alpha_exp 131 64, // agc1_slope2
132 132 132, // agc2_pt1
133 23, // beta_mant 133 192, // agc2_pt2
134 51, // beta_exp 134 80, // agc2_slope1
135 135 80, // agc2_slope2
136 0, // perform_agc_softsplit : 1 en vrai! 136
137 17, // alpha_mant
138 27, // alpha_exp
139 23, // beta_mant
140 51, // beta_exp
141
142 1, // perform_agc_softsplit
143 }, {
144 BAND_VHF | BAND_LBAND, // band_caps
145
146 /* 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,
147 * 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 */
148 (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8) | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), // setup
149
150 2372, // inv_gain
151 21, // time_stabiliz
152
153 0, // alpha_level
154 118, // thlock
155
156 0, // wbd_inv
157 3530, // wbd_ref
158 1, // wbd_sel
159 0, // wbd_alpha
160
161 65535, // agc1_max
162 0, // agc1_min
163 65535, // agc2_max
164 23592, // agc2_min
165
166 0, // agc1_pt1
167 128, // agc1_pt2
168 128, // agc1_pt3
169 128, // agc1_slope1
170 0, // agc1_slope2
171 128, // agc2_pt1
172 253, // agc2_pt2
173 81, // agc2_slope1
174 0, // agc2_slope2
175
176 17, // alpha_mant
177 27, // alpha_exp
178 23, // beta_mant
179 51, // beta_exp
180
181 1, // perform_agc_softsplit
182 }
137}; 183};
138 184
139static struct dibx000_bandwidth_config stk7700d_mt2266_pll_config = { 185static struct dibx000_bandwidth_config stk7700d_mt2266_pll_config = {
@@ -150,23 +196,25 @@ static struct dib7000p_config stk7700d_dib7000p_mt2266_config[] = {
150 .hostbus_diversity = 1, 196 .hostbus_diversity = 1,
151 .tuner_is_baseband = 1, 197 .tuner_is_baseband = 1,
152 198
153 .agc = &stk7700d_7000p_mt2266_agc_config, 199 .agc_config_count = 2,
200 .agc = stk7700d_7000p_mt2266_agc_config,
154 .bw = &stk7700d_mt2266_pll_config, 201 .bw = &stk7700d_mt2266_pll_config,
155 202
156 .gpio_dir = DIB7000M_GPIO_DEFAULT_DIRECTIONS, 203 .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
157 .gpio_val = DIB7000M_GPIO_DEFAULT_VALUES, 204 .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
158 .gpio_pwm_pos = DIB7000M_GPIO_DEFAULT_PWM_POS, 205 .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
159 }, 206 },
160 { .output_mpeg2_in_188_bytes = 1, 207 { .output_mpeg2_in_188_bytes = 1,
161 .hostbus_diversity = 1, 208 .hostbus_diversity = 1,
162 .tuner_is_baseband = 1, 209 .tuner_is_baseband = 1,
163 210
164 .agc = &stk7700d_7000p_mt2266_agc_config, 211 .agc_config_count = 2,
212 .agc = stk7700d_7000p_mt2266_agc_config,
165 .bw = &stk7700d_mt2266_pll_config, 213 .bw = &stk7700d_mt2266_pll_config,
166 214
167 .gpio_dir = DIB7000M_GPIO_DEFAULT_DIRECTIONS, 215 .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
168 .gpio_val = DIB7000M_GPIO_DEFAULT_VALUES, 216 .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
169 .gpio_pwm_pos = DIB7000M_GPIO_DEFAULT_PWM_POS, 217 .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
170 } 218 }
171}; 219};
172 220
@@ -211,7 +259,7 @@ static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap)
211 259
212static u8 rc_request[] = { REQUEST_POLL_RC, 0 }; 260static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
213 261
214int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state) 262static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
215{ 263{
216 u8 key[4]; 264 u8 key[4];
217 int i; 265 int i;
@@ -241,7 +289,7 @@ int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
241 289
242#define KEY_MAP_SIZE (25+48) 290#define KEY_MAP_SIZE (25+48)
243 291
244struct dvb_usb_rc_key stk7700d_rc_keys[] = { 292static struct dvb_usb_rc_key stk7700d_rc_keys[] = {
245 /* Key codes for the tiny Pinnacle remote*/ 293 /* Key codes for the tiny Pinnacle remote*/
246 { 0x07, 0x00, KEY_MUTE }, 294 { 0x07, 0x00, KEY_MUTE },
247 { 0x07, 0x01, KEY_MENU }, // Pinnacle logo 295 { 0x07, 0x01, KEY_MENU }, // Pinnacle logo
@@ -436,6 +484,7 @@ static struct dib7000m_config stk7700p_dib7000m_config = {
436static struct dib7000p_config stk7700p_dib7000p_config = { 484static struct dib7000p_config stk7700p_dib7000p_config = {
437 .output_mpeg2_in_188_bytes = 1, 485 .output_mpeg2_in_188_bytes = 1,
438 486
487 .agc_config_count = 1,
439 .agc = &stk7700p_7000p_mt2060_agc_config, 488 .agc = &stk7700p_7000p_mt2060_agc_config,
440 .bw = &stk7700p_pll_config, 489 .bw = &stk7700p_pll_config,
441 490
@@ -506,6 +555,7 @@ struct usb_device_id dib0700_usb_id_table[] = {
506 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV2000E) }, 555 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV2000E) },
507 { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY) }, 556 { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY) },
508 { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK) }, 557 { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK) },
558 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700D) },
509 { } /* Terminating entry */ 559 { } /* Terminating entry */
510}; 560};
511MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); 561MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -615,7 +665,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
615 } 665 }
616 }, 666 },
617 667
618 .num_device_descs = 3, 668 .num_device_descs = 4,
619 .devices = { 669 .devices = {
620 { "Pinnacle PCTV 2000e", 670 { "Pinnacle PCTV 2000e",
621 { &dib0700_usb_id_table[11], NULL }, 671 { &dib0700_usb_id_table[11], NULL },
@@ -629,6 +679,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
629 { &dib0700_usb_id_table[13], NULL }, 679 { &dib0700_usb_id_table[13], NULL },
630 { NULL }, 680 { NULL },
631 }, 681 },
682 { "DiBcom STK7700D",
683 { &dib0700_usb_id_table[14], NULL },
684 { NULL },
685 },
632 }, 686 },
633 .rc_interval = DEFAULT_RC_INTERVAL, 687 .rc_interval = DEFAULT_RC_INTERVAL,
634 .rc_key_map = stk7700d_rc_keys, 688 .rc_key_map = stk7700d_rc_keys,
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 2e38be3aa45b..5657ad8beaac 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -67,6 +67,7 @@
67#define USB_PID_DIBCOM_MOD3001_WARM 0x0bc7 67#define USB_PID_DIBCOM_MOD3001_WARM 0x0bc7
68#define USB_PID_DIBCOM_STK7700P 0x1e14 68#define USB_PID_DIBCOM_STK7700P 0x1e14
69#define USB_PID_DIBCOM_STK7700P_PC 0x1e78 69#define USB_PID_DIBCOM_STK7700P_PC 0x1e78
70#define USB_PID_DIBCOM_STK7700D 0x1ef0
70#define USB_PID_DIBCOM_ANCHOR_2135_COLD 0x2131 71#define USB_PID_DIBCOM_ANCHOR_2135_COLD 0x2131
71#define USB_PID_DPOSH_M9206_COLD 0x9206 72#define USB_PID_DPOSH_M9206_COLD 0x9206
72#define USB_PID_DPOSH_M9206_WARM 0xa090 73#define USB_PID_DPOSH_M9206_WARM 0xa090