From patchwork Fri Mar 19 06:04:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hiremath, Vaibhav" X-Patchwork-Id: 2964 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 19 Mar 2010 06:04:30 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Fri, 19 Mar 2010 08:09:14 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NsVJu-0005P1-3C; Fri, 19 Mar 2010 06:04:30 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751321Ab0CSGE1 (ORCPT + 1 other); Fri, 19 Mar 2010 02:04:27 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:38149 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330Ab0CSGEX (ORCPT ); Fri, 19 Mar 2010 02:04:23 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2J64Kom003963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Mar 2010 01:04:22 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o2J64DiV000809; Fri, 19 Mar 2010 11:34:16 +0530 (IST) From: hvaibhav@ti.com To: linux-media@vger.kernel.org Cc: m-karicheri2@ti.com, Vaibhav Hiremath , Sudhakar Rajashekhara Subject: [PATCH-V2 7/7] TVP514x: Add Powerup sequence during s_input to lock the signal properly Date: Fri, 19 Mar 2010 11:34:13 +0530 Message-Id: <1268978653-32710-8-git-send-email-hvaibhav@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Vaibhav Hiremath 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 Signed-off-by: Sudhakar Rajashekhara --- drivers/media/video/tvp514x.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index 26b4e71..97b7db5 100644 --- a/drivers/media/video/tvp514x.c +++ b/drivers/media/video/tvp514x.c @@ -78,6 +78,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 @@ -643,6 +645,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;