diff options
author | Reinhard Nissl <rnissl@gmx.de> | 2008-07-09 14:38:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:24 -0500 |
commit | 9bb17eee39d862611d2f34d5c611661b3dfd2e54 (patch) | |
tree | fb69de0d1a60f5769a76fa7a6d9e715db81d1a7f /drivers/media/dvb | |
parent | c615a27a533b6f6de6143d4d58cfa0abfdb6970d (diff) |
V4L/DVB (9468): Miscellaneous fixes
- Fix a bitfield
- Set gain appropriately
- Slept for the wrong duration
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_reg.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb6100.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/stb0899_reg.h b/drivers/media/dvb/frontends/stb0899_reg.h index 4e5b2415847f..ba1ed56304a0 100644 --- a/drivers/media/dvb/frontends/stb0899_reg.h +++ b/drivers/media/dvb/frontends/stb0899_reg.h | |||
@@ -362,7 +362,7 @@ | |||
362 | 362 | ||
363 | #define STB0899_OFF0_CRL_FREQ 0xf304 | 363 | #define STB0899_OFF0_CRL_FREQ 0xf304 |
364 | #define STB0899_BASE_CRL_FREQ 0x00000000 | 364 | #define STB0899_BASE_CRL_FREQ 0x00000000 |
365 | #define STB0899_CARR_FREQ (0x1fffffff << 0) | 365 | #define STB0899_CARR_FREQ (0x3fffffff << 0) |
366 | #define STB0899_OFFST_CARR_FREQ 0 | 366 | #define STB0899_OFFST_CARR_FREQ 0 |
367 | #define STB0899_WIDTH_CARR_FREQ 30 | 367 | #define STB0899_WIDTH_CARR_FREQ 30 |
368 | 368 | ||
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index f404a4d0fb17..083d6b627189 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c | |||
@@ -338,11 +338,11 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) | |||
338 | 338 | ||
339 | /* Baseband gain. */ | 339 | /* Baseband gain. */ |
340 | if (srate >= 15000000) | 340 | if (srate >= 15000000) |
341 | g = 8; | 341 | g = 9; // +4 dB |
342 | else if (state->srate >= 5000000) | 342 | else if (srate >= 5000000) |
343 | g = 12; | 343 | g = 11; // +8 dB |
344 | else | 344 | else |
345 | g = 14; | 345 | g = 14; // +14 dB |
346 | 346 | ||
347 | regs[STB6100_G] = (regs[STB6100_G] & ~STB6100_G_G) | g; | 347 | regs[STB6100_G] = (regs[STB6100_G] & ~STB6100_G_G) | g; |
348 | regs[STB6100_G] &= ~STB6100_G_GCT; /* mask GCT */ | 348 | regs[STB6100_G] &= ~STB6100_G_GCT; /* mask GCT */ |
@@ -403,7 +403,7 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency) | |||
403 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) | 403 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) |
404 | return rc; | 404 | return rc; |
405 | 405 | ||
406 | msleep(5); /* wait for LO to lock */ | 406 | msleep(10); /* wait for LO to lock */ |
407 | regs[STB6100_VCO] &= ~STB6100_VCO_OSCH; /* vco search disabled */ | 407 | regs[STB6100_VCO] &= ~STB6100_VCO_OSCH; /* vco search disabled */ |
408 | regs[STB6100_VCO] |= STB6100_VCO_OCK; /* search clock off */ | 408 | regs[STB6100_VCO] |= STB6100_VCO_OCK; /* search clock off */ |
409 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) | 409 | if ((rc = stb6100_write_reg(state, STB6100_VCO, regs[STB6100_VCO])) < 0) |