From patchwork Tue Aug 7 02:47:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 1282621 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 58B6CDF288 for ; Tue, 7 Aug 2012 02:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932583Ab2HGCsM (ORCPT ); Mon, 6 Aug 2012 22:48:12 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:32810 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932566Ab2HGCsK (ORCPT ); Mon, 6 Aug 2012 22:48:10 -0400 Received: by mail-vc0-f174.google.com with SMTP id fk26so3432645vcb.19 for ; Mon, 06 Aug 2012 19:48:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=/zmEvUkYLU/kxIsb13iF8EnORRJ9CXH77Qezm7TTDho=; b=e7BE+Uami6XhWxGXJAH3U0rYcOGvIRZcAjeh/hgoBTD0K9jMcsexXLELkTlCe+WgcC a0kFk0ECJC29XcHaI65Dw7qdiXCt5Fc8R2ZpHtqGjk53/EQUUIPyLnxj1ooFaq6bnWLQ hkFscozjhTRDk2KFzMB9sBqOOA+hYWEsx7QTtvyEkYiU/hfzpjCQI8TD+/tPbLReVxoG hdyXoS0URVV1vsSD9srajY0ZC057SpjQfQV3gBkrW8gVxNenYwErHCCO5fhQc8kp833I IgMD6OuoBu4wzLlB9CTqtve8st0zf7ZFmz/kOJ1sC6Ap6KZJ10F6J6n9e3femuaalQJf 1BZA== Received: by 10.58.114.20 with SMTP id jc20mr11142952veb.15.1344307689769; Mon, 06 Aug 2012 19:48:09 -0700 (PDT) Received: from localhost.localdomain (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id e9sm17555638vdf.21.2012.08.06.19.48.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 19:48:09 -0700 (PDT) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller Subject: [PATCH 22/24] au0828: fix a couple of missed edge cases for i2c gate with analog Date: Mon, 6 Aug 2012 22:47:12 -0400 Message-Id: <1344307634-11673-23-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1344307634-11673-1-git-send-email-dheitmueller@kernellabs.com> References: <1344307634-11673-1-git-send-email-dheitmueller@kernellabs.com> X-Gm-Message-State: ALoCoQmBGmuwmfpLPF4aj6rrarw2OMmir4R02blOxfn1mBfzIkxY15dUZcG3SV3mWgs741cluhbA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patch addresses a couple of cases where I forgot to pop open the gate when in analog mode (a correlary to fix the change made in patch 1c58d5b4a5fca42dce5428bd79b9405878017735). Signed-off-by: Devin Heitmueller --- drivers/media/video/au0828/au0828-video.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 4d5b670..fa0fa9a 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c @@ -1325,12 +1325,19 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id * norm) struct au0828_fh *fh = priv; struct au0828_dev *dev = fh->dev; + if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) + dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1); + /* FIXME: when we support something other than NTSC, we are going to have to make the au0828 bridge adjust the size of its capture buffer, which is currently hardcoded at 720x480 */ v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, *norm); dev->std_set_in_tuner_core = 1; + + if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) + dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0); + return 0; } @@ -1510,9 +1517,18 @@ static int vidioc_s_tuner(struct file *file, void *priv, return -EINVAL; t->type = V4L2_TUNER_ANALOG_TV; + + if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) + dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1); + v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t); + + if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) + dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 0); + dprintk(1, "VIDIOC_S_TUNER: signal = %x, afc = %x\n", t->signal, t->afc); + return 0; }