From: Jean-Francois Moine <moinejf@free.fr>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] ov534: allow enumerating supported framerates
Date: Sat, 16 Jan 2010 17:47:49 +0100 [thread overview]
Message-ID: <20100116174749.696dcb9d@tele> (raw)
In-Reply-To: <20100116153345.c54db7aa.ospite@studenti.unina.it>
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
On Sat, 16 Jan 2010 15:33:45 +0100
Antonio Ospite <ospite@studenti.unina.it> wrote:
> > 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};
> > +
>
> Hmm, after double checking compilation messages, having these as
> 'const' produces two:
> warning: initialization discards qualifiers from pointer target type
> in the assignments below.
>
> If I remove the 'const' qualifiers here, the messages go away, so I'd
> say we can do also without them. If that's ok I'll send a v2 soon,
> sorry.
Hi Antonio,
I recoded your patch with some changes, mainly in gspca.h. If it is
OK for you, may you sign it?
Best regards.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
[-- Attachment #2: patch.pat --]
[-- Type: application/octet-stream, Size: 1241 bytes --]
diff -r 5bcdcc072b6d linux/drivers/media/video/gspca/gspca.h
--- a/linux/drivers/media/video/gspca/gspca.h Sat Jan 16 07:25:43 2010 +0100
+++ b/linux/drivers/media/video/gspca/gspca.h Sat Jan 16 17:44:46 2010 +0100
@@ -49,7 +49,7 @@
/* used to list framerates supported by a camera mode (resolution) */
struct framerates {
- int *rates;
+ const u8 *rates;
int nrates;
};
diff -r 5bcdcc072b6d linux/drivers/media/video/gspca/ov534.c
--- a/linux/drivers/media/video/gspca/ov534.c Sat Jan 16 07:25:43 2010 +0100
+++ b/linux/drivers/media/video/gspca/ov534.c Sat Jan 16 17:44:46 2010 +0100
@@ -282,6 +282,20 @@
.priv = 0},
};
+static const u8 qvga_rates[] = {125, 100, 75, 60, 50, 40, 30};
+static const u8 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 +813,7 @@
cam->cam_mode = ov772x_mode;
cam->nmodes = ARRAY_SIZE(ov772x_mode);
+ cam->mode_framerates = ov772x_framerates;
cam->bulk = 1;
cam->bulk_size = 16384;
next prev parent reply other threads:[~2010-01-16 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 0:41 [PATCH] ov534: allow enumerating supported framerates Antonio Ospite
2010-01-16 14:23 ` Antonio Ospite
2010-01-16 14:33 ` Antonio Ospite
2010-01-16 16:47 ` Jean-Francois Moine [this message]
2010-01-16 20:39 ` Antonio Ospite
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=20100116174749.696dcb9d@tele \
--to=moinejf@free.fr \
--cc=linux-media@vger.kernel.org \
--cc=ospite@studenti.unina.it \
/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