From patchwork Sat Mar 7 10:07:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 10465 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n27A7g6m028839 for ; Sat, 7 Mar 2009 10:07:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbZCGKHk (ORCPT ); Sat, 7 Mar 2009 05:07:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752954AbZCGKHk (ORCPT ); Sat, 7 Mar 2009 05:07:40 -0500 Received: from zone0.gcu-squad.org ([212.85.147.21]:26587 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752780AbZCGKHj (ORCPT ); Sat, 7 Mar 2009 05:07:39 -0500 Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=hyperion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1LfuVY-0002G6-Ps (TLSv1:AES256-SHA:256) (envelope-from ) ; Sat, 07 Mar 2009 12:15:57 +0100 Date: Sat, 7 Mar 2009 11:07:29 +0100 From: Jean Delvare To: LMML Cc: Trent Piepho , Hans Verkuil Subject: [PATCH] zoran: Drop the lock_norm module parameter Message-ID: <20090307110729.37230310@hyperion.delvare> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; x86_64-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The lock_norm module parameter doesn't look terribly useful. If you don't want to change the norm, just don't change it. As a matter of fact, no other v4l driver has such a parameter. Signed-off-by: Jean Delvare Cc: Trent Piepho Cc: Hans Verkuil --- linux/Documentation/video4linux/Zoran | 3 +-- linux/drivers/media/video/zoran/zoran_driver.c | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) --- v4l-dvb-zoran.orig/linux/Documentation/video4linux/Zoran 2009-02-20 09:42:36.000000000 +0100 +++ v4l-dvb-zoran/linux/Documentation/video4linux/Zoran 2009-02-20 09:45:42.000000000 +0100 @@ -401,8 +401,7 @@ Additional notes for software developers first set the correct norm. Well, it seems logically correct: TV standard is "more constant" for current country than geometry settings of a variety of TV capture cards which may work in ITU or - square pixel format. Remember that users now can lock the norm to - avoid any ambiguity. + square pixel format. -- Please note that lavplay/lavrec are also included in the MJPEG-tools (http://mjpeg.sf.net/). --- v4l-dvb-zoran.orig/linux/drivers/media/video/zoran/zoran_driver.c 2009-02-20 09:42:47.000000000 +0100 +++ v4l-dvb-zoran/linux/drivers/media/video/zoran/zoran_driver.c 2009-02-20 09:45:42.000000000 +0100 @@ -163,10 +163,6 @@ const struct zoran_format zoran_formats[ }; #define NUM_FORMATS ARRAY_SIZE(zoran_formats) -static int lock_norm; /* 0 = default 1 = Don't change TV standard (norm) */ -module_param(lock_norm, int, 0644); -MODULE_PARM_DESC(lock_norm, "Prevent norm changes (1 = ignore, >1 = fail)"); - /* small helper function for calculating buffersizes for v4l2 * we calculate the nearest higher power-of-two, which * will be the recommended buffersize */ @@ -1497,22 +1493,6 @@ zoran_set_norm (struct zoran *zr, return -EBUSY; } - if (lock_norm && norm != zr->norm) { - if (lock_norm > 1) { - dprintk(1, - KERN_WARNING - "%s: set_norm() - TV standard is locked, can not switch norm\n", - ZR_DEVNAME(zr)); - return -EPERM; - } else { - dprintk(1, - KERN_WARNING - "%s: set_norm() - TV standard is locked, norm was not changed\n", - ZR_DEVNAME(zr)); - norm = zr->norm; - } - } - if (!(norm & zr->card.norms)) { dprintk(1, KERN_ERR "%s: set_norm() - unsupported norm %llx\n",