linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] [media] tuner-core: call has_signal for both TV and radio
@ 2012-07-05 14:16 Mauro Carvalho Chehab
  2012-07-05 14:16 ` [PATCH 2/3] [media] tuner-xc2028: Fix signal strength report Mauro Carvalho Chehab
  2012-07-05 14:16 ` [PATCH 3/3] [media] tuner, xc2028: add support for get_afc() Mauro Carvalho Chehab
  0 siblings, 2 replies; 13+ messages in thread
From: Mauro Carvalho Chehab @ 2012-07-05 14:16 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List

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>
---
 drivers/media/video/tuner-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 1ad5ab6..98adeee 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;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-08-06 20:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-05 14:16 [PATCH 1/3] [media] tuner-core: call has_signal for both TV and radio Mauro Carvalho Chehab
2012-07-05 14:16 ` [PATCH 2/3] [media] tuner-xc2028: Fix signal strength report Mauro Carvalho Chehab
2012-07-05 14:25   ` Devin Heitmueller
2012-07-05 14:31     ` Devin Heitmueller
2012-07-05 15:40       ` Mauro Carvalho Chehab
2012-07-05 14:16 ` [PATCH 3/3] [media] tuner, xc2028: add support for get_afc() Mauro Carvalho Chehab
2012-07-05 15:05   ` Antti Palosaari
2012-07-05 17:37     ` Bert Massop
2012-07-05 20:10       ` Mauro Carvalho Chehab
2012-07-07 10:46         ` Antti Palosaari
2012-08-06 20:10           ` Antti Palosaari
2012-08-06 20:41             ` Mauro Carvalho Chehab
2012-08-06 20:37         ` Manu Abraham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).