media: dvb-pll: fix tuner frequency ranges
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 20 Nov 2018 10:19:36 +0000 (05:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:17 +0000 (09:16 +0100)
commitd7db760650414f857fd7618c0f39596d305da875
treed1c0ce94343104b070d073bbe7e657c75c79c080
parent663bfc44d1a0ac440dd0d94ec7aa94a4c690f233
media: dvb-pll: fix tuner frequency ranges

commit 3d8e450f517cdb33da77827ec75929354753e9c0 upstream.

Tuners should report frequencies in Hz. That works fine on most
drivers, but, in the case of dvb-pll, some settings are for
satellite tuners, while others are for terrestrial/cable ones.

The code was trying to solve it at probing time, but that doesn't
work, as, when _attach is called, the delivery system may be wrong.

Fix it by ensuring that all frequencies are in Hz at the per-tuner
max/min values.

While here, add a debug message, as this would help to debug any
issues there.

It partially fixes the following bug:
  https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")
Reported-by: Stakanov Schufter <stakanov@eclipso.eu>
Reported-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@vger.kernel.org # For 4.19
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-frontends/dvb-pll.c