Commit c44ff8fa authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] tuner-core: return the frequency range of the correct tuner

The frequency range of the current tuner (radio or TV) was returned
instead of the frequency range of the requested tuner (which depends
on the device node).

This bug caused the frequency range of the radio tuner to be returned
when G_TUNER was called on a video node.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a5ee6e41
...@@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) ...@@ -1178,7 +1178,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
return 0; return 0;
if (vt->type == t->mode && analog_ops->get_afc) if (vt->type == t->mode && analog_ops->get_afc)
vt->afc = analog_ops->get_afc(&t->fe); vt->afc = analog_ops->get_afc(&t->fe);
if (t->mode != V4L2_TUNER_RADIO) { if (vt->type != V4L2_TUNER_RADIO) {
vt->capability |= V4L2_TUNER_CAP_NORM; vt->capability |= V4L2_TUNER_CAP_NORM;
vt->rangelow = tv_range[0] * 16; vt->rangelow = tv_range[0] * 16;
vt->rangehigh = tv_range[1] * 16; vt->rangehigh = tv_range[1] * 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment