diff options
author | Manu Abraham <manu@linuxtv.org> | 2008-01-18 23:06:18 +0400 |
---|---|---|
committer | Manu Abraham <manu@linuxtv.org> | 2008-01-18 23:06:18 +0400 |
commit | ea19b3dbcf91a0523f0247eecf60954a032b55fc (patch) | |
tree | e4c7ea6462b45368073da1a2414ab2c3e10a098c /linux | |
parent | e60074d344e06a54b1808d50ead56c3af27c26ac (diff) | |
download | mediapointer-dvb-s2-ea19b3dbcf91a0523f0247eecf60954a032b55fc.tar.gz mediapointer-dvb-s2-ea19b3dbcf91a0523f0247eecf60954a032b55fc.tar.bz2 |
Bug: Bandwidth calculation at upper and lower boundaries
From: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stb6100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb6100.c b/linux/drivers/media/dvb/frontends/stb6100.c index 01424eee8..90af9000d 100644 --- a/linux/drivers/media/dvb/frontends/stb6100.c +++ b/linux/drivers/media/dvb/frontends/stb6100.c @@ -267,13 +267,13 @@ static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth) int rc; struct stb6100_state *state = fe->tuner_priv; - dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u kHz", bandwidth); + dprintk(verbose, FE_DEBUG, 1, "set bandwidth to %u Hz", bandwidth); bandwidth /= 2; /* ZIF */ - if (bandwidth > 36000000) /* F[4:0] BW/2 max =31+5=36 mhz for F=31 */ + if (bandwidth >= 36000000) /* F[4:0] BW/2 max =31+5=36 mhz for F=31 */ tmp = 31; - if (bandwidth < 5000000) /* bw/2 min = 5Mhz for F=0 */ + else if (bandwidth <= 5000000) /* bw/2 min = 5Mhz for F=0 */ tmp = 0; else /* if 5 < bw/2 < 36 */ tmp = bandwidth / 1000000 - 5; |