Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 030755bd authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[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: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 61a96113
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1178,6 +1178,8 @@ 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 (analog_ops->has_signal)
		vt->signal = analog_ops->has_signal(&t->fe);
	if (vt->type != 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;
@@ -1197,8 +1199,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
				V4L2_TUNER_SUB_STEREO :
				V4L2_TUNER_SUB_STEREO :
				V4L2_TUNER_SUB_MONO;
				V4L2_TUNER_SUB_MONO;
		}
		}
		if (analog_ops->has_signal)
			vt->signal = analog_ops->has_signal(&t->fe);
		vt->audmode = t->audmode;
		vt->audmode = t->audmode;
	}
	}
	vt->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
	vt->capability |= V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;