* Re: [Bug 13708] Aiptek DV-T300 support is incomplete
[not found] ` <200907201949.n6KJnOdY016111@demeter.kernel.org>
@ 2009-07-20 20:37 ` Balázs Hámorszky
2009-07-23 23:01 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Balázs Hámorszky @ 2009-07-20 20:37 UTC (permalink / raw)
To: bugzilla-daemon, mchehab, Andrew Morton, linux-media
[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]
I don't have my kernel tree with me (I'm at vacation atm.). The patch
is made with only the -uN options, but I can make a new one on Friday
(if needed).
Thanks for the help!
On Mon, Jul 20, 2009 at 21:49, <bugzilla-daemon@bugzilla.kernel.org> wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13708
>
>
> Andrew Morton <akpm@linux-foundation.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |akpm@linux-foundation.org
>
>
>
>
> --- Comment #2 from Andrew Morton <akpm@linux-foundation.org> 2009-07-20 19:49:22 ---
> It's quite painful to handle patches via bugzilla. Could you resend it via
> email please? Documentation/SubmittingPatches has some details.
>
> Suitable recipients are
>
> Mauro Carvalho Chehab <mchehab@infradead.org>
> Andrew Morton <akpm@linux-foundation.org>
> linux-media@vger.kernel.org
>
> Thanks.
>
> --
> Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
[-- Attachment #2: zr364xx.patch --]
[-- Type: text/x-diff, Size: 1658 bytes --]
--- zr364xx-nemmux-de-uj-2.6.30-upgrade-utan-20090704.c 2009-07-04 23:29:51.000000000 +0200
+++ zr364xx-nemmux-de-uj-2.6.30-upgrade-elott-20090627.c 2009-06-27 14:37:51.000000000 +0200
@@ -59,6 +59,7 @@
#define METHOD0 0
#define METHOD1 1
#define METHOD2 2
+#define METHOD3 3
/* Module parameters */
@@ -95,7 +96,7 @@
{USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 },
{USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 },
{USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 },
- {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD2 },
+ {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD3 },
{} /* Terminating entry */
};
@@ -213,7 +214,7 @@
};
/* init table */
-static message *init[3] = { m0, m1, m2 };
+static message *init[4] = { m0, m1, m2, m2 };
/* JPEG static data in header (Huffman table, etc) */
@@ -347,6 +348,11 @@
cam->buffer[3], cam->buffer[4], cam->buffer[5],
cam->buffer[6], cam->buffer[7], cam->buffer[8]);
} else {
+ if (ptr + actual_length - jpeg > MAX_FRAME_SIZE)
+ {
+ DBG("frame too big!");
+ return 0;
+ }
memcpy(ptr, cam->buffer, actual_length);
ptr += actual_length;
}
@@ -847,6 +853,22 @@
m0d1[0] = mode;
m1[2].value = 0xf000 + mode;
m2[1].value = 0xf000 + mode;
+
+ /* special case for METHOD3, the modes are different */
+ if (cam->method == METHOD3) {
+ switch (mode) {
+ case 1:
+ m2[1].value = 0xf000 + 4;
+ break;
+ case 2:
+ m2[1].value = 0xf000 + 0;
+ break;
+ default:
+ m2[1].value = 0xf000 + 1;
+ break;
+ }
+ }
+
header2[437] = cam->height / 256;
header2[438] = cam->height % 256;
header2[439] = cam->width / 256;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug 13708] Aiptek DV-T300 support is incomplete
2009-07-20 20:37 ` [Bug 13708] Aiptek DV-T300 support is incomplete Balázs Hámorszky
@ 2009-07-23 23:01 ` Andrew Morton
2009-07-24 10:37 ` Hámorszky Balázs
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2009-07-23 23:01 UTC (permalink / raw)
To: Balázs Hámorszky; +Cc: bugzilla-daemon, mchehab, linux-media
On Mon, 20 Jul 2009 22:37:08 +0200
Bal__zs H__morszky <balihb@gmail.com> wrote:
> I don't have my kernel tree with me (I'm at vacation atm.). The patch
> is made with only the -uN options, but I can make a new one on Friday
> (if needed).
>
The patch doesn't apply to current kernels and fixing it looks non-trivial.
There's no hurry - please email us a complete (tested, changelogged,
signed-off) patch when you have time to get onto it, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug 13708] Aiptek DV-T300 support is incomplete
2009-07-23 23:01 ` Andrew Morton
@ 2009-07-24 10:37 ` Hámorszky Balázs
0 siblings, 0 replies; 3+ messages in thread
From: Hámorszky Balázs @ 2009-07-24 10:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: bugzilla-daemon, mchehab, linux-media
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
Andrew Morton wrote:
> The patch doesn't apply to current kernels and fixing it looks non-trivial.
I've attached a patch against the latest git tree.
> There's no hurry - please email us a complete (tested, changelogged,
> signed-off) patch when you have time to get onto it, thanks.
I can't test it. The patch worked partially with kernel 2.6.29, but I
can't get it working with 2.6.30. With 2.6.29 the driver dies after a
few seconds, but with 2.6.30 the programs won't detect the camera.
Also I only ported the patch to later kernels. I'm not the one who made
it. The patch is originally from the creator of the driver. I also don't
know how v4l works, so I have no idea how to fix the patch.
[-- Attachment #2: zr364xx.diff --]
[-- Type: text/x-patch, Size: 1724 bytes --]
--- a/zr364xx.c 2009-07-24 12:19:40.000000000 +0200
+++ b/zr364xx.c 2009-07-24 12:21:14.000000000 +0200
@@ -59,6 +59,7 @@
#define METHOD0 0
#define METHOD1 1
#define METHOD2 2
+#define METHOD3 3
/* Module parameters */
@@ -95,7 +96,7 @@ static struct usb_device_id device_table
{USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 },
{USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 },
{USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 },
- {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD2 },
+ {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD3 },
{} /* Terminating entry */
};
@@ -213,7 +214,7 @@ static message m2[] = {
};
/* init table */
-static message *init[3] = { m0, m1, m2 };
+static message *init[4] = { m0, m1, m2, m2 };
/* JPEG static data in header (Huffman table, etc) */
@@ -347,6 +348,11 @@ static int read_frame(struct zr364xx_cam
cam->buffer[3], cam->buffer[4], cam->buffer[5],
cam->buffer[6], cam->buffer[7], cam->buffer[8]);
} else {
+ if (ptr + actual_length - jpeg > MAX_FRAME_SIZE)
+ {
+ DBG("frame too big!");
+ return 0;
+ }
memcpy(ptr, cam->buffer, actual_length);
ptr += actual_length;
}
@@ -847,6 +853,22 @@ static int zr364xx_probe(struct usb_inte
m0d1[0] = mode;
m1[2].value = 0xf000 + mode;
m2[1].value = 0xf000 + mode;
+
+ /* special case for METHOD3, the modes are different */
+ if (cam->method == METHOD3) {
+ switch (mode) {
+ case 1:
+ m2[1].value = 0xf000 + 4;
+ break;
+ case 2:
+ m2[1].value = 0xf000 + 0;
+ break;
+ default:
+ m2[1].value = 0xf000 + 1;
+ break;
+ }
+ }
+
header2[437] = cam->height / 256;
header2[438] = cam->height % 256;
header2[439] = cam->width / 256;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-24 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <bug-13708-12914@http.bugzilla.kernel.org/>
[not found] ` <200907201949.n6KJnOdY016111@demeter.kernel.org>
2009-07-20 20:37 ` [Bug 13708] Aiptek DV-T300 support is incomplete Balázs Hámorszky
2009-07-23 23:01 ` Andrew Morton
2009-07-24 10:37 ` Hámorszky Balázs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox