From 52a309526205eacab3e0856244612ca8b9ba4aa7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 20 Sep 2012 09:06:33 -0300 Subject: [PATCH] upstream: [media] tvp514x: s_routing should just change routing, not try to detect a signal The s_routing function should not try to detect a signal. It is a really bad idea to try to detect a valid video signal and return an error if you can't. Changing input should do just that and nothing more. Also don't power on the ADCs on s_routing, instead do that on querystd. Signed-off-by: Hans Verkuil Acked-by: Lad, Prabhakar Tested-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/tvp514x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index 83d85df..774a54b 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -553,6 +553,12 @@ static int tvp514x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id) msleep(LOCK_RETRY_DELAY); } + /* To query the standard the TVP514x must power on the ADCs. */ + if (!decoder->streaming) { + tvp514x_s_stream(sd, 1); + msleep(LOCK_RETRY_DELAY); + } + /* query the current standard */ current_std = tvp514x_query_current_std(sd); if (current_std == STD_INVALID) { -- 2.7.4