upstream: [media] tvp514x: s_routing should just change routing, not try to detect...
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 20 Sep 2012 12:06:33 +0000 (09:06 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:58:44 +0000 (11:58 +0900)
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 <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/i2c/tvp514x.c

index 83d85df..774a54b 100644 (file)
@@ -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) {