You are not logged in.

#26 2008-11-27 09:09:49

gavian
Member
Registered: 2008-03-05
Posts: 3

Re: Gspca and Kernel 2.6.27

I have compiled a gspcav driver with a patch attached below and it works with kernel 2.6.27.6

you can download the driver it from http://mxhaard.free.fr/spca50x/Download … 224.tar.gz

Date: Thu, 27 Nov 2008 08:52:19 +0000
Subject: [PATCH] fixed

---
gspca.h      |    1 +
gspca_core.c |   20 ++++++++++----------
2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/gspca.h b/gspca.h
index b43d027..252440d 100755
--- a/gspca.h
+++ b/gspca.h
@@ -14,6 +14,7 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
#endif
/* V4L API extension for raw JPEG (=JPEG without header) and JPEG with header   
*/
diff --git a/gspca_core.c b/gspca_core.c
index 068ef33..9dbb785 100755
--- a/gspca_core.c
+++ b/gspca_core.c
@@ -51,7 +51,7 @@ static const char gspca_version[] = GSPCA_VERSION;
#include <linux/pagemap.h>
#include <linux/usb.h>
#include <asm/io.h>
-#include <asm/semaphore.h>
+#include <linux/semaphore.h>
#include <asm/page.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
@@ -2606,9 +2606,9 @@ static struct file_operations spca5xx_fops = {
    .llseek = no_llseek,
};
static struct video_device spca50x_template = {
-    .owner = THIS_MODULE,
+    //.owner = THIS_MODULE,
    .name = "GSPCA USB Camera",
-    .type = VID_TYPE_CAPTURE,
+    .vfl_type = VID_TYPE_CAPTURE,
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)   
    .hardware = VID_HARDWARE_GSPCA,
#endif
@@ -2766,22 +2766,22 @@ static int
spca50x_create_sysfs(struct video_device *vdev)
{
    int rc = 0;
-    rc = video_device_create_file(vdev, &dev_attr_stream_id);
+    rc = device_create_file(&vdev->dev, &dev_attr_stream_id);
    if (rc)
        goto err_stream_id;
-    rc = video_device_create_file(vdev, &dev_attr_model);
+    rc = device_create_file(&vdev->dev, &dev_attr_model);
    if (rc)
        goto err_model;
-    rc = video_device_create_file(vdev, &dev_attr_pictsetting);
+    rc = device_create_file(&vdev->dev, &dev_attr_pictsetting);
    if (rc)
        goto err_pictsetting;
    return 0;
       err_pictsetting:
-    video_device_remove_file(vdev, &dev_attr_pictsetting);
+    device_remove_file(&vdev->dev, &dev_attr_pictsetting);
       err_model:
-    video_device_remove_file(vdev, &dev_attr_model);
+    device_remove_file(&vdev->dev, &dev_attr_model);
       err_stream_id:
-    video_device_remove_file(vdev, &dev_attr_stream_id);
+    device_remove_file(&vdev->dev, &dev_attr_stream_id);
    return rc;
}
#endif
@@ -4298,7 +4298,7 @@ spca5xx_probe(struct usb_interface *intf, const struct usb_device_id *id)
    if (!spca50x->vdev)
        goto error;
    memcpy(spca50x->vdev, &spca50x_template, sizeof (spca50x_template));
-    spca50x->vdev->dev = &dev->dev;
+    spca50x->vdev->dev = dev->dev;
    video_set_drvdata(spca50x->vdev, spca50x);
    PDEBUG(2, "setting video device = %p, spca50x = %p", spca50x->vdev,
           spca50x);
--
1.6.0.4

Offline

#27 2008-11-28 23:07:25

gnu_D
Member
From: Macedonia
Registered: 2007-10-21
Posts: 46

Re: Gspca and Kernel 2.6.27

Hi,
I got simular problems.
I have:

Qtec     170     0x093a     0x2460     Qtec Webcam100         Pac207

It worked few kernels ago smile, but now it doesn't.
I tested the webcam in Ubuntu 8.04.1 and it works, but not in Arch sad.

gnu_d ~  $  xawtv
This is xawtv-3.95, running on Linux/i686 (2.6.27-ARCH)
WARNING: No DGA direct video mode for this display.
/dev/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct

VLC

[00000510] v4l demux error: failed syncing new frame
[00000510] v4l demux error: failed syncing new frame
....

- Just a blank screen.

Skype>
In options window in the video test page, when I press test I see green video, not my self smile.
When I try to make a video call, it crashes.

Loaded modules>
http://rafb.net/p/1U42C214.html [Ubuntu 8.04.1 Live Cd]
http://rafb.net/p/jk33YI48.html [ArchLinux]

Also trying to compile the driver>
http://rafb.net/p/zK5Fz376.html [2 errors]

If it's needed more data please tell me smile.


:: Python powered FOREVER ::

Offline

#28 2008-12-01 09:16:35

gnu_D
Member
From: Macedonia
Registered: 2007-10-21
Posts: 46

Re: Gspca and Kernel 2.6.27

Hi,
I was digging in Ubuntu and I found a solution for my webcam>

export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so.

P.S> Just put that in ~/.profile and logout.

Sources>
https://answers.launchpad.net/ubuntu/+question/49739
http://ubuntuforums.org/showthread.php?t=945803&page=2


:: Python powered FOREVER ::

Offline

#29 2009-01-21 13:00:46

matsche
Member
From: .at
Registered: 2004-04-27
Posts: 120

Re: Gspca and Kernel 2.6.27

I have the same problem on 2.6.28.1 kernel here:
I have to execute: LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype


THX!!
cu matsche

Offline

Board footer

Powered by FluxBB