diff options
author | Reinhard Nissl <rnissl@gmx.de> | 2008-01-18 20:06:18 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 20:53:21 +0100 |
commit | 89693b7d7bd965c18e9ce1c68eef2b52f9c2b745 (patch) | |
tree | f43b35dd4eb5d8088251c15b3b3322e8ffbcca75 | |
parent | V4L/DVB (9444): Initialize post process events to NULL (diff) | |
download | linux-89693b7d7bd965c18e9ce1c68eef2b52f9c2b745.tar.xz linux-89693b7d7bd965c18e9ce1c68eef2b52f9c2b745.zip |
V4L/DVB (9445): Bug: Bandwidth calculation at upper and lower boundaries
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>
-rw-r--r-- | drivers/media/dvb/frontends/stb6100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index f4c2b8e114bf..0259a4689507 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/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; |