From patchwork Thu Apr 11 22:06:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2432821 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 CF2DDDF230 for ; Thu, 11 Apr 2013 22:07:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752934Ab3DKWHr (ORCPT ); Thu, 11 Apr 2013 18:07:47 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:43427 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611Ab3DKWHq (ORCPT ); Thu, 11 Apr 2013 18:07:46 -0400 Received: by mail-la0-f52.google.com with SMTP id ek20so593937lab.11 for ; Thu, 11 Apr 2013 15:07:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:to:subject:cc:from:organization:date:mime-version :content-type:content-transfer-encoding:message-id :x-gm-message-state; bh=IsS1ywmUpBCHEjIHyM+8RIQfFhTToVpTKtQJztHIteE=; b=nYOLWABo7TXkw3l++EDBav00JuJerjVvFPphUVwrcksx6eBgoAF8vcZHaVpUmGlfNl WtGHtmCw5eSFxI0HoHo4L5MsAjfzeDOMlDTV/OatGkbwgNCF7Q6R6crJPIiudj+ehXnk OFH9uNaadZ2VRr/M6WessDYQ+amtlbWpAyXf9kQfZi1aDF8fyiLOljRCIhzHwS2DbaD8 eb97ai+4Z+aIP5Xr9bvoQrOj29gvWnsLZ35B+x+PPRKyFcIN3Vdy1VC4K9eeGfbfzJk0 g9aPAU6UrNq2BVn6MeZf/y+TADC/7JOy0MuJea+1uIClrm6G82kftwVVtCPG5YE9Qw1N ptPA== X-Received: by 10.112.146.98 with SMTP id tb2mr4167012lbb.77.1365718064946; Thu, 11 Apr 2013 15:07:44 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-79-74-243.pppoe.mtu-net.ru. [91.79.74.243]) by mx.google.com with ESMTPS id p1sm2274444lae.0.2013.04.11.15.07.43 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 11 Apr 2013 15:07:43 -0700 (PDT) To: mchehab@redhat.com, linux-media@vger.kernel.org Subject: [PATCH v2 1/2] adv7180: fix querystd() method for no input signal Cc: vladimir.barinov@cogentembedded.com From: Sergei Shtylyov Organization: Cogent Embedded Date: Fri, 12 Apr 2013 02:06:46 +0400 MIME-Version: 1.0 Message-Id: <201304120206.46577.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQnG8OnzMazwGVOO6h4shMnFXREUfhppIDVoXwa9TE8doe0tTlP0egufwuaLLup68t6W6TLD Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Vladimir Barinov When the input signal is not detected querystd() method should return V4L2_STD_UNKNOWN instead of previously latched analog video standard. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov --- Changes since original posting: - fixed the driver name in the subject. drivers/media/i2c/adv7180.c | 4 ++++ 1 file changed, 4 insertions(+) -- 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 Index: linux/drivers/media/i2c/adv7180.c =================================================================== --- linux.orig/drivers/media/i2c/adv7180.c +++ linux/drivers/media/i2c/adv7180.c @@ -135,6 +135,10 @@ struct adv7180_state { static v4l2_std_id adv7180_std_to_v4l2(u8 status1) { + /* in case V4L2_IN_ST_NO_SIGNAL */ + if (!(status1 & ADV7180_STATUS1_IN_LOCK)) + return V4L2_STD_UNKNOWN; + switch (status1 & ADV7180_STATUS1_AUTOD_MASK) { case ADV7180_STATUS1_AUTOD_NTSM_M_J: return V4L2_STD_NTSC;