From patchwork Wed Dec 22 20:31:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 428561 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBMKW14o026688 for ; Wed, 22 Dec 2010 20:32:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751593Ab0LVUcA (ORCPT ); Wed, 22 Dec 2010 15:32:00 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:33310 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187Ab0LVUb7 (ORCPT ); Wed, 22 Dec 2010 15:31:59 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 174DF18015C9; Wed, 22 Dec 2010 21:31:58 +0100 (CET) X-Auth-Info: 7LAPXNbEfxdgZzJpDeTvpS2FVtb0XKhY0f/hz9X0KZ4= Received: from localhost (p4FE3E43A.dip.t-dialin.net [79.227.228.58]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 19DE01C000A7; Wed, 22 Dec 2010 21:31:58 +0100 (CET) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , Detlev Zundel Subject: [PATCH v2 1/2] media: saa7115: allow input standard autodetection for more chips Date: Wed, 22 Dec 2010 21:31:58 +0100 Message-Id: <1293049919-9098-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <4D122C53.4070300@redhat.com> References: <4D122C53.4070300@redhat.com> 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 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Dec 2010 20:32:01 +0000 (UTC) diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 301c62b..f35459d 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c @@ -1348,8 +1348,17 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) int reg1e; *std = V4L2_STD_ALL; - if (state->ident != V4L2_IDENT_SAA7115) + if (state->ident != V4L2_IDENT_SAA7115) { + int reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC); + + if (reg1f & 0x20) + *std = V4L2_STD_525_60; + else + *std = V4L2_STD_625_50; + return 0; + } + reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC); switch (reg1e & 0x03) {