提交 89693b7d 编写于 作者: R Reinhard Nissl 提交者: Mauro Carvalho Chehab

V4L/DVB (9445): Bug: Bandwidth calculation at upper and lower boundaries

Signed-off-by: NReinhard Nissl <rnissl@gmx.de>
Signed-off-by: NManu Abraham <manu@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 043a68b3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册