From patchwork Sat Jan 9 00:41:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 71896 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o090guBo023828 for ; Sat, 9 Jan 2010 00:43:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617Ab0AIAmw (ORCPT ); Fri, 8 Jan 2010 19:42:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752191Ab0AIAmw (ORCPT ); Fri, 8 Jan 2010 19:42:52 -0500 Received: from smtp-out13.alice.it ([85.33.2.18]:3821 "EHLO smtp-out13.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612Ab0AIAmv (ORCPT ); Fri, 8 Jan 2010 19:42:51 -0500 Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out13.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 01:42:50 +0100 Received: from FBCMCL01B08.fbc.local ([192.168.171.46]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 01:42:50 +0100 Received: from badebec ([82.57.79.174]) by FBCMCL01B08.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 01:42:49 +0100 Received: by badebec with local (Exim 4.71) (envelope-from ) id 1NTPOy-0005Na-G9; Sat, 09 Jan 2010 01:42:00 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , Jean-Francois Moine Subject: [PATCH] ov534: allow enumerating supported framerates Date: Sat, 9 Jan 2010 01:41:31 +0100 Message-Id: <1262997691-20651-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.6.6 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE X-OriginalArrivalTime: 09 Jan 2010 00:42:50.0056 (UTC) FILETIME=[AB9B6C80:01CA90C4] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: gspca/linux/drivers/media/video/gspca/ov534.c =================================================================== --- gspca.orig/linux/drivers/media/video/gspca/ov534.c +++ gspca/linux/drivers/media/video/gspca/ov534.c @@ -282,6 +282,21 @@ .priv = 0}, }; +static const int qvga_rates[] = {125, 100, 75, 60, 50, 40, 30}; +static const int vga_rates[] = {60, 50, 40, 30, 15}; + +static const struct framerates ov772x_framerates[] = { + { /* 320x240 */ + .rates = qvga_rates, + .nrates = ARRAY_SIZE(qvga_rates), + }, + { /* 640x480 */ + .rates = vga_rates, + .nrates = ARRAY_SIZE(vga_rates), + }, +}; + + static const u8 bridge_init[][2] = { { 0xc2, 0x0c }, { 0x88, 0xf8 }, @@ -799,6 +814,7 @@ cam->cam_mode = ov772x_mode; cam->nmodes = ARRAY_SIZE(ov772x_mode); + cam->mode_framerates = ov772x_framerates; cam->bulk = 1; cam->bulk_size = 16384;