From patchwork Tue Oct 30 16:04:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 1670731 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 20BCD3FD2B for ; Tue, 30 Oct 2012 16:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933901Ab2J3QEe (ORCPT ); Tue, 30 Oct 2012 12:04:34 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:48714 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933825Ab2J3QEd (ORCPT ); Tue, 30 Oct 2012 12:04:33 -0400 Received: by mail-wg0-f44.google.com with SMTP id dr13so292654wgb.1 for ; Tue, 30 Oct 2012 09:04:31 -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:x-gm-message-state; bh=nh2FITC+jcIERE4PTCDZh4PCR7PveTaiPRsmQs4OfL8=; b=eAXZle8nOIHbIDx7Oy5st89JTTGisHhw5NP+qCpHmw7Vkno6kDFRMO4yVhErXRVg+g 6zh5YUcvZC+wpTSlFMocggBHPpHGT/ZJ5nSjsrX0uFHJw6z0rYJvygh+GB4068ByDi5J m610otoNAXsCnNvVpFEbYmfMvqWHfoqVeuP8zVrNeoN6WIPtis4zT31DaIZEqsqCPXBH a24QJZNxpmDoO2n1+T1U2Yu1c9c32FIe1ydxqkqkxo/bEen3yiG3gfebE7i45Zt7whn0 +cwW0SAce3w2JzYPwB3kV8Zx0mlKKXuaUD/9pNOMLTNSybDkUHDe1h0EU9lU7YrG+KNe FS8A== Received: by 10.180.108.38 with SMTP id hh6mr1116409wib.0.1351613071539; Tue, 30 Oct 2012 09:04:31 -0700 (PDT) Received: from piscis.vsilicon.net (149.93.18.95.dynamic.jazztel.es. [95.18.93.149]) by mx.google.com with ESMTPS id a2sm7052613wie.6.2012.10.30.09.04.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 09:04:30 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, laurent.pinchart@ideasonboard.com, mchehab@redhat.com, corbet@lwn.net, Javier Martin Subject: [PATCH] media: ov7670: Allow 32x maximum gain for yuv422. Date: Tue, 30 Oct 2012 17:04:23 +0100 Message-Id: <1351613063-19076-1-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkc6yMzXGQD8j4hPhg8soaCatbxELSpjxqa2fFb6kNs8nYdge3RtOsDaPuqkjygeHCaNyBp Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 4x gain ceiling is not enough to capture a decent image in conditions of total darkness and only a LED light source. Allow a maximum gain of 32x instead. This doesn't have any drawback since the image quality in 'normal' light conditions is the same. Signed-off-by: Javier Martin Acked-by: Jonathan Corbet --- drivers/media/video/ov7670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 5faa3d8..2ea9c51 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -366,7 +366,7 @@ static struct regval_list ov7670_fmt_yuv422[] = { { REG_RGB444, 0 }, /* No RGB444 please */ { REG_COM1, 0 }, /* CCIR601 */ { REG_COM15, COM15_R00FF }, - { REG_COM9, 0x18 }, /* 4x gain ceiling; 0x8 is reserved bit */ + { REG_COM9, 0x48 }, /* 32x gain ceiling; 0x8 is reserved bit */ { 0x4f, 0x80 }, /* "matrix coefficient 1" */ { 0x50, 0x80 }, /* "matrix coefficient 2" */ { 0x51, 0 }, /* vb */