]> git.baikalelectronics.ru Git - kernel.git/commit
[media] r820t: fix imr calibration
authorGianluca Gennari <gennarone@gmail.com>
Mon, 17 Jun 2013 23:32:45 +0000 (20:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Jun 2013 14:07:53 +0000 (11:07 -0300)
commitcf7bd02865ec0c8a95195240fdc15f36a4bb9be0
treec879a7276248de621098e9d5122d4b0a4371d6b3
parent913ec4d045c76cc2c548c39981bed552e705f7fb
[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>
drivers/media/tuners/r820t.c