aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-07-04 01:54:07 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-04 01:54:31 -0300
commit030755bde42bbed133182b0ece7c7a9c759478e8 (patch)
treec0f3fb2ba251eddd745093b605d910a0b5e3f2c8 /drivers/media/video/tuner-core.c
parent[media] tuner-xc2028: use request_firmware_nowait() (diff)
downloadlinux-dev-030755bde42bbed133182b0ece7c7a9c759478e8.tar.xz
linux-dev-030755bde42bbed133182b0ece7c7a9c759478e8.zip
[media] tuner-core: call has_signal for both TV and radio
If g_tuner is called and the tuner is able to return the signal strength via has_signal(), call the tunner callback to retrieve such data for all tuner types, not only for radio ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r--drivers/media/video/tuner-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 1ad5ab6ce5cf..98adeeebb8b0 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1178,6 +1178,8 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
return 0;
if (vt->type == t->mode && analog_ops->get_afc)
vt->afc = analog_ops->get_afc(&t->fe);
+ if (analog_ops->has_signal)
+ vt->signal = analog_ops->has_signal(&t->fe);
if (vt->type != V4L2_TUNER_RADIO) {
vt->capability |= V4L2_TUNER_CAP_NORM;
vt->rangelow = tv_range[0] * 16;
@@ -1197,8 +1199,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
V4L2_TUNER_SUB_STEREO :
V4L2_TUNER_SUB_MONO;
}
- if (analog_ops->has_signal)
- vt->signal = analog_ops->has_signal(&t->fe);
vt->audmode = t->audmode;
}
vt->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;