From patchwork Mon Apr 18 20:39:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice Chotard X-Patchwork-Id: 716531 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 p3IKdfmG027852 for ; Mon, 18 Apr 2011 20:39:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067Ab1DRUjj (ORCPT ); Mon, 18 Apr 2011 16:39:39 -0400 Received: from smtp24.services.sfr.fr ([93.17.128.83]:65369 "EHLO smtp24.services.sfr.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418Ab1DRUjj (ORCPT ); Mon, 18 Apr 2011 16:39:39 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2411.sfr.fr (SMTP Server) with ESMTP id B6A2E7000086; Mon, 18 Apr 2011 22:39:38 +0200 (CEST) Received: from [192.168.1.59] (unknown [88.140.72.49]) by msfrf2411.sfr.fr (SMTP Server) with ESMTP id 8184B7000085; Mon, 18 Apr 2011 22:39:38 +0200 (CEST) X-SFR-UUID: 20110418203938530.8184B7000085@msfrf2411.sfr.fr Message-ID: <4DACA18A.2060000@sfr.fr> Date: Mon, 18 Apr 2011 22:39:38 +0200 From: Patrice Chotard User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: linux-media@vger.kernel.org, Jean-Francois Moine CC: Theodore Kilgore Subject: [PATCH 3/5] gspca - jeilinj: add 640*480 resolution support 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Apr 2011 20:39:41 +0000 (UTC) Signed-off-by: Patrice CHOTARD --- drivers/media/video/gspca/jeilinj.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index 32494fb..51b68db 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c @@ -62,6 +62,11 @@ static struct v4l2_pix_format jlj_mode[] = { .bytesperline = 320, .sizeimage = 320 * 240, .colorspace = V4L2_COLORSPACE_JPEG, + .priv = 0}, + { 640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 640, + .sizeimage = 640 * 480, + .colorspace = V4L2_COLORSPACE_JPEG, .priv = 0} }; @@ -207,7 +212,7 @@ static int sd_config(struct gspca_dev *gspca_dev, "JEILINJ camera detected" " (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); cam->cam_mode = jlj_mode; - cam->nmodes = 1; + cam->nmodes = ARRAY_SIZE(jlj_mode); cam->bulk = 1; cam->bulk_nurbs = 1; cam->bulk_size = JEILINJ_MAX_TRANSFER; @@ -264,7 +269,8 @@ static int sd_start(struct gspca_dev *gspca_dev) jpeg_define(dev->jpeg_hdr, gspca_dev->height, gspca_dev->width, 0x21); /* JPEG 422 */ jpeg_set_qual(dev->jpeg_hdr, dev->quality); - PDEBUG(D_STREAM, "Start streaming at 320x240"); + PDEBUG(D_STREAM, "Start streaming at %dx%d", + gspca_dev->height, gspca_dev->width); jlj_start(gspca_dev); return gspca_dev->usb_err; }