summaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorJose Alberto Reguero <jareguero@telefonica.net>2011-07-16 08:38:13 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-08-07 09:32:16 -0300
commit2d84ca215f6d67f9ba7b3d4ab32265e085229662 (patch)
treee1124d71b3d53c164dc591d09cca86013587d810 /drivers/media/common
parentd1520c58eb84ad1ec973a257cd835c948215aab5 (diff)
downloadlinux-stable-2d84ca215f6d67f9ba7b3d4ab32265e085229662.tar.gz
linux-stable-2d84ca215f6d67f9ba7b3d4ab32265e085229662.tar.bz2
linux-stable-2d84ca215f6d67f9ba7b3d4ab32265e085229662.zip
[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: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/tda827x.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c
index b21b6ea68b25..e0d5b43772b8 100644
--- a/drivers/media/common/tuners/tda827x.c
+++ b/drivers/media/common/tuners/tda827x.c
@@ -176,7 +176,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
if_freq = 5000000;
break;
}
- tuner_freq = params->frequency + if_freq;
+ tuner_freq = params->frequency;
i = 0;
while (tda827x_table[i].lomax < tuner_freq) {
@@ -185,6 +185,8 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
i++;
}
+ tuner_freq += if_freq;
+
N = ((tuner_freq + 125000) / 250000) << (tda827x_table[i].spd + 2);
buf[0] = 0;
buf[1] = (N>>8) | 0x40;
@@ -540,7 +542,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
if_freq = 5000000;
break;
}
- tuner_freq = params->frequency + if_freq;
+ tuner_freq = params->frequency;
if (fe->ops.info.type == FE_QAM) {
dprintk("%s select tda827xa_dvbc\n", __func__);
@@ -554,6 +556,8 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
i++;
}
+ tuner_freq += if_freq;
+
N = ((tuner_freq + 31250) / 62500) << frequency_map[i].spd;
buf[0] = 0; // subaddress
buf[1] = N >> 8;