media: vidtv: fix frequency tuning logic
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 12 Sep 2020 18:50:34 +0000 (20:50 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 14 Sep 2020 13:49:08 +0000 (15:49 +0200)
commitf3ea9da24bc98cbeff84a3bf54ed4072a0f3774e
treeb718c6823c0112952f53475711ad7f087727ee42
parent870e350d4e3927d9425d27ba37a4344e99a105c2
media: vidtv: fix frequency tuning logic

Right now, there are some issues at the tuning logic:

1) the config struct is not copied at the tuner driver.
   so, it won't use any frequency table at all;
2) the code that checks for frequency shifts is called
   at set_params. So, lock_status will never be zeroed;
3) the signal strength will also report a strong
   signal, even if not tuned;
4) the logic is not excluding non-set frequencies.

Fix those issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test-drivers/vidtv/vidtv_tuner.c