Help!

[PATCH] Vicam driver, device

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel (archive) RSS
Next:  PROBLEM: HP dv6000z Laptop ACPI/nVidia/bcm43xx is..  
Author Message
Bas Bloemsaat
External


Since: Sep 02, 2006
Posts: 1



PostPosted: Sat Sep 02, 2006 8:10 pm    Post subject: [PATCH] Vicam driver, device
Archived from groups: linux>kernel (more info?)

Hi,

I have an old webcam, a Compro PS39U. By windows it's recognized as
vicam and works with the vicam driver. With Linux it didn't work.
lsusb showed that it identifies different than camera's recognized by
the vicam driver. So I added the usb id to vicam.c, and it now
produces images through the driver under Linux too. It's still a
shitty camera though.

I'm submitting the change, maybe someone else has this camera and
want's to use it.

Regards,
Bas

--- drivers/media/video/usbvideo/vicam.c 2006-08-23 23:16:33.000000000 +0200
+++ drivers/media/video/usbvideo/vicam.c.compro 2006-09-02
19:45:20.000000000 +0200
@@ -60,6 +60,8 @@
/* Define these values to match your device */
#define USB_VICAM_VENDOR_ID 0x04c1
#define USB_VICAM_PRODUCT_ID 0x009d
+#define USB_COMPRO_VENDOR_ID 0x0602
+#define USB_COMPRO_PRODUCT_ID 0x1001

#define VICAM_BYTES_PER_PIXEL 3
#define VICAM_MAX_READ_SIZE (512*242+128)
@@ -1254,6 +1256,7 @@
/* table of devices that work with this driver */
static struct usb_device_id vicam_table[] = {
{USB_DEVICE(USB_VICAM_VENDOR_ID, USB_VICAM_PRODUCT_ID)},
+ {USB_DEVICE(USB_COMPRO_VENDOR_ID, USB_COMPRO_PRODUCT_ID)},
{} /* Terminating entry */
};

--
VGER BF report: H 0.404625
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Mauro Carvalho Chehab
External


Since: May 17, 2006
Posts: 163



PostPosted: Sat Sep 02, 2006 8:20 pm    Post subject: Re: [PATCH] Vicam driver, device [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi, Blas,

Em Sáb, 2006-09-02 às 20:01 +0200, Bas Bloemsaat escreveu:
> Hi,
>
> I have an old webcam, a Compro PS39U. By windows it's recognized as
> vicam and works with the vicam driver. With Linux it didn't work.
> lsusb showed that it identifies different than camera's recognized by
> the vicam driver. So I added the usb id to vicam.c, and it now
> produces images through the driver under Linux too. It's still a
> shitty camera though.
>
> I'm submitting the change, maybe someone else has this camera and
> want's to use it.

Although this is really a trivial patch, it would be nice if you can
sign your patch (on our wiki you can have more info about patch
submission procedure:
http://linuxtv.org/v4lwiki/index.php/How_to_submit_patches). Basically,
you should send at the email a line with:
Signed-off-by: Your name <name.TakeThisOut@yoursite.com>

Also, it would be nice if you add a comment above the new entry at vicam
PCI table a short comment describing the new device, like, for example:

/* Compro PS39U */

>
> Regards,
> Bas
>
> --- drivers/media/video/usbvideo/vicam.c 2006-08-23 23:16:33.000000000 +0200
> +++ drivers/media/video/usbvideo/vicam.c.compro 2006-09-02
> 19:45:20.000000000 +0200
> @@ -60,6 +60,8 @@
> /* Define these values to match your device */
> #define USB_VICAM_VENDOR_ID 0x04c1
> #define USB_VICAM_PRODUCT_ID 0x009d
> +#define USB_COMPRO_VENDOR_ID 0x0602
> +#define USB_COMPRO_PRODUCT_ID 0x1001
>
> #define VICAM_BYTES_PER_PIXEL 3
> #define VICAM_MAX_READ_SIZE (512*242+128)
> @@ -1254,6 +1256,7 @@
> /* table of devices that work with this driver */
> static struct usb_device_id vicam_table[] = {
> {USB_DEVICE(USB_VICAM_VENDOR_ID, USB_VICAM_PRODUCT_ID)},
> + {USB_DEVICE(USB_COMPRO_VENDOR_ID, USB_COMPRO_PRODUCT_ID)},
> {} /* Terminating entry */
> };
Cheers,
Mauro.


--
VGER BF report: U 0.5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Pavel Machek
External


Since: Nov 18, 2004
Posts: 1301



PostPosted: Sat Sep 02, 2006 10:00 pm    Post subject: Re: [PATCH] Vicam driver, device [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi!

> I have an old webcam, a Compro PS39U. By windows it's recognized as
> vicam and works with the vicam driver. With Linux it didn't work.
> lsusb showed that it identifies different than camera's recognized by
> the vicam driver. So I added the usb id to vicam.c, and it now
> produces images through the driver under Linux too. It's still a
> shitty camera though.
>
> I'm submitting the change, maybe someone else has this camera and
> want's to use it.
>
> --- drivers/media/video/usbvideo/vicam.c 2006-08-23
> 23:16:33.000000000 +0200
> +++ drivers/media/video/usbvideo/vicam.c.compro 2006-09-02
> 19:45:20.000000000 +0200

You want to fix your mailer, it word wraps.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

--
VGER BF report: U 0.5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Bas Bloemsaat
External


Since: Sep 03, 2006
Posts: 1



PostPosted: Sun Sep 03, 2006 10:40 am    Post subject: Re: [PATCH] Vicam driver, device [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

> Although this is really a trivial patch, it would be nice if you can
> sign your patch (on our wiki you can have more info about patch
>
> Also, it would be nice if you add a comment above the new entry at vicam
> PCI table a short comment describing the new device, like, for example:
Done. I put a line under the current one describing the cam it was developed for.

And mailed the text without wrapping (thanks to Pavel for bringing that to my attention).

Regards,
Bas

Description:
Trivial patch to make Compro PS39U WebCam work with linux by using the vicam driver.
The camera is just a vicam with another USB ID, so I added that ID to the driver, and it works now.

Signed-off-by: Bas Bloemsaat <bas.bloemsaat.DeleteThis@gmail.com>


--- drivers/media/video/usbvideo/vicam.c.org 2006-09-03 10:19:06.000000000 +0200
+++ drivers/media/video/usbvideo/vicam.c 2006-09-03 10:22:52.000000000 +0200
@@ -7,6 +7,7 @@
* Monroe Williams (monroe@pobox.com)
*
* Supports 3COM HomeConnect PC Digital WebCam
+ * Supports Compro PS39U WebCam
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,6 +61,8 @@
/* Define these values to match your device */
#define USB_VICAM_VENDOR_ID 0x04c1
#define USB_VICAM_PRODUCT_ID 0x009d
+#define USB_COMPRO_VENDOR_ID 0x0602
+#define USB_COMPRO_PRODUCT_ID 0x1001

#define VICAM_BYTES_PER_PIXEL 3
#define VICAM_MAX_READ_SIZE (512*242+128)
@@ -1254,6 +1257,7 @@ static struct video_device vicam_templat
/* table of devices that work with this driver */
static struct usb_device_id vicam_table[] = {
{USB_DEVICE(USB_VICAM_VENDOR_ID, USB_VICAM_PRODUCT_ID)},
+ {USB_DEVICE(USB_COMPRO_VENDOR_ID, USB_COMPRO_PRODUCT_ID)},
{} /* Terminating entry */
};


--
VGER BF report: U 0.954643
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nick Warne
External


Since: Sep 03, 2006
Posts: 1



PostPosted: Sun Sep 03, 2006 6:40 pm    Post subject: Re: [PATCH] Vicam driver, device [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 03/09/06, Bas Bloemsaat <bas.bloemsaat.RemoveThis@gmail.com> wrote:
> Done. I put a line under the current one describing the cam it was developed for.
>
> And mailed the text without wrapping (thanks to Pavel for bringing that to my attention).
>
> Regards,
> Bas
>
> Description:
> Trivial patch to make Compro PS39U WebCam work with linux by using the vicam driver.
> The camera is just a vicam with another USB ID, so I added that ID to the driver, and it works now.

Do you get the release call back warning when rmmod the vicam module?
I tried to fix this ages ago, but all I successfully achieved was
kernel oops:

http://www.ussg.iu.edu/hypermail/linux/kernel/0510.3/1113.html

It would be nice to fix.

Nick

--
VGER BF report: U 0.495384
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nick Warne
External


Since: May 21, 2006
Posts: 13



PostPosted: Mon Sep 04, 2006 8:40 pm    Post subject: Re: [PATCH] Vicam driver, device [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Monday 04 September 2006 19:28, Bas Bloemsaat wrote:
> Yes, but not an oops as you describe. I get the following in the
> syslog when I modprobe it:
> kernel: videodev: "ViCam-based USB Camera" has no release callback.
> Please fix your driver for proper sysfs support, see
> http://lwn.net/Articles/36850/

No sorry, I worded it all wrong. I meant on modprobe. I then attempted to
fix the code, which produced kernel oops, so it was my bad code that caused
it - it needs someone that knows what they are doing Wink

> When rmmodding, the only message I see is: "kernel: usbcore:
> deregistering driver vicam", which seems normal.

After my attempted fixes, this is when my kernel crashed.

> I didn't plan on using the webcam, I just couldn't stand that it
> didn't work while a driver was supposed to be available, and now it
> works.

I don't use mine now, but it would be nice to get this code brought up to
date.

Nick
--
Every program has two purposes:
one for which it was written and another for which it wasn't.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel (archive) All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum