media: xc4000: Fix get_frequency()
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 21 Jul 2014 16:28:15 +0000 (13:28 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2014 16:03:57 +0000 (09:03 -0700)
commitd2b8c8c9e5ea79818a1496f8838ea1c7020ec34f
tree9fd2e45387d1d3f15f08520df2c5ce88da83ab8a
parentce1c89d450af950db7d381df8ba8025736a44c8b
media: xc4000: Fix get_frequency()

commit 4c07e32884ab69574cfd9eb4de3334233c938071 upstream.

The programmed frequency on xc4000 is not the middle
frequency, but the initial frequency on the bandwidth range.
However, the DVB API works with the middle frequency.

This works fine on set_frontend, as the device calculates
the needed offset. However, at get_frequency(), the returned
value is the initial frequency. That's generally not a big
problem on most drivers, however, starting with changeset
6fe1099c7aec, the frequency drift is taken into account at
dib7000p driver.

This broke support for PCTV 340e, with uses dib7000p demod and
xc4000 tuner.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/tuners/xc4000.c