diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/Kconfig | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.c (renamed from drivers/media/dvb/frontends/lgdt3302.c) | 123 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.h (renamed from drivers/media/dvb/frontends/lgdt3302.h) | 12 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x_priv.h (renamed from drivers/media/dvb/frontends/lgdt3302_priv.h) | 10 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/Makefile | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 29 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 4 |
9 files changed, 93 insertions, 97 deletions
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index d847c62bd837..e83256d0fd14 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -187,8 +187,8 @@ config DVB_BCM3510 | |||
187 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to | 187 | An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to |
188 | support this frontend. | 188 | support this frontend. |
189 | 189 | ||
190 | config DVB_LGDT3302 | 190 | config DVB_LGDT330X |
191 | tristate "LGDT3302 based (DViCO FusionHDTV3 Gold)" | 191 | tristate "LGDT3302 or LGDT3303 based (DViCO FusionHDTV Gold)" |
192 | depends on DVB_CORE | 192 | depends on DVB_CORE |
193 | help | 193 | help |
194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want | 194 | An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want |
diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index de5e240cba7f..ad8658ffd60a 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile | |||
@@ -30,4 +30,4 @@ obj-$(CONFIG_DVB_OR51211) += or51211.o | |||
30 | obj-$(CONFIG_DVB_OR51132) += or51132.o | 30 | obj-$(CONFIG_DVB_OR51132) += or51132.o |
31 | obj-$(CONFIG_DVB_BCM3510) += bcm3510.o | 31 | obj-$(CONFIG_DVB_BCM3510) += bcm3510.o |
32 | obj-$(CONFIG_DVB_S5H1420) += s5h1420.o | 32 | obj-$(CONFIG_DVB_S5H1420) += s5h1420.o |
33 | obj-$(CONFIG_DVB_LGDT3302) += lgdt3302.o | 33 | obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o |
diff --git a/drivers/media/dvb/frontends/lgdt3302.c b/drivers/media/dvb/frontends/lgdt330x.c index c3b8d4e080bb..e94dee50eecd 100644 --- a/drivers/media/dvb/frontends/lgdt3302.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FusionHDTV Gold) - VSB/QAM |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
5 | * | 5 | * |
@@ -25,10 +25,11 @@ | |||
25 | /* | 25 | /* |
26 | * NOTES ABOUT THIS DRIVER | 26 | * NOTES ABOUT THIS DRIVER |
27 | * | 27 | * |
28 | * This driver supports DViCO FusionHDTV 3 Gold under Linux. | 28 | * This driver supports DViCO FusionHDTV Gold under Linux. |
29 | * | 29 | * |
30 | * TODO: | 30 | * TODO: |
31 | * BER and signal strength always return 0. | 31 | * BER and signal strength always return 0. |
32 | * Include support for LGDT3303 | ||
32 | * | 33 | * |
33 | */ | 34 | */ |
34 | 35 | ||
@@ -41,24 +42,24 @@ | |||
41 | 42 | ||
42 | #include "dvb_frontend.h" | 43 | #include "dvb_frontend.h" |
43 | #include "dvb-pll.h" | 44 | #include "dvb-pll.h" |
44 | #include "lgdt3302_priv.h" | 45 | #include "lgdt330x_priv.h" |
45 | #include "lgdt3302.h" | 46 | #include "lgdt330x.h" |
46 | 47 | ||
47 | static int debug = 0; | 48 | static int debug = 0; |
48 | module_param(debug, int, 0644); | 49 | module_param(debug, int, 0644); |
49 | MODULE_PARM_DESC(debug,"Turn on/off lgdt3302 frontend debugging (default:off)."); | 50 | MODULE_PARM_DESC(debug,"Turn on/off lgdt330x frontend debugging (default:off)."); |
50 | #define dprintk(args...) \ | 51 | #define dprintk(args...) \ |
51 | do { \ | 52 | do { \ |
52 | if (debug) printk(KERN_DEBUG "lgdt3302: " args); \ | 53 | if (debug) printk(KERN_DEBUG "lgdt330x: " args); \ |
53 | } while (0) | 54 | } while (0) |
54 | 55 | ||
55 | struct lgdt3302_state | 56 | struct lgdt330x_state |
56 | { | 57 | { |
57 | struct i2c_adapter* i2c; | 58 | struct i2c_adapter* i2c; |
58 | struct dvb_frontend_ops ops; | 59 | struct dvb_frontend_ops ops; |
59 | 60 | ||
60 | /* Configuration settings */ | 61 | /* Configuration settings */ |
61 | const struct lgdt3302_config* config; | 62 | const struct lgdt330x_config* config; |
62 | 63 | ||
63 | struct dvb_frontend frontend; | 64 | struct dvb_frontend frontend; |
64 | 65 | ||
@@ -69,7 +70,7 @@ struct lgdt3302_state | |||
69 | u32 current_frequency; | 70 | u32 current_frequency; |
70 | }; | 71 | }; |
71 | 72 | ||
72 | static int i2c_writebytes (struct lgdt3302_state* state, | 73 | static int i2c_writebytes (struct lgdt330x_state* state, |
73 | u8 addr, /* demod_address or pll_address */ | 74 | u8 addr, /* demod_address or pll_address */ |
74 | u8 *buf, /* data bytes to send */ | 75 | u8 *buf, /* data bytes to send */ |
75 | int len /* number of bytes to send */ ) | 76 | int len /* number of bytes to send */ ) |
@@ -83,7 +84,7 @@ static int i2c_writebytes (struct lgdt3302_state* state, | |||
83 | for (i=1; i<len; i++) { | 84 | for (i=1; i<len; i++) { |
84 | tmp[1] = buf[i]; | 85 | tmp[1] = buf[i]; |
85 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 86 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
86 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x <- %02x, err == %i)\n", __FUNCTION__, addr, buf[0], err); | 87 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err == %i)\n", __FUNCTION__, addr, buf[0], err); |
87 | if (err < 0) | 88 | if (err < 0) |
88 | return err; | 89 | return err; |
89 | else | 90 | else |
@@ -95,7 +96,7 @@ static int i2c_writebytes (struct lgdt3302_state* state, | |||
95 | } | 96 | } |
96 | 97 | ||
97 | #if 0 | 98 | #if 0 |
98 | static int i2c_readbytes (struct lgdt3302_state* state, | 99 | static int i2c_readbytes (struct lgdt330x_state* state, |
99 | u8 addr, /* demod_address or pll_address */ | 100 | u8 addr, /* demod_address or pll_address */ |
100 | u8 *buf, /* holds data bytes read */ | 101 | u8 *buf, /* holds data bytes read */ |
101 | int len /* number of bytes to read */ ) | 102 | int len /* number of bytes to read */ ) |
@@ -105,7 +106,7 @@ static int i2c_readbytes (struct lgdt3302_state* state, | |||
105 | int err; | 106 | int err; |
106 | 107 | ||
107 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 108 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
108 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x, err == %i)\n", __FUNCTION__, addr, err); | 109 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x, err == %i)\n", __FUNCTION__, addr, err); |
109 | return -EREMOTEIO; | 110 | return -EREMOTEIO; |
110 | } | 111 | } |
111 | return 0; | 112 | return 0; |
@@ -117,7 +118,7 @@ static int i2c_readbytes (struct lgdt3302_state* state, | |||
117 | * then reads the data returned for (len) bytes. | 118 | * then reads the data returned for (len) bytes. |
118 | */ | 119 | */ |
119 | 120 | ||
120 | static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | 121 | static u8 i2c_selectreadbytes (struct lgdt330x_state* state, |
121 | enum I2C_REG reg, u8* buf, int len) | 122 | enum I2C_REG reg, u8* buf, int len) |
122 | { | 123 | { |
123 | u8 wr [] = { reg }; | 124 | u8 wr [] = { reg }; |
@@ -130,7 +131,7 @@ static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | |||
130 | int ret; | 131 | int ret; |
131 | ret = i2c_transfer(state->i2c, msg, 2); | 132 | ret = i2c_transfer(state->i2c, msg, 2); |
132 | if (ret != 2) { | 133 | if (ret != 2) { |
133 | printk(KERN_WARNING "lgdt3302: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __FUNCTION__, state->config->demod_address, reg, ret); | 134 | printk(KERN_WARNING "lgdt330x: %s: addr 0x%02x select 0x%02x error (ret == %i)\n", __FUNCTION__, state->config->demod_address, reg, ret); |
134 | } else { | 135 | } else { |
135 | ret = 0; | 136 | ret = 0; |
136 | } | 137 | } |
@@ -138,7 +139,7 @@ static u8 i2c_selectreadbytes (struct lgdt3302_state* state, | |||
138 | } | 139 | } |
139 | 140 | ||
140 | /* Software reset */ | 141 | /* Software reset */ |
141 | int lgdt3302_SwReset(struct lgdt3302_state* state) | 142 | int lgdt330x_SwReset(struct lgdt330x_state* state) |
142 | { | 143 | { |
143 | u8 ret; | 144 | u8 ret; |
144 | u8 reset[] = { | 145 | u8 reset[] = { |
@@ -164,7 +165,7 @@ int lgdt3302_SwReset(struct lgdt3302_state* state) | |||
164 | return ret; | 165 | return ret; |
165 | } | 166 | } |
166 | 167 | ||
167 | static int lgdt3302_init(struct dvb_frontend* fe) | 168 | static int lgdt330x_init(struct dvb_frontend* fe) |
168 | { | 169 | { |
169 | /* Hardware reset is done using gpio[0] of cx23880x chip. | 170 | /* Hardware reset is done using gpio[0] of cx23880x chip. |
170 | * I'd like to do it here, but don't know how to find chip address. | 171 | * I'd like to do it here, but don't know how to find chip address. |
@@ -173,18 +174,18 @@ static int lgdt3302_init(struct dvb_frontend* fe) | |||
173 | * the caller of this function needs to do it. */ | 174 | * the caller of this function needs to do it. */ |
174 | 175 | ||
175 | dprintk("%s entered\n", __FUNCTION__); | 176 | dprintk("%s entered\n", __FUNCTION__); |
176 | return lgdt3302_SwReset((struct lgdt3302_state*) fe->demodulator_priv); | 177 | return lgdt330x_SwReset((struct lgdt330x_state*) fe->demodulator_priv); |
177 | } | 178 | } |
178 | 179 | ||
179 | static int lgdt3302_read_ber(struct dvb_frontend* fe, u32* ber) | 180 | static int lgdt330x_read_ber(struct dvb_frontend* fe, u32* ber) |
180 | { | 181 | { |
181 | *ber = 0; /* Dummy out for now */ | 182 | *ber = 0; /* Dummy out for now */ |
182 | return 0; | 183 | return 0; |
183 | } | 184 | } |
184 | 185 | ||
185 | static int lgdt3302_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | 186 | static int lgdt330x_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) |
186 | { | 187 | { |
187 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 188 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
188 | u8 buf[2]; | 189 | u8 buf[2]; |
189 | 190 | ||
190 | i2c_selectreadbytes(state, PACKET_ERR_COUNTER1, buf, sizeof(buf)); | 191 | i2c_selectreadbytes(state, PACKET_ERR_COUNTER1, buf, sizeof(buf)); |
@@ -193,11 +194,11 @@ static int lgdt3302_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | |||
193 | return 0; | 194 | return 0; |
194 | } | 195 | } |
195 | 196 | ||
196 | static int lgdt3302_set_parameters(struct dvb_frontend* fe, | 197 | static int lgdt330x_set_parameters(struct dvb_frontend* fe, |
197 | struct dvb_frontend_parameters *param) | 198 | struct dvb_frontend_parameters *param) |
198 | { | 199 | { |
199 | struct lgdt3302_state* state = | 200 | struct lgdt330x_state* state = |
200 | (struct lgdt3302_state*) fe->demodulator_priv; | 201 | (struct lgdt330x_state*) fe->demodulator_priv; |
201 | 202 | ||
202 | /* Use 50MHz parameter values from spec sheet since xtal is 50 */ | 203 | /* Use 50MHz parameter values from spec sheet since xtal is 50 */ |
203 | static u8 top_ctrl_cfg[] = { TOP_CONTROL, 0x03 }; | 204 | static u8 top_ctrl_cfg[] = { TOP_CONTROL, 0x03 }; |
@@ -244,7 +245,7 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
244 | state->config->pll_rf_set(fe, 0); | 245 | state->config->pll_rf_set(fe, 0); |
245 | break; | 246 | break; |
246 | default: | 247 | default: |
247 | printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); | 248 | printk(KERN_WARNING "lgdt330x: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation); |
248 | return -1; | 249 | return -1; |
249 | } | 250 | } |
250 | /* Initializations common to all modes */ | 251 | /* Initializations common to all modes */ |
@@ -291,19 +292,17 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
291 | /* Change only if we are actually changing the channel */ | 292 | /* Change only if we are actually changing the channel */ |
292 | if (state->current_frequency != param->frequency) { | 293 | if (state->current_frequency != param->frequency) { |
293 | u8 buf[5]; | 294 | u8 buf[5]; |
295 | struct i2c_msg msg = { .flags = 0, .buf = &buf[1], .len = 4 }; | ||
296 | int err; | ||
294 | 297 | ||
295 | /* This must be done before the initialized msg is declared */ | ||
296 | state->config->pll_set(fe, param, buf); | 298 | state->config->pll_set(fe, param, buf); |
297 | 299 | msg.addr = buf[0]; | |
298 | struct i2c_msg msg = | ||
299 | { .addr = buf[0], .flags = 0, .buf = &buf[1], .len = 4 }; | ||
300 | int err; | ||
301 | 300 | ||
302 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x " | 301 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x " |
303 | "0x%02x 0x%02x\n", __FUNCTION__, | 302 | "0x%02x 0x%02x\n", __FUNCTION__, |
304 | buf[0],buf[1],buf[2],buf[3],buf[4]); | 303 | buf[0],buf[1],buf[2],buf[3],buf[4]); |
305 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { | 304 | if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { |
306 | printk(KERN_WARNING "lgdt3302: %s error (addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err); | 305 | printk(KERN_WARNING "lgdt330x: %s error (addr %02x <- %02x, err = %i)\n", __FUNCTION__, buf[0], buf[1], err); |
307 | if (err < 0) | 306 | if (err < 0) |
308 | return err; | 307 | return err; |
309 | else | 308 | else |
@@ -317,21 +316,21 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
317 | /* Update current frequency */ | 316 | /* Update current frequency */ |
318 | state->current_frequency = param->frequency; | 317 | state->current_frequency = param->frequency; |
319 | } | 318 | } |
320 | lgdt3302_SwReset(state); | 319 | lgdt330x_SwReset(state); |
321 | return 0; | 320 | return 0; |
322 | } | 321 | } |
323 | 322 | ||
324 | static int lgdt3302_get_frontend(struct dvb_frontend* fe, | 323 | static int lgdt330x_get_frontend(struct dvb_frontend* fe, |
325 | struct dvb_frontend_parameters* param) | 324 | struct dvb_frontend_parameters* param) |
326 | { | 325 | { |
327 | struct lgdt3302_state *state = fe->demodulator_priv; | 326 | struct lgdt330x_state *state = fe->demodulator_priv; |
328 | param->frequency = state->current_frequency; | 327 | param->frequency = state->current_frequency; |
329 | return 0; | 328 | return 0; |
330 | } | 329 | } |
331 | 330 | ||
332 | static int lgdt3302_read_status(struct dvb_frontend* fe, fe_status_t* status) | 331 | static int lgdt330x_read_status(struct dvb_frontend* fe, fe_status_t* status) |
333 | { | 332 | { |
334 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 333 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
335 | u8 buf[3]; | 334 | u8 buf[3]; |
336 | 335 | ||
337 | *status = 0; /* Reset status result */ | 336 | *status = 0; /* Reset status result */ |
@@ -391,19 +390,19 @@ static int lgdt3302_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
391 | *status |= FE_HAS_CARRIER; | 390 | *status |= FE_HAS_CARRIER; |
392 | break; | 391 | break; |
393 | default: | 392 | default: |
394 | printk("KERN_WARNING lgdt3302: %s: Modulation set to unsupported value\n", __FUNCTION__); | 393 | printk("KERN_WARNING lgdt330x: %s: Modulation set to unsupported value\n", __FUNCTION__); |
395 | } | 394 | } |
396 | 395 | ||
397 | return 0; | 396 | return 0; |
398 | } | 397 | } |
399 | 398 | ||
400 | static int lgdt3302_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 399 | static int lgdt330x_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
401 | { | 400 | { |
402 | /* not directly available. */ | 401 | /* not directly available. */ |
403 | return 0; | 402 | return 0; |
404 | } | 403 | } |
405 | 404 | ||
406 | static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | 405 | static int lgdt330x_read_snr(struct dvb_frontend* fe, u16* snr) |
407 | { | 406 | { |
408 | #ifdef SNR_IN_DB | 407 | #ifdef SNR_IN_DB |
409 | /* | 408 | /* |
@@ -458,7 +457,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
458 | static u8 buf[5];/* read data buffer */ | 457 | static u8 buf[5];/* read data buffer */ |
459 | static u32 noise; /* noise value */ | 458 | static u32 noise; /* noise value */ |
460 | static u32 snr_db; /* index into SNR_EQ[] */ | 459 | static u32 snr_db; /* index into SNR_EQ[] */ |
461 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 460 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
462 | 461 | ||
463 | /* read both equalizer and pase tracker noise data */ | 462 | /* read both equalizer and pase tracker noise data */ |
464 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); | 463 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); |
@@ -494,7 +493,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
494 | /* Return the raw noise value */ | 493 | /* Return the raw noise value */ |
495 | static u8 buf[5];/* read data buffer */ | 494 | static u8 buf[5];/* read data buffer */ |
496 | static u32 noise; /* noise value */ | 495 | static u32 noise; /* noise value */ |
497 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 496 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
498 | 497 | ||
499 | /* read both equalizer and pase tracker noise data */ | 498 | /* read both equalizer and pase tracker noise data */ |
500 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); | 499 | i2c_selectreadbytes(state, EQPH_ERR0, buf, sizeof(buf)); |
@@ -517,7 +516,7 @@ static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr) | |||
517 | return 0; | 516 | return 0; |
518 | } | 517 | } |
519 | 518 | ||
520 | static int lgdt3302_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) | 519 | static int lgdt330x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fe_tune_settings) |
521 | { | 520 | { |
522 | /* I have no idea about this - it may not be needed */ | 521 | /* I have no idea about this - it may not be needed */ |
523 | fe_tune_settings->min_delay_ms = 500; | 522 | fe_tune_settings->min_delay_ms = 500; |
@@ -526,22 +525,22 @@ static int lgdt3302_get_tune_settings(struct dvb_frontend* fe, struct dvb_fronte | |||
526 | return 0; | 525 | return 0; |
527 | } | 526 | } |
528 | 527 | ||
529 | static void lgdt3302_release(struct dvb_frontend* fe) | 528 | static void lgdt330x_release(struct dvb_frontend* fe) |
530 | { | 529 | { |
531 | struct lgdt3302_state* state = (struct lgdt3302_state*) fe->demodulator_priv; | 530 | struct lgdt330x_state* state = (struct lgdt330x_state*) fe->demodulator_priv; |
532 | kfree(state); | 531 | kfree(state); |
533 | } | 532 | } |
534 | 533 | ||
535 | static struct dvb_frontend_ops lgdt3302_ops; | 534 | static struct dvb_frontend_ops lgdt330x_ops; |
536 | 535 | ||
537 | struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | 536 | struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, |
538 | struct i2c_adapter* i2c) | 537 | struct i2c_adapter* i2c) |
539 | { | 538 | { |
540 | struct lgdt3302_state* state = NULL; | 539 | struct lgdt330x_state* state = NULL; |
541 | u8 buf[1]; | 540 | u8 buf[1]; |
542 | 541 | ||
543 | /* Allocate memory for the internal state */ | 542 | /* Allocate memory for the internal state */ |
544 | state = (struct lgdt3302_state*) kmalloc(sizeof(struct lgdt3302_state), GFP_KERNEL); | 543 | state = (struct lgdt330x_state*) kmalloc(sizeof(struct lgdt330x_state), GFP_KERNEL); |
545 | if (state == NULL) | 544 | if (state == NULL) |
546 | goto error; | 545 | goto error; |
547 | memset(state,0,sizeof(*state)); | 546 | memset(state,0,sizeof(*state)); |
@@ -549,7 +548,7 @@ struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | |||
549 | /* Setup the state */ | 548 | /* Setup the state */ |
550 | state->config = config; | 549 | state->config = config; |
551 | state->i2c = i2c; | 550 | state->i2c = i2c; |
552 | memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); | 551 | memcpy(&state->ops, &lgdt330x_ops, sizeof(struct dvb_frontend_ops)); |
553 | /* Verify communication with demod chip */ | 552 | /* Verify communication with demod chip */ |
554 | if (i2c_selectreadbytes(state, 2, buf, 1)) | 553 | if (i2c_selectreadbytes(state, 2, buf, 1)) |
555 | goto error; | 554 | goto error; |
@@ -569,9 +568,9 @@ error: | |||
569 | return NULL; | 568 | return NULL; |
570 | } | 569 | } |
571 | 570 | ||
572 | static struct dvb_frontend_ops lgdt3302_ops = { | 571 | static struct dvb_frontend_ops lgdt330x_ops = { |
573 | .info = { | 572 | .info = { |
574 | .name= "LG Electronics LGDT3302 VSB/QAM Frontend", | 573 | .name= "LG Electronics lgdt330x VSB/QAM Frontend", |
575 | .type = FE_ATSC, | 574 | .type = FE_ATSC, |
576 | .frequency_min= 54000000, | 575 | .frequency_min= 54000000, |
577 | .frequency_max= 858000000, | 576 | .frequency_max= 858000000, |
@@ -581,23 +580,23 @@ static struct dvb_frontend_ops lgdt3302_ops = { | |||
581 | .symbol_rate_max = 10762000, | 580 | .symbol_rate_max = 10762000, |
582 | .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB | 581 | .caps = FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB |
583 | }, | 582 | }, |
584 | .init = lgdt3302_init, | 583 | .init = lgdt330x_init, |
585 | .set_frontend = lgdt3302_set_parameters, | 584 | .set_frontend = lgdt330x_set_parameters, |
586 | .get_frontend = lgdt3302_get_frontend, | 585 | .get_frontend = lgdt330x_get_frontend, |
587 | .get_tune_settings = lgdt3302_get_tune_settings, | 586 | .get_tune_settings = lgdt330x_get_tune_settings, |
588 | .read_status = lgdt3302_read_status, | 587 | .read_status = lgdt330x_read_status, |
589 | .read_ber = lgdt3302_read_ber, | 588 | .read_ber = lgdt330x_read_ber, |
590 | .read_signal_strength = lgdt3302_read_signal_strength, | 589 | .read_signal_strength = lgdt330x_read_signal_strength, |
591 | .read_snr = lgdt3302_read_snr, | 590 | .read_snr = lgdt330x_read_snr, |
592 | .read_ucblocks = lgdt3302_read_ucblocks, | 591 | .read_ucblocks = lgdt330x_read_ucblocks, |
593 | .release = lgdt3302_release, | 592 | .release = lgdt330x_release, |
594 | }; | 593 | }; |
595 | 594 | ||
596 | MODULE_DESCRIPTION("LGDT3302 [DViCO FusionHDTV 3 Gold] (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver"); | 595 | MODULE_DESCRIPTION("lgdt330x [DViCO FusionHDTV 3 Gold] (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver"); |
597 | MODULE_AUTHOR("Wilson Michaels"); | 596 | MODULE_AUTHOR("Wilson Michaels"); |
598 | MODULE_LICENSE("GPL"); | 597 | MODULE_LICENSE("GPL"); |
599 | 598 | ||
600 | EXPORT_SYMBOL(lgdt3302_attach); | 599 | EXPORT_SYMBOL(lgdt330x_attach); |
601 | 600 | ||
602 | /* | 601 | /* |
603 | * Local variables: | 602 | * Local variables: |
diff --git a/drivers/media/dvb/frontends/lgdt3302.h b/drivers/media/dvb/frontends/lgdt330x.h index 6bf6f985e080..04986f8e7565 100644 --- a/drivers/media/dvb/frontends/lgdt3302.h +++ b/drivers/media/dvb/frontends/lgdt330x.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
5 | * | 5 | * |
@@ -19,12 +19,12 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef LGDT3302_H | 22 | #ifndef LGDT330X_H |
23 | #define LGDT3302_H | 23 | #define LGDT330X_H |
24 | 24 | ||
25 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
26 | 26 | ||
27 | struct lgdt3302_config | 27 | struct lgdt330x_config |
28 | { | 28 | { |
29 | /* The demodulator's i2c address */ | 29 | /* The demodulator's i2c address */ |
30 | u8 demod_address; | 30 | u8 demod_address; |
@@ -37,10 +37,10 @@ struct lgdt3302_config | |||
37 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); | 37 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
38 | }; | 38 | }; |
39 | 39 | ||
40 | extern struct dvb_frontend* lgdt3302_attach(const struct lgdt3302_config* config, | 40 | extern struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, |
41 | struct i2c_adapter* i2c); | 41 | struct i2c_adapter* i2c); |
42 | 42 | ||
43 | #endif /* LGDT3302_H */ | 43 | #endif /* LGDT330X_H */ |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Local variables: | 46 | * Local variables: |
diff --git a/drivers/media/dvb/frontends/lgdt3302_priv.h b/drivers/media/dvb/frontends/lgdt330x_priv.h index 6193fa7a569d..4143ce8f1a95 100644 --- a/drivers/media/dvb/frontends/lgdt3302_priv.h +++ b/drivers/media/dvb/frontends/lgdt330x_priv.h | |||
@@ -1,7 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: lgdt3302_priv.h,v 1.2 2005/06/28 23:50:48 mkrufky Exp $ | 2 | * Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM |
3 | * | ||
4 | * Support for LGDT3302 (DViCO FustionHDTV 3 Gold) - VSB/QAM | ||
5 | * | 3 | * |
6 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> | 4 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
7 | * | 5 | * |
@@ -21,8 +19,8 @@ | |||
21 | * | 19 | * |
22 | */ | 20 | */ |
23 | 21 | ||
24 | #ifndef _LGDT3302_PRIV_ | 22 | #ifndef _LGDT330X_PRIV_ |
25 | #define _LGDT3302_PRIV_ | 23 | #define _LGDT330X_PRIV_ |
26 | 24 | ||
27 | /* i2c control register addresses */ | 25 | /* i2c control register addresses */ |
28 | enum I2C_REG { | 26 | enum I2C_REG { |
@@ -63,7 +61,7 @@ enum I2C_REG { | |||
63 | PACKET_ERR_COUNTER2= 0x6b, | 61 | PACKET_ERR_COUNTER2= 0x6b, |
64 | }; | 62 | }; |
65 | 63 | ||
66 | #endif /* _LGDT3302_PRIV_ */ | 64 | #endif /* _LGDT330X_PRIV_ */ |
67 | 65 | ||
68 | /* | 66 | /* |
69 | * Local variables: | 67 | * Local variables: |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index e0e4930d7eff..ac81e5e01a9a 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -331,7 +331,7 @@ config VIDEO_CX88_DVB | |||
331 | select DVB_MT352 | 331 | select DVB_MT352 |
332 | select DVB_OR51132 | 332 | select DVB_OR51132 |
333 | select DVB_CX22702 | 333 | select DVB_CX22702 |
334 | select DVB_LGDT3302 | 334 | select DVB_LGDT330X |
335 | ---help--- | 335 | ---help--- |
336 | This adds support for DVB/ATSC cards based on the | 336 | This adds support for DVB/ATSC cards based on the |
337 | Connexant 2388x chip. | 337 | Connexant 2388x chip. |
diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile index 000f4c3454da..107e48645e3a 100644 --- a/drivers/media/video/cx88/Makefile +++ b/drivers/media/video/cx88/Makefile | |||
@@ -15,8 +15,8 @@ endif | |||
15 | ifneq ($(CONFIG_DVB_OR51132),n) | 15 | ifneq ($(CONFIG_DVB_OR51132),n) |
16 | EXTRA_CFLAGS += -DHAVE_OR51132=1 | 16 | EXTRA_CFLAGS += -DHAVE_OR51132=1 |
17 | endif | 17 | endif |
18 | ifneq ($(CONFIG_DVB_LGDT3302),n) | 18 | ifneq ($(CONFIG_DVB_LGDT330X),n) |
19 | EXTRA_CFLAGS += -DHAVE_LGDT3302=1 | 19 | EXTRA_CFLAGS += -DHAVE_LGDT330X=1 |
20 | endif | 20 | endif |
21 | ifneq ($(CONFIG_DVB_MT352),n) | 21 | ifneq ($(CONFIG_DVB_MT352),n) |
22 | EXTRA_CFLAGS += -DHAVE_MT352=1 | 22 | EXTRA_CFLAGS += -DHAVE_MT352=1 |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 95847b5a487b..ef0e9a85c359 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: cx88-dvb.c,v 1.52 2005/07/24 22:12:47 mkrufky Exp $ | 2 | * $Id: cx88-dvb.c,v 1.54 2005/07/25 05:13:50 mkrufky Exp $ |
3 | * | 3 | * |
4 | * device driver for Conexant 2388x based TV cards | 4 | * device driver for Conexant 2388x based TV cards |
5 | * MPEG Transport Stream (DVB) routines | 5 | * MPEG Transport Stream (DVB) routines |
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/suspend.h> | 31 | #include <linux/suspend.h> |
32 | #include <linux/config.h> | 32 | #include <linux/config.h> |
33 | 33 | ||
34 | |||
35 | #include "cx88.h" | 34 | #include "cx88.h" |
36 | #include "dvb-pll.h" | 35 | #include "dvb-pll.h" |
37 | 36 | ||
@@ -45,8 +44,8 @@ | |||
45 | #ifdef HAVE_OR51132 | 44 | #ifdef HAVE_OR51132 |
46 | # include "or51132.h" | 45 | # include "or51132.h" |
47 | #endif | 46 | #endif |
48 | #ifdef HAVE_LGDT3302 | 47 | #ifdef HAVE_LGDT330X |
49 | # include "lgdt3302.h" | 48 | # include "lgdt330x.h" |
50 | #endif | 49 | #endif |
51 | 50 | ||
52 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 51 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
@@ -207,8 +206,8 @@ static struct or51132_config pchdtv_hd3000 = { | |||
207 | }; | 206 | }; |
208 | #endif | 207 | #endif |
209 | 208 | ||
210 | #ifdef HAVE_LGDT3302 | 209 | #ifdef HAVE_LGDT330X |
211 | static int lgdt3302_pll_set(struct dvb_frontend* fe, | 210 | static int lgdt330x_pll_set(struct dvb_frontend* fe, |
212 | struct dvb_frontend_parameters* params, | 211 | struct dvb_frontend_parameters* params, |
213 | u8* pllbuf) | 212 | u8* pllbuf) |
214 | { | 213 | { |
@@ -220,7 +219,7 @@ static int lgdt3302_pll_set(struct dvb_frontend* fe, | |||
220 | return 0; | 219 | return 0; |
221 | } | 220 | } |
222 | 221 | ||
223 | static int lgdt3302_pll_rf_set(struct dvb_frontend* fe, int index) | 222 | static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) |
224 | { | 223 | { |
225 | struct cx8802_dev *dev= fe->dvb->priv; | 224 | struct cx8802_dev *dev= fe->dvb->priv; |
226 | struct cx88_core *core = dev->core; | 225 | struct cx88_core *core = dev->core; |
@@ -233,7 +232,7 @@ static int lgdt3302_pll_rf_set(struct dvb_frontend* fe, int index) | |||
233 | return 0; | 232 | return 0; |
234 | } | 233 | } |
235 | 234 | ||
236 | static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | 235 | static int lgdt330x_set_ts_param(struct dvb_frontend* fe, int is_punctured) |
237 | { | 236 | { |
238 | struct cx8802_dev *dev= fe->dvb->priv; | 237 | struct cx8802_dev *dev= fe->dvb->priv; |
239 | if (is_punctured) | 238 | if (is_punctured) |
@@ -243,10 +242,10 @@ static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured) | |||
243 | return 0; | 242 | return 0; |
244 | } | 243 | } |
245 | 244 | ||
246 | static struct lgdt3302_config fusionhdtv_3_gold = { | 245 | static struct lgdt330x_config fusionhdtv_3_gold = { |
247 | .demod_address = 0x0e, | 246 | .demod_address = 0x0e, |
248 | .pll_set = lgdt3302_pll_set, | 247 | .pll_set = lgdt330x_pll_set, |
249 | .set_ts_params = lgdt3302_set_ts_param, | 248 | .set_ts_params = lgdt330x_set_ts_param, |
250 | }; | 249 | }; |
251 | #endif | 250 | #endif |
252 | 251 | ||
@@ -297,7 +296,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
297 | &dev->core->i2c_adap); | 296 | &dev->core->i2c_adap); |
298 | break; | 297 | break; |
299 | #endif | 298 | #endif |
300 | #ifdef HAVE_LGDT3302 | 299 | #ifdef HAVE_LGDT330X |
301 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: | 300 | case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: |
302 | dev->ts_gen_cntrl = 0x08; | 301 | dev->ts_gen_cntrl = 0x08; |
303 | { | 302 | { |
@@ -310,10 +309,10 @@ static int dvb_register(struct cx8802_dev *dev) | |||
310 | mdelay(200); | 309 | mdelay(200); |
311 | 310 | ||
312 | /* Select RF connector callback */ | 311 | /* Select RF connector callback */ |
313 | fusionhdtv_3_gold.pll_rf_set = lgdt3302_pll_rf_set; | 312 | fusionhdtv_3_gold.pll_rf_set = lgdt330x_pll_rf_set; |
314 | dev->core->pll_addr = 0x61; | 313 | dev->core->pll_addr = 0x61; |
315 | dev->core->pll_desc = &dvb_pll_microtune_4042; | 314 | dev->core->pll_desc = &dvb_pll_microtune_4042; |
316 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold, | 315 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, |
317 | &dev->core->i2c_adap); | 316 | &dev->core->i2c_adap); |
318 | } | 317 | } |
319 | break; | 318 | break; |
@@ -329,7 +328,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
329 | mdelay(200); | 328 | mdelay(200); |
330 | dev->core->pll_addr = 0x61; | 329 | dev->core->pll_addr = 0x61; |
331 | dev->core->pll_desc = &dvb_pll_thomson_dtt7611; | 330 | dev->core->pll_desc = &dvb_pll_thomson_dtt7611; |
332 | dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold, | 331 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, |
333 | &dev->core->i2c_adap); | 332 | &dev->core->i2c_adap); |
334 | } | 333 | } |
335 | break; | 334 | break; |
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 8403c4e95050..a628a55299c6 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | $Id: cx88-i2c.c,v 1.28 2005/07/05 17:37:35 nsh Exp $ | 2 | $Id: cx88-i2c.c,v 1.30 2005/07/25 05:10:13 mkrufky Exp $ |
3 | 3 | ||
4 | cx88-i2c.c -- all the i2c code is here | 4 | cx88-i2c.c -- all the i2c code is here |
5 | 5 | ||
@@ -164,7 +164,7 @@ static struct i2c_client cx8800_i2c_client_template = { | |||
164 | }; | 164 | }; |
165 | 165 | ||
166 | static char *i2c_devs[128] = { | 166 | static char *i2c_devs[128] = { |
167 | [ 0x1c >> 1 ] = "lgdt3302", | 167 | [ 0x1c >> 1 ] = "lgdt330x", |
168 | [ 0x86 >> 1 ] = "tda9887/cx22702", | 168 | [ 0x86 >> 1 ] = "tda9887/cx22702", |
169 | [ 0xa0 >> 1 ] = "eeprom", | 169 | [ 0xa0 >> 1 ] = "eeprom", |
170 | [ 0xc0 >> 1 ] = "tuner (analog)", | 170 | [ 0xc0 >> 1 ] = "tuner (analog)", |