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: Vaibhav Hiremath X-Patchwork-Id: 86882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2J64Ug9000865 for ; Fri, 19 Mar 2010 06:04:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751321Ab0CSGE1 (ORCPT ); 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 19 Mar 2010 06:04:31 +0000 (UTC) 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;