diff options
author | Michael Krufky <mkrufky@m1k.net> | 2005-07-14 03:33:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-14 12:00:24 -0400 |
commit | 3952db66efee4f22f3c6a0fd02a1e7071556a8d6 (patch) | |
tree | 8dd07e8fb5b725d1ba8c43e9f66ad89f84093a4b | |
parent | 514fd7fd01d378a7b5584c657d9807fc28f22079 (diff) |
[PATCH] dvb: LGDT3302 QAM lock bug fix
Fix QAM lock bug. Previously, it was necessary to first scan in VSB before
attempting to get a QAM lock.
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/media/dvb/frontends/lgdt3302.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/lgdt3302.c b/drivers/media/dvb/frontends/lgdt3302.c index 2eea03d218cd..c85a2a99df42 100644 --- a/drivers/media/dvb/frontends/lgdt3302.c +++ b/drivers/media/dvb/frontends/lgdt3302.c | |||
@@ -217,13 +217,11 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
217 | static u8 demux_ctrl_cfg[] = { DEMUX_CONTROL, 0xfb }; | 217 | static u8 demux_ctrl_cfg[] = { DEMUX_CONTROL, 0xfb }; |
218 | static u8 agc_rf_cfg[] = { AGC_RF_BANDWIDTH0, 0x40, 0x93, 0x00 }; | 218 | static u8 agc_rf_cfg[] = { AGC_RF_BANDWIDTH0, 0x40, 0x93, 0x00 }; |
219 | static u8 agc_ctrl_cfg[] = { AGC_FUNC_CTRL2, 0xc6, 0x40 }; | 219 | static u8 agc_ctrl_cfg[] = { AGC_FUNC_CTRL2, 0xc6, 0x40 }; |
220 | static u8 agc_delay_cfg[] = { AGC_DELAY0, 0x00, 0x00, 0x00 }; | 220 | static u8 agc_delay_cfg[] = { AGC_DELAY0, 0x07, 0x00, 0xfe }; |
221 | static u8 agc_loop_cfg[] = { AGC_LOOP_BANDWIDTH0, 0x08, 0x9a }; | 221 | static u8 agc_loop_cfg[] = { AGC_LOOP_BANDWIDTH0, 0x08, 0x9a }; |
222 | 222 | ||
223 | /* Change only if we are actually changing the modulation */ | 223 | /* Change only if we are actually changing the modulation */ |
224 | if (state->current_modulation != param->u.vsb.modulation) { | 224 | if (state->current_modulation != param->u.vsb.modulation) { |
225 | int value; | ||
226 | |||
227 | switch(param->u.vsb.modulation) { | 225 | switch(param->u.vsb.modulation) { |
228 | case VSB_8: | 226 | case VSB_8: |
229 | dprintk("%s: VSB_8 MODE\n", __FUNCTION__); | 227 | dprintk("%s: VSB_8 MODE\n", __FUNCTION__); |
@@ -276,16 +274,8 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe, | |||
276 | recovery center frequency register */ | 274 | recovery center frequency register */ |
277 | i2c_writebytes(state, state->config->demod_address, | 275 | i2c_writebytes(state, state->config->demod_address, |
278 | vsb_freq_cfg, sizeof(vsb_freq_cfg)); | 276 | vsb_freq_cfg, sizeof(vsb_freq_cfg)); |
279 | /* Set the value of 'INLVTHD' register 0x2a/0x2c | 277 | |
280 | to value from 'IFACC' register 0x39/0x3b -1 */ | 278 | /* Set the value of 'INLVTHD' register 0x2a/0x2c to 0x7fe */ |
281 | i2c_selectreadbytes(state, AGC_RFIF_ACC0, | ||
282 | &agc_delay_cfg[1], 3); | ||
283 | value = ((agc_delay_cfg[1] & 0x0f) << 8) | agc_delay_cfg[3]; | ||
284 | value = value -1; | ||
285 | dprintk("%s IFACC -1 = 0x%03x\n", __FUNCTION__, value); | ||
286 | agc_delay_cfg[1] = (value >> 8) & 0x0f; | ||
287 | agc_delay_cfg[2] = 0x00; | ||
288 | agc_delay_cfg[3] = value & 0xff; | ||
289 | i2c_writebytes(state, state->config->demod_address, | 279 | i2c_writebytes(state, state->config->demod_address, |
290 | agc_delay_cfg, sizeof(agc_delay_cfg)); | 280 | agc_delay_cfg, sizeof(agc_delay_cfg)); |
291 | 281 | ||