git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
media
/
dvb
/
frontends
/
lgdt330x.c
diff --git
a/drivers/media/dvb/frontends/lgdt330x.c
b/drivers/media/dvb/frontends/lgdt330x.c
index
467f199
..
8de081b
100644
(file)
--- a/
drivers/media/dvb/frontends/lgdt330x.c
+++ b/
drivers/media/dvb/frontends/lgdt330x.c
@@
-29,7
+29,6
@@
* DViCO FusionHDTV 5 Lite
* DViCO FusionHDTV 5 USB Gold
* Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
* DViCO FusionHDTV 5 Lite
* DViCO FusionHDTV 5 USB Gold
* Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
- * pcHDTV HD5500
*
* TODO:
* signal strength always returns 0.
*
* TODO:
* signal strength always returns 0.
@@
-60,6
+59,7
@@
if (debug) printk(KERN_DEBUG "lgdt330x: " args); \
struct lgdt330x_state
{
struct i2c_adapter* i2c;
struct lgdt330x_state
{
struct i2c_adapter* i2c;
+ struct dvb_frontend_ops ops;
/* Configuration settings */
const struct lgdt330x_config* config;
/* Configuration settings */
const struct lgdt330x_config* config;
@@
-216,7
+216,7
@@
static int lgdt330x_init(struct dvb_frontend* fe)
AGC_DELAY0, 0x07,
AGC_DELAY2, 0xfe,
/* Change the value of IAGCBW[15:8]
AGC_DELAY0, 0x07,
AGC_DELAY2, 0xfe,
/* Change the value of IAGCBW[15:8]
- of inner AGC loop filter bandwi
d
th */
+ of inner AGC loop filter bandwith */
AGC_LOOP_BANDWIDTH0, 0x08,
AGC_LOOP_BANDWIDTH1, 0x9a
};
AGC_LOOP_BANDWIDTH0, 0x08,
AGC_LOOP_BANDWIDTH1, 0x9a
};
@@
-399,10
+399,8
@@
static int lgdt330x_set_parameters(struct dvb_frontend* fe,
}
/* Tune to the specified frequency */
}
/* Tune to the specified frequency */
- if (fe->ops.tuner_ops.set_params) {
- fe->ops.tuner_ops.set_params(fe, param);
- if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
- }
+ if (state->config->pll_set)
+ state->config->pll_set(fe, param);
/* Keep track of the new frequency */
/* FIXME this is the wrong way to do this... */
/* Keep track of the new frequency */
/* FIXME this is the wrong way to do this... */
@@
-668,7
+666,6
@@
static int lgdt3303_read_snr(struct dvb_frontend* fe, u16* snr)
if (state->current_modulation == VSB_8) {
if (state->current_modulation == VSB_8) {
- i2c_read_demod_bytes(state, 0x6e, buf, 5);
/* Phase Tracker Mean-Square Error Register for VSB */
noise = ((buf[0] & 7) << 16) | (buf[3] << 8) | buf[4];
} else {
/* Phase Tracker Mean-Square Error Register for VSB */
noise = ((buf[0] & 7) << 16) | (buf[3] << 8) | buf[4];
} else {
@@
-718,19
+715,16
@@
struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config,
/* Setup the state */
state->config = config;
state->i2c = i2c;
/* Setup the state */
state->config = config;
state->i2c = i2c;
-
- /* Create dvb_frontend */
switch (config->demod_chip) {
case LGDT3302:
switch (config->demod_chip) {
case LGDT3302:
- memcpy(&state->
frontend.
ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops));
+ memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops));
break;
case LGDT3303:
break;
case LGDT3303:
- memcpy(&state->
frontend.
ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops));
+ memcpy(&state->ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops));
break;
default:
goto error;
}
break;
default:
goto error;
}
- state->frontend.demodulator_priv = state;
/* Verify communication with demod chip */
if (i2c_read_demod_bytes(state, 2, buf, 1))
/* Verify communication with demod chip */
if (i2c_read_demod_bytes(state, 2, buf, 1))
@@
-739,6
+733,9
@@
struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config,
state->current_frequency = -1;
state->current_modulation = -1;
state->current_frequency = -1;
state->current_modulation = -1;
+ /* Create dvb_frontend */
+ state->frontend.ops = &state->ops;
+ state->frontend.demodulator_priv = state;
return &state->frontend;
error:
return &state->frontend;
error: