From: Hans Verkuil Date: Thu, 20 Sep 2012 12:06:33 +0000 (-0300) Subject: upstream: [media] tvp514x: s_routing should just change routing, not try to detect... X-Git-Tag: submit/tizen/20141121.110247~935 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52a309526205eacab3e0856244612ca8b9ba4aa7;p=platform%2Fkernel%2Flinux-3.10.git 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 --- 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) {