[media] msi3101: improve tuner synth calc step size
authorAntti Palosaari <crope@iki.fi>
Sat, 3 Aug 2013 00:49:49 +0000 (21:49 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 20 Aug 2013 19:04:50 +0000 (16:04 -0300)
commit23df427e3333882beea2e65d27fd2a581e37fae4
treed9dde0746899c8dd9db50ccf451694eca5544a9d
parent22ca680e02aceb88d939b1eb1bbe3e94b71bf555
[media] msi3101: improve tuner synth calc step size

Allow stepless synthesizer configuration. With that change we lose
precision a little bit, as it is now between +-500Hz from the target.
It could be better but on that case calculation algorithm goes more
complex and atm there is more important things to do.
Two approach to improve which comes to my mind are:
1) select and use biggest suitable step
2) use greatest common divisor algo to find divisor for thresh & frac
when possible to avoid rounding errors, which is root of cause of
current +-500Hz inaccuracy.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/msi3101/sdr-msi3101.c