aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvp514x.c
diff options
context:
space:
mode:
authorVaibhav Hiremath <hvaibhav@ti.com>2010-03-27 09:37:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:52:47 -0300
commit63b59cecb2fa0a274d1c7240112460816d826988 (patch)
tree8da2f8f4f99674ffc9d0eb2fb08e22a438588dda /drivers/media/video/tvp514x.c
parent844cc0dcb588ee7005c70cffd92ee7a0c1270729 (diff)
downloadkernel_samsung_smdk4412-63b59cecb2fa0a274d1c7240112460816d826988.zip
kernel_samsung_smdk4412-63b59cecb2fa0a274d1c7240112460816d826988.tar.gz
kernel_samsung_smdk4412-63b59cecb2fa0a274d1c7240112460816d826988.tar.bz2
V4L/DVB: V4L: tvp514x: Add Powerup sequence during s_input to lock the signal properly
For the sequence streamon -> streamoff and again s_input, it fails to lock the signal, since streamoff puts TVP514x into power off state which leads to failure in sub-sequent s_input. So add powerup sequence in s_routing (if disabled), since it is important to lock the signal at this stage. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvp514x.c')
-rw-r--r--drivers/media/video/tvp514x.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c
index e4815a1..e826114 100644
--- a/drivers/media/video/tvp514x.c
+++ b/drivers/media/video/tvp514x.c
@@ -79,6 +79,8 @@ struct tvp514x_std_info {
};
static struct tvp514x_reg tvp514x_reg_list_default[0x40];
+
+static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable);
/**
* struct tvp514x_decoder - TVP5146/47 decoder object
* @sd: Subdevice Slave handle
@@ -644,6 +646,17 @@ static int tvp514x_s_routing(struct v4l2_subdev *sd,
/* Index out of bound */
return -EINVAL;
+ /*
+ * For the sequence streamon -> streamoff and again s_input
+ * it fails to lock the signal, since streamoff puts TVP514x
+ * into power off state which leads to failure in sub-sequent s_input.
+ *
+ * So power up the TVP514x device here, since it is important to lock
+ * the signal at this stage.
+ */
+ if (!decoder->streaming)
+ tvp514x_s_stream(sd, 1);
+
input_sel = input;
output_sel = output;