Commit 2d84ca21 authored by Jose Alberto Reguero's avatar Jose Alberto Reguero Committed by Mauro Carvalho Chehab

[media] tda827x: improve recection with limit frequencies

tda827x is currently taking the demod IF frequency into account while
seeking for the proper tuner range. This is wrong, as the demod IF
frequency has nothing to do with the tuner PLL.
Signed-off-by: default avatarJose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d1520c58
...@@ -176,7 +176,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe, ...@@ -176,7 +176,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
if_freq = 5000000; if_freq = 5000000;
break; break;
} }
tuner_freq = params->frequency + if_freq; tuner_freq = params->frequency;
i = 0; i = 0;
while (tda827x_table[i].lomax < tuner_freq) { while (tda827x_table[i].lomax < tuner_freq) {
...@@ -185,6 +185,8 @@ static int tda827xo_set_params(struct dvb_frontend *fe, ...@@ -185,6 +185,8 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
i++; i++;
} }
tuner_freq += if_freq;
N = ((tuner_freq + 125000) / 250000) << (tda827x_table[i].spd + 2); N = ((tuner_freq + 125000) / 250000) << (tda827x_table[i].spd + 2);
buf[0] = 0; buf[0] = 0;
buf[1] = (N>>8) | 0x40; buf[1] = (N>>8) | 0x40;
...@@ -540,7 +542,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe, ...@@ -540,7 +542,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
if_freq = 5000000; if_freq = 5000000;
break; break;
} }
tuner_freq = params->frequency + if_freq; tuner_freq = params->frequency;
if (fe->ops.info.type == FE_QAM) { if (fe->ops.info.type == FE_QAM) {
dprintk("%s select tda827xa_dvbc\n", __func__); dprintk("%s select tda827xa_dvbc\n", __func__);
...@@ -554,6 +556,8 @@ static int tda827xa_set_params(struct dvb_frontend *fe, ...@@ -554,6 +556,8 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
i++; i++;
} }
tuner_freq += if_freq;
N = ((tuner_freq + 31250) / 62500) << frequency_map[i].spd; N = ((tuner_freq + 31250) / 62500) << frequency_map[i].spd;
buf[0] = 0; // subaddress buf[0] = 0; // subaddress
buf[1] = N >> 8; buf[1] = N >> 8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment