diff options
author | Gianluca Gennari <gennarone@gmail.com> | 2013-06-17 19:32:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-19 10:07:53 -0400 |
commit | bbf94616261e080507e43b07eea0d633462b00dc (patch) | |
tree | c879a7276248de621098e9d5122d4b0a4371d6b3 /drivers/media/tuners | |
parent | 757d7ace565c06e1302ba7c9244d839455e13881 (diff) |
[media] r820t: fix imr calibration
The r820t_imr() calibration function of the Rafael Micro R820T tuner
generates this error at every tune attempt:
r820t 0-001a: No valid PLL values for 2252021 kHz!
The function was inspired by the original Realtek driver for rtl2832 devices
with the r820t tuner; anyway, in the original code the XTAL frequency of
the tuner was expressed in KHz, while in the kernel driver it is expressed
in Hz; so the calibration failed because of an out-of-range initial value.
The final result of the computation is then passed to the r820t_set_mux()
and r820t_set_pll() functions, but the conversion from KHz to Hz is already
correctly implemented.
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r-- | drivers/media/tuners/r820t.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 0a5f96be08f1..1c23666468cf 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c | |||
@@ -1857,9 +1857,9 @@ static int r820t_imr(struct r820t_priv *priv, unsigned imr_mem, bool im_flag) | |||
1857 | int reg18, reg19, reg1f; | 1857 | int reg18, reg19, reg1f; |
1858 | 1858 | ||
1859 | if (priv->cfg->xtal > 24000000) | 1859 | if (priv->cfg->xtal > 24000000) |
1860 | ring_ref = priv->cfg->xtal / 2; | 1860 | ring_ref = priv->cfg->xtal / 2000; |
1861 | else | 1861 | else |
1862 | ring_ref = priv->cfg->xtal; | 1862 | ring_ref = priv->cfg->xtal / 1000; |
1863 | 1863 | ||
1864 | n_ring = 15; | 1864 | n_ring = 15; |
1865 | for (n = 0; n < 16; n++) { | 1865 | for (n = 0; n < 16; n++) { |