aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorOlivier DANET <odanet@caramail.com>2006-08-08 14:48:09 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:41 -0400
commita16bf5d5603184dc1db88f37051881b2eeacfd17 (patch)
treedbb50cc4d2e8ec9d7e57853e391181735b2ae809 /drivers/media/dvb
parent47922e9c3f583adf05a23842ff98f3b0bf7eec6d (diff)
V4L/DVB: Adding support for MT2060 and thus for some DVB-USB-devices based on it
- MT2060 tuner driver - Added support for some USB DVB-T devices based on Dib3000P Signed-off-by: Olivier DANET <odanet@caramail.com> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c68
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c7
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mc.c27
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb.h9
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h15
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c21
-rw-r--r--drivers/media/dvb/frontends/dib3000mc_priv.h19
7 files changed, 134 insertions, 32 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index abd75b4a350d..4d3d0d3dab95 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -168,15 +168,63 @@ int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
168} 168}
169EXPORT_SYMBOL(dibusb_read_eeprom_byte); 169EXPORT_SYMBOL(dibusb_read_eeprom_byte);
170 170
171static struct mt2060_config default_mt2060_config = {
172 .i2c_address = 0x60,
173};
174
175static int dibusb_tuner_init(struct dvb_frontend *fe)
176{
177 int ret;
178 struct dvb_usb_device *d = fe->dvb->priv;
179 struct dibusb_state *st = d->priv;
180
181 if (d->tuner_pass_ctrl) {
182 if ((int)d->fe->misc_priv==DIBUSB_TUNER_MT2060) { // Microtune MT2060
183 d->tuner_pass_ctrl(d->fe,1,default_mt2060_config.i2c_address);
184 ret=mt2060_init(&st->mt2060);
185 }
186 else { // Panasonic whatever
187 d->tuner_pass_ctrl(d->fe,1,d->pll_addr);
188 ret=dvb_usb_pll_init_i2c(fe);
189 }
190 d->tuner_pass_ctrl(d->fe,0,0);
191 return ret;
192 }
193 return -ENODEV;
194}
195
196static int dibusb_tuner_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep)
197{
198 int ret;
199 struct dvb_usb_device *d = fe->dvb->priv;
200 struct dibusb_state *st = d->priv;
201
202 if (d->tuner_pass_ctrl) {
203 if ((int)d->fe->misc_priv==DIBUSB_TUNER_MT2060) {
204 d->tuner_pass_ctrl(d->fe,1,default_mt2060_config.i2c_address);
205 ret=mt2060_set(&st->mt2060,fep);
206 }
207 else {
208 d->tuner_pass_ctrl(d->fe,1,d->pll_addr);
209 ret=dvb_usb_pll_set_i2c(fe,fep);
210 }
211 d->tuner_pass_ctrl(d->fe,0,0);
212 return ret;
213 }
214 return -ENODEV;
215}
216
171int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) 217int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d)
172{ 218{
173 struct dib3000_config demod_cfg; 219 struct dib3000_config demod_cfg;
174 struct dibusb_state *st = d->priv; 220 struct dibusb_state *st = d->priv;
175 221
222 demod_cfg.pll_set = dibusb_tuner_set;
223 demod_cfg.pll_init = dibusb_tuner_init;
224
176 for (demod_cfg.demod_address = 0x8; demod_cfg.demod_address < 0xd; demod_cfg.demod_address++) 225 for (demod_cfg.demod_address = 0x8; demod_cfg.demod_address < 0xd; demod_cfg.demod_address++)
177 if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL) { 226 if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL) {
178 d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; 227 d->fe->misc_priv=(void *)DIBUSB_TUNER_DEFAULT;
179 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
180 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; 228 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
181 return 0; 229 return 0;
182 } 230 }
@@ -187,13 +235,19 @@ EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach);
187 235
188int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) 236int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d)
189{ 237{
238 int ret;
190 d->pll_addr = 0x60; 239 d->pll_addr = 0x60;
191 d->pll_desc = &dvb_pll_env57h1xd5; 240 d->pll_desc = &dvb_pll_env57h1xd5;
192 241 if (d->tuner_pass_ctrl) {
193 d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; 242 struct dibusb_state *st = d->priv;
194 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; 243 d->tuner_pass_ctrl(d->fe,1,default_mt2060_config.i2c_address);
195 244 if ((ret = mt2060_attach(&st->mt2060,&default_mt2060_config, &d->i2c_adap)) == 0) {
196 return 0; 245 d->fe->misc_priv=(void *)DIBUSB_TUNER_MT2060;
246 }
247 d->tuner_pass_ctrl(d->fe,0,0);
248 return 0;
249 }
250 return -ENODEV;
197} 251}
198EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); 252EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
199 253
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index f4c45f386ebc..dd5a13195886 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -20,12 +20,11 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d)
20 struct dibusb_state *st = d->priv; 20 struct dibusb_state *st = d->priv;
21 21
22 demod_cfg.demod_address = 0x8; 22 demod_cfg.demod_address = 0x8;
23 demod_cfg.pll_set = dvb_usb_pll_set_i2c;
24 demod_cfg.pll_init = dvb_usb_pll_init_i2c;
23 25
24 if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) { 26 if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL)
25 d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c;
26 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
27 return -ENODEV; 27 return -ENODEV;
28 }
29 28
30 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; 29 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
31 30
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c
index 55802fba3c29..2ef3d739abba 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -28,6 +28,13 @@ static struct usb_device_id dibusb_dib3000mc_table [] = {
28/* 00 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_COLD) }, 28/* 00 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_COLD) },
29/* 01 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_WARM) }, 29/* 01 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_WARM) },
30/* 02 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, 30/* 02 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) },
31/* 03 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) }, // ( ? )
32/* 04 */ { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_COLD) },
33/* 05 */ { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_WARM) },
34/* 06 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_COLD) },
35/* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_WARM) },
36/* 08 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_COLD) },
37/* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_WARM) },
31 { } /* Terminating entry */ 38 { } /* Terminating entry */
32}; 39};
33MODULE_DEVICE_TABLE (usb, dibusb_dib3000mc_table); 40MODULE_DEVICE_TABLE (usb, dibusb_dib3000mc_table);
@@ -68,16 +75,30 @@ static struct dvb_usb_properties dibusb_mc_properties = {
68 } 75 }
69 }, 76 },
70 77
71 .num_device_descs = 2, 78 .num_device_descs = 5,
72 .devices = { 79 .devices = {
73 { "DiBcom USB2.0 DVB-T reference design (MOD3000P)", 80 { "DiBcom USB2.0 DVB-T reference design (MOD3000P)",
74 { &dibusb_dib3000mc_table[0], NULL }, 81 { &dibusb_dib3000mc_table[0], NULL },
75 { &dibusb_dib3000mc_table[1], NULL }, 82 { &dibusb_dib3000mc_table[1], NULL },
76 }, 83 },
77 { "Artec T1 USB2.0 TVBOX (please report the warm ID)", 84 { "Artec T1 USB2.0 TVBOX (please check the warm ID)",
78 { &dibusb_dib3000mc_table[2], NULL }, 85 { &dibusb_dib3000mc_table[2], NULL },
79 { NULL }, 86 { &dibusb_dib3000mc_table[3], NULL },
80 }, 87 },
88 { "LITE-ON USB2.0 DVB-T Tuner",
89 /* Also rebranded as Intuix S800, Toshiba */
90 { &dibusb_dib3000mc_table[4], NULL },
91 { &dibusb_dib3000mc_table[5], NULL },
92 },
93 { "MSI Digivox Mini SL",
94 { &dibusb_dib3000mc_table[6], NULL },
95 { &dibusb_dib3000mc_table[7], NULL },
96 },
97 { "GRAND - USB2.0 DVB-T adapter",
98 { &dibusb_dib3000mc_table[8], NULL },
99 { &dibusb_dib3000mc_table[9], NULL },
100 },
101 { NULL },
81 } 102 }
82}; 103};
83 104
diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h
index 2d99d05c7eab..f3e3ea8c8dbb 100644
--- a/drivers/media/dvb/dvb-usb/dibusb.h
+++ b/drivers/media/dvb/dvb-usb/dibusb.h
@@ -17,6 +17,7 @@
17#include "dvb-usb.h" 17#include "dvb-usb.h"
18 18
19#include "dib3000.h" 19#include "dib3000.h"
20#include "mt2060.h"
20 21
21/* 22/*
22 * protocol of all dibusb related devices 23 * protocol of all dibusb related devices
@@ -94,8 +95,16 @@
94#define DIBUSB_IOCTL_CMD_ENABLE_STREAM 0x01 95#define DIBUSB_IOCTL_CMD_ENABLE_STREAM 0x01
95#define DIBUSB_IOCTL_CMD_DISABLE_STREAM 0x02 96#define DIBUSB_IOCTL_CMD_DISABLE_STREAM 0x02
96 97
98/* Tuner types.
99 These constants shall correspond to the proper AGC values in the array
100 dib3000mc_agc_tuner[][12] in dib3000mc_priv.h */
101#define DIBUSB_TUNER_DEFAULT 1 // a.k.a Panasonic
102#define DIBUSB_TUNER_MT2060 4
103
104
97struct dibusb_state { 105struct dibusb_state {
98 struct dib_fe_xfer_ops ops; 106 struct dib_fe_xfer_ops ops;
107 struct mt2060_state mt2060;
99 108
100 /* for RC5 remote control */ 109 /* for RC5 remote control */
101 int old_toggle; 110 int old_toggle;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index f10f49ad9b20..6039e67425ac 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -31,7 +31,7 @@
31#define USB_VID_VISIONPLUS 0x13d3 31#define USB_VID_VISIONPLUS 0x13d3
32#define USB_VID_TWINHAN 0x1822 32#define USB_VID_TWINHAN 0x1822
33#define USB_VID_ULTIMA_ELECTRONIC 0x05d8 33#define USB_VID_ULTIMA_ELECTRONIC 0x05d8
34#define USB_VID_GENPIX 0x09c0 34#define USB_VID_LITEON 0x04ca
35 35
36/* Product IDs */ 36/* Product IDs */
37#define USB_PID_ADSTECH_USB2_COLD 0xa333 37#define USB_PID_ADSTECH_USB2_COLD 0xa333
@@ -84,10 +84,6 @@
84#define USB_PID_DTT200U_WARM 0x0301 84#define USB_PID_DTT200U_WARM 0x0301
85#define USB_PID_WT220U_COLD 0x0222 85#define USB_PID_WT220U_COLD 0x0222
86#define USB_PID_WT220U_WARM 0x0221 86#define USB_PID_WT220U_WARM 0x0221
87#define USB_PID_WT220U_FC_COLD 0x0225
88#define USB_PID_WT220U_FC_WARM 0x0226
89#define USB_PID_WT220U_ZL0353_COLD 0x022a
90#define USB_PID_WT220U_ZL0353_WARM 0x022b
91#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300 87#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300
92#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301 88#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301
93#define USB_PID_NEBULA_DIGITV 0x0201 89#define USB_PID_NEBULA_DIGITV 0x0201
@@ -107,6 +103,11 @@
107#define USB_PID_KYE_DVB_T_WARM 0x701f 103#define USB_PID_KYE_DVB_T_WARM 0x701f
108#define USB_PID_PCTV_200E 0x020e 104#define USB_PID_PCTV_200E 0x020e
109#define USB_PID_PCTV_400E 0x020f 105#define USB_PID_PCTV_400E 0x020f
110#define USB_PID_GENPIX_8PSK_COLD 0x0200 106#define USB_PID_LITEON_DVB_T_COLD 0xf000
111#define USB_PID_GENPIX_8PSK_WARM 0x0201 107#define USB_PID_LITEON_DVB_T_WARM 0xf001
108#define USB_PID_DIGIVOX_MINI_SL_COLD 0xe360
109#define USB_PID_DIGIVOX_MINI_SL_WARM 0xe361
110#define USB_PID_GRANDTEC_DVBT_USB2_COLD 0x0bc6
111#define USB_PID_GRANDTEC_DVBT_USB2_WARM 0x0bc7
112
112#endif 113#endif
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index 98673474a140..66b30edad2e4 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -20,6 +20,7 @@
20 * see Documentation/dvb/README.dibusb for more information 20 * see Documentation/dvb/README.dibusb for more information
21 * 21 *
22 */ 22 */
23#include <linux/config.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
24#include <linux/module.h> 25#include <linux/module.h>
25#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
@@ -461,9 +462,8 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
461 int search_state,auto_val; 462 int search_state,auto_val;
462 u16 val; 463 u16 val;
463 464
464 if (tuner && fe->ops.tuner_ops.set_params) { /* initial call from dvb */ 465 if (tuner && state->config.pll_set) { /* initial call from dvb */
465 fe->ops.tuner_ops.set_params(fe, fep); 466 state->config.pll_set(fe,fep);
466 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
467 467
468 state->last_tuned_freq = fep->frequency; 468 state->last_tuned_freq = fep->frequency;
469 // if (!scanboost) { 469 // if (!scanboost) {
@@ -558,6 +558,7 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
558static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode) 558static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
559{ 559{
560 struct dib3000_state *state = fe->demodulator_priv; 560 struct dib3000_state *state = fe->demodulator_priv;
561 int AGCtuner=(int)fe->misc_priv;
561 deb_info("init start\n"); 562 deb_info("init start\n");
562 563
563 state->timing_offset = 0; 564 state->timing_offset = 0;
@@ -583,10 +584,11 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
583 /* mobile mode - portable reception */ 584 /* mobile mode - portable reception */
584 wr_foreach(dib3000mc_reg_mobile_mode,dib3000mc_mobile_mode[1]); 585 wr_foreach(dib3000mc_reg_mobile_mode,dib3000mc_mobile_mode[1]);
585 586
586/* TUNER_PANASONIC_ENV57H12D5: */ 587/* TUNER_PANASONIC_ENV57H12D5 or TUNER_MICROTUNE_MT2060. Sets agc_tuner accordingly */
587 wr_foreach(dib3000mc_reg_agc_bandwidth,dib3000mc_agc_bandwidth); 588 wr_foreach(dib3000mc_reg_agc_bandwidth,dib3000mc_agc_bandwidth);
588 wr_foreach(dib3000mc_reg_agc_bandwidth_general,dib3000mc_agc_bandwidth_general); 589 wr_foreach(dib3000mc_reg_agc_bandwidth_general,dib3000mc_agc_bandwidth_general);
589 wr_foreach(dib3000mc_reg_agc,dib3000mc_agc_tuner[1]); 590 if (AGCtuner<0 || AGCtuner>=DIB3000MC_AGC_TUNER_COUNT) AGCtuner=1;
591 wr_foreach(dib3000mc_reg_agc,dib3000mc_agc_tuner[AGCtuner]);
590 592
591 wr(DIB3000MC_REG_UNK_110,DIB3000MC_UNK_110); 593 wr(DIB3000MC_REG_UNK_110,DIB3000MC_UNK_110);
592 wr(26,0x6680); 594 wr(26,0x6680);
@@ -642,6 +644,9 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode)
642 644
643 set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF); 645 set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF);
644 646
647 if (state->config.pll_init)
648 state->config.pll_init(fe);
649
645 deb_info("init end\n"); 650 deb_info("init end\n");
646 return 0; 651 return 0;
647} 652}
@@ -836,6 +841,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
836 /* setup the state */ 841 /* setup the state */
837 state->i2c = i2c; 842 state->i2c = i2c;
838 memcpy(&state->config,config,sizeof(struct dib3000_config)); 843 memcpy(&state->config,config,sizeof(struct dib3000_config));
844 memcpy(&state->ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops));
839 845
840 /* check for the correct demod */ 846 /* check for the correct demod */
841 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) 847 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM)
@@ -855,7 +861,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
855 } 861 }
856 862
857 /* create dvb_frontend */ 863 /* create dvb_frontend */
858 memcpy(&state->frontend.ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops)); 864 state->frontend.ops = &state->ops;
859 state->frontend.demodulator_priv = state; 865 state->frontend.demodulator_priv = state;
860 866
861 /* set the xfer operations */ 867 /* set the xfer operations */
@@ -872,7 +878,6 @@ error:
872 kfree(state); 878 kfree(state);
873 return NULL; 879 return NULL;
874} 880}
875EXPORT_SYMBOL(dib3000mc_attach);
876 881
877static struct dvb_frontend_ops dib3000mc_ops = { 882static struct dvb_frontend_ops dib3000mc_ops = {
878 883
@@ -911,3 +916,5 @@ static struct dvb_frontend_ops dib3000mc_ops = {
911MODULE_AUTHOR(DRIVER_AUTHOR); 916MODULE_AUTHOR(DRIVER_AUTHOR);
912MODULE_DESCRIPTION(DRIVER_DESC); 917MODULE_DESCRIPTION(DRIVER_DESC);
913MODULE_LICENSE("GPL"); 918MODULE_LICENSE("GPL");
919
920EXPORT_SYMBOL(dib3000mc_attach);
diff --git a/drivers/media/dvb/frontends/dib3000mc_priv.h b/drivers/media/dvb/frontends/dib3000mc_priv.h
index 2930aac7591b..e1d0c98cf914 100644
--- a/drivers/media/dvb/frontends/dib3000mc_priv.h
+++ b/drivers/media/dvb/frontends/dib3000mc_priv.h
@@ -159,23 +159,34 @@ static u16 dib3000mc_imp_noise_ctl[][2] = {
159static u16 dib3000mc_reg_agc[] = { 159static u16 dib3000mc_reg_agc[] = {
160 36,37,38,39,42,43,44,45,46,47,48,49 160 36,37,38,39,42,43,44,45,46,47,48,49
161}; 161};
162/* AGC settings. Don't change the ordering of the entries */
163#define DIB3000MC_AGC_TUNER_COUNT 5
162 164
163static u16 dib3000mc_agc_tuner[][12] = { 165static u16 dib3000mc_agc_tuner[][12] = {
164 { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xcf5c, 0x6666, 166/* 0*/ { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xcf5c, 0x6666,
165 0xbae1, 0xa148, 0x3b5e, 0x3c1c, 0x001a, 0x2019 167 0xbae1, 0xa148, 0x3b5e, 0x3c1c, 0x001a, 0x2019
166 }, /* TUNER_PANASONIC_ENV77H04D5, */ 168 }, /* TUNER_PANASONIC_ENV77H04D5, */
167 169
168 { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xdc29, 0x570a, 170/* 1*/ { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xdc29, 0x570a,
169 0xbae1, 0x8ccd, 0x3b6d, 0x551d, 0x000a, 0x951e 171 0xbae1, 0x8ccd, 0x3b6d, 0x551d, 0x000a, 0x951e
170 }, /* TUNER_PANASONIC_ENV57H13D5, TUNER_PANASONIC_ENV57H12D5 */ 172 }, /* TUNER_PANASONIC_ENV57H13D5, TUNER_PANASONIC_ENV57H12D5 */
171 173
172 { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xffff, 0xffff, 174/* 2*/ { 0x0051, 0x301d, 0x0000, 0x1cc7, 0xffff, 0xffff,
173 0xffff, 0x0000, 0xfdfd, 0x4040, 0x00fd, 0x4040 175 0xffff, 0x0000, 0xfdfd, 0x4040, 0x00fd, 0x4040
174 }, /* TUNER_SAMSUNG_DTOS333IH102, TUNER_RFAGCIN_UNKNOWN */ 176 }, /* TUNER_SAMSUNG_DTOS333IH102, TUNER_RFAGCIN_UNKNOWN */
175 177
176 { 0x0196, 0x301d, 0x0000, 0x1cc7, 0xbd71, 0x5c29, 178/* 3*/ { 0x0196, 0x301d, 0x0000, 0x1cc7, 0xbd71, 0x5c29,
177 0xb5c3, 0x6148, 0x6569, 0x5127, 0x0033, 0x3537 179 0xb5c3, 0x6148, 0x6569, 0x5127, 0x0033, 0x3537
178 }, /* TUNER_PROVIDER_X */ 180 }, /* TUNER_PROVIDER_X */
181
182/* 4*/ { 0x0196, 0x301d, 0x0000, 0x1cc7, 0xffff, 0x5c29,
183 0xa8f6, 0x5eb8, 0x65ff, 0x40ff, 0x008a, 0x1114
184 }, /* TUNER_MT2060 ( as in DibCom driver )*/
185
186/* { 0x0196, 0x301d, 0x0000, 0x1cc7, 0xbd71, 0x5c29,
187 0xb5c3, 0x6148, 0x0045, 0x5127, 0x0033, 0x3437
188 },*//* TUNER_MT2060 ( as in LITE-ON driver )*/
189
179 /* TODO TUNER_PANASONIC_ENV57H10D8, TUNER_PANASONIC_ENV57H11D8 */ 190 /* TODO TUNER_PANASONIC_ENV57H10D8, TUNER_PANASONIC_ENV57H11D8 */
180}; 191};
181 192