* [PATCH] ov534: allow enumerating supported framerates
@ 2010-01-09 0:41 Antonio Ospite
2010-01-16 14:23 ` Antonio Ospite
2010-01-16 14:33 ` Antonio Ospite
0 siblings, 2 replies; 5+ messages in thread
From: Antonio Ospite @ 2010-01-09 0:41 UTC (permalink / raw)
To: linux-media; +Cc: Antonio Ospite, Jean-Francois Moine
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---
Historical note:
This has been re-tested on a reliable machine and it works from guvcview for
all the framerates; on my old PC I am still having problems with 640x480@60fps
_regardless_ of this change, so it must be a USB problem.
Thanks,
Antonio
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ov534: allow enumerating supported framerates
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
1 sibling, 0 replies; 5+ messages in thread
From: Antonio Ospite @ 2010-01-16 14:23 UTC (permalink / raw)
To: linux-media; +Cc: Antonio Ospite, Jean-Francois Moine
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On Sat, 9 Jan 2010 01:41:31 +0100
Antonio Ospite <ospite@studenti.unina.it> wrote:
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
>
> ---
>
> Historical note:
>
> This has been re-tested on a reliable machine and it works from guvcview for
> all the framerates; on my old PC I am still having problems with 640x480@60fps
> _regardless_ of this change, so it must be a USB problem.
>
> Thanks,
> Antonio
Ping? Jean-Francois.
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ov534: allow enumerating supported framerates
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
1 sibling, 1 reply; 5+ messages in thread
From: Antonio Ospite @ 2010-01-16 14:33 UTC (permalink / raw)
To: linux-media; +Cc: Antonio Ospite, Jean-Francois Moine
[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]
On Sat, 9 Jan 2010 01:41:31 +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.
Thanks,
Antonio
> +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;
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ov534: allow enumerating supported framerates
2010-01-16 14:33 ` Antonio Ospite
@ 2010-01-16 16:47 ` Jean-Francois Moine
2010-01-16 20:39 ` Antonio Ospite
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Francois Moine @ 2010-01-16 16:47 UTC (permalink / raw)
To: Antonio Ospite; +Cc: linux-media
[-- 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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ov534: allow enumerating supported framerates
2010-01-16 16:47 ` Jean-Francois Moine
@ 2010-01-16 20:39 ` Antonio Ospite
0 siblings, 0 replies; 5+ messages in thread
From: Antonio Ospite @ 2010-01-16 20:39 UTC (permalink / raw)
To: Jean-Francois Moine; +Cc: linux-media
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
On Sat, 16 Jan 2010 17:47:49 +0100
Jean-Francois Moine <moinejf@free.fr> wrote:
> Hi Antonio,
>
> I recoded your patch with some changes, mainly in gspca.h. If it is
> OK for you, may you sign it?
>
Ok, that's even better.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> Best regards.
>
> --
> Ken ar c'hentañ | ** Breizh ha Linux atav! **
> Jef | http://moinejf.free.fr/
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-16 20:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2010-01-16 20:39 ` Antonio Ospite
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.