]> git.baikalelectronics.ru Git - kernel.git/commit
[media] tuner-core: don't set has_signal/get_afc if not supported
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 25 Mar 2013 11:14:13 +0000 (08:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 25 Mar 2013 18:10:39 +0000 (15:10 -0300)
commit9968cdce507cda20d4d956e134d3f6ba9f6dff40
treea8202276ccf1cdff2feb30dd79809597d0542c9f
parentead7883ae25f36c276d6c416647b1fdf7dd47551
[media] tuner-core: don't set has_signal/get_afc if not supported

If the tuner frontend does not support get_rf_strength, then don't set
the has_signal callback. Ditto for get_afc.
Both callbacks overwrite the signal and afc fields of struct v4l2_tuner
but that should only happen if the tuner can actually detect this. If
it can't, then it should leave those fields alone so other subdevices
can try and detect the signal/afc.
This fixes the bug where the au8522 detected a signal and then tuner-core
overwrote it with 0 since the xc5000 tuner does not support get_rf_strength.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/tuner-core.c