From: "Németh Márton" <nm127@freemail.hu>
To: Jean-Francois Moine <moinejf@free.fr>,
Hans de Goede <hdegoede@redhat.com>,
V4L Mailing List <linux-media@vger.kernel.org>
Cc: Thomas Kaiser <thomas@kaiser-linux.li>,
Theodore Kilgore <kilgota@auburn.edu>,
Kyle Guinn <elyk03@gmail.com>
Subject: [PATCH 17/21] gspca pac7302/pac7311: separate format descriptors
Date: Sun, 01 Nov 2009 00:16:28 +0100 [thread overview]
Message-ID: <4AECC54C.3020108@freemail.hu> (raw)
From: Márton Németh <nm127@freemail.hu>
Separate supported format descriptors and supported resolutions.
Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Thomas Kaiser <thomas@kaiser-linux.li>
Cc: Theodore Kilgore <kilgota@auburn.edu>
Cc: Kyle Guinn <elyk03@gmail.com>
---
diff -uprN q/drivers/media/video/gspca/pac7311.c r/drivers/media/video/gspca/pac7311.c
--- q/drivers/media/video/gspca/pac7311.c 2009-10-31 08:26:17.000000000 +0100
+++ r/drivers/media/video/gspca/pac7311.c 2009-10-31 09:07:56.000000000 +0100
@@ -349,7 +349,15 @@ static struct ctrl pac7311_sd_ctrls[] =
},
};
-static const struct v4l2_pix_format vga_mode[] = {
+static const struct v4l2_pix_format pac7302_vga_mode[] = {
+ {640, 480, V4L2_PIX_FMT_PJPG, V4L2_FIELD_NONE,
+ .bytesperline = 640,
+ .sizeimage = 640 * 480 * 3 / 8 + 590,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ .priv = 0},
+};
+
+static const struct v4l2_pix_format pac7311_vga_mode[] = {
{160, 120, V4L2_PIX_FMT_PJPG, V4L2_FIELD_NONE,
.bytesperline = 160,
.sizeimage = 160 * 120 * 3 / 8 + 590,
@@ -642,8 +650,8 @@ static int pac7302_sd_config(struct gspc
cam = &gspca_dev->cam;
PDEBUG(D_CONF, "Find Sensor PAC7302");
- cam->cam_mode = &vga_mode[2]; /* only 640x480 */
- cam->nmodes = 1;
+ cam->cam_mode = pac7302_vga_mode; /* only 640x480 */
+ cam->nmodes = ARRAY_SIZE(pac7302_vga_mode);
sd->brightness = BRIGHTNESS_DEF;
sd->contrast = CONTRAST_DEF;
@@ -666,8 +674,8 @@ static int pac7311_sd_config(struct gspc
cam = &gspca_dev->cam;
PDEBUG(D_CONF, "Find Sensor PAC7311");
- cam->cam_mode = vga_mode;
- cam->nmodes = ARRAY_SIZE(vga_mode);
+ cam->cam_mode = pac7311_vga_mode;
+ cam->nmodes = ARRAY_SIZE(pac7311_vga_mode);
sd->contrast = CONTRAST_DEF;
sd->gain = GAIN_DEF;
reply other threads:[~2009-10-31 23:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AECC54C.3020108@freemail.hu \
--to=nm127@freemail.hu \
--cc=elyk03@gmail.com \
--cc=hdegoede@redhat.com \
--cc=kilgota@auburn.edu \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
--cc=thomas@kaiser-linux.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox