aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-07-04 00:54:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-04 00:54:31 -0400
commit030755bde42bbed133182b0ece7c7a9c759478e8 (patch)
treec0f3fb2ba251eddd745093b605d910a0b5e3f2c8
parent61a96113de51e1f8f43ac98cbeadb54e60045905 (diff)
[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>
-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)
1178 return 0; 1178 return 0;
1179 if (vt->type == t->mode && analog_ops->get_afc) 1179 if (vt->type == t->mode && analog_ops->get_afc)
1180 vt->afc = analog_ops->get_afc(&t->fe); 1180 vt->afc = analog_ops->get_afc(&t->fe);
1181 if (analog_ops->has_signal)
1182 vt->signal = analog_ops->has_signal(&t->fe);
1181 if (vt->type != V4L2_TUNER_RADIO) { 1183 if (vt->type != V4L2_TUNER_RADIO) {
1182 vt->capability |= V4L2_TUNER_CAP_NORM; 1184 vt->capability |= V4L2_TUNER_CAP_NORM;
1183 vt->rangelow = tv_range[0] * 16; 1185 vt->rangelow = tv_range[0] * 16;
@@ -1197,8 +1199,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
1197 V4L2_TUNER_SUB_STEREO : 1199 V4L2_TUNER_SUB_STEREO :
1198 V4L2_TUNER_SUB_MONO; 1200 V4L2_TUNER_SUB_MONO;
1199 } 1201 }
1200 if (analog_ops->has_signal)
1201 vt->signal = analog_ops->has_signal(&t->fe);
1202 vt->audmode = t->audmode; 1202 vt->audmode = t->audmode;
1203 } 1203 }
1204 vt->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO; 1204 vt->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;