Linux 2.6.28 + Trust 610 LCD PowerC@m Zoom, webcam mode?
Hello Jean-Francois,
I have a Trust 610 LCD PowerC@m Zoom camera which can operate in webcam mode also (USB ID=06d6:0031). I tried to use it together with Linux 2.6.28 and with xawtv-3.95.dfsg.1 and with gqcam 0.9.1. The /dev/video0 appeared, but no usable picture was visible.
However, I downloaded http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz
and applied the attached patch (which might be incorrect for some aspects). So I was able to compile the module and both xawtv and gqcam showed the good picture.
Do you have any idea why the gspcav1 diver is working and the one which is included in Linux 2.6.28 not?
Here is the output of v4l-info with the patched working gspcav1 driver:
$ v4l-info
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "Trust 610 LCD PowerC@m Zoom"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 464
maxheight : 480
minwidth : 176
minheight : 144
channels
VIDIOCGCHAN(0)
channel : 0
name : "SPCA533"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0
tuner
ioctl VIDIOCGTUNER: Invalid argument
audio
ioctl VIDIOCGAUDIO: Invalid argument
picture
VIDIOCGPICT
brightness : 32768
hue : 0
colour : 4096
contrast : 8192
whiteness : 0
depth : 24
palette : RGB24
buffer
VIDIOCGFBUF
base : (nil)
height : 0
width : 0
depth : 0
bytesperline : 0
window
VIDIOCGWIN
x : 0
y : 0
width : 384
height : 288
chromakey : 0
flags : 0
Regards,
Márton Németh
gspca_core.c +2 -21
@@ -51,10 +51,11 @@ static const char gspca_version[] = GSPC#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> +#include <media/v4l2-ioctl.h> /* only on 2.6.x */ #include <linux/jiffies.h> #include <linux/param.h>
@@ -2606,9 +2607,7 @@ static struct file_operations spca5xx_fo .llseek = no_llseek, };static struct video_device spca50x_template = { - .owner =THIS_MODULE , .name ="GSPCA USB Camera" , - .type =VID_TYPE_CAPTURE , #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23) .hardware =VID_HARDWARE_GSPCA , #endif
@@ -2765,24 +2764,7 @@ static DEVICE_ATTR(pictsetting, S_IRUGO,static int spca50x_create_sysfs (struct video_device *vdev) { -int rc =0 ; - rc =video_device_create_file (vdev, &dev_attr_stream_id); -if (rc) - goto err_stream_id; - rc =video_device_create_file (vdev, &dev_attr_model); -if (rc) - goto err_model; - rc =video_device_create_file (vdev, &dev_attr_pictsetting); -if (rc) - goto err_pictsetting;return 0 ; - err_pictsetting: -video_device_remove_file (vdev, &dev_attr_pictsetting); - err_model: -video_device_remove_file (vdev, &dev_attr_model); - err_stream_id: -video_device_remove_file (vdev, &dev_attr_stream_id); -return rc; }#endif
@@ -4298,7 +4280,6 @@ spca5xx_probe(struct usb_interface *intfif (!spca50x->vdev) goto error;memcpy (spca50x->vdev, &spca50x_template,sizeof (spca50x_template)); - spca50x->vdev->dev = &dev->dev;video_set_drvdata (spca50x->vdev, spca50x);PDEBUG (2 ,"setting video device = %p, spca50x = %p" , spca50x->vdev, spca50x);
Quoted 1 line · On Sun, 01 Feb 2009 10:24:36 +0100 Németh Márton <[email protected]> wrote:
Hello Jean-Francois,
Hello Márton,
Quoted 7 lines
I have a Trust 610 LCD PowerC@m Zoom camera which can operate in webcam mode also (USB ID=06d6:0031). I tried to use it together with Linux 2.6.28 and with xawtv-3.95.dfsg.1 and with gqcam 0.9.1. The
/dev/video0appeared, but no usable picture was visible.However, I downloaded
http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz and
[snip]
Quoted 2 lines
Do you have any idea why the gspcav1 diver is working and the one which is included in Linux 2.6.28 not?
The gspcav1 is not maintained anymore.
It seems that your webcam has not been tested with gspcav2.
First, did you use the v4l library and its wrapper when running xawtv and gqcam?
Then, have you tried my program svv?
If nothing works, please, send me the kernel traces and the image.dat as indicated in the gspca_README.txt of my page.
Best regards.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
Quoted 13 lines · Jean-Francois Moine
Quoted 1 line · On Sun, 01 Feb 2009 10:24:36 +0100 Németh Márton <[email protected]> wrote:
Hello Jean-Francois,
Hello Márton,
Quoted 7 lines
I have a Trust 610 LCD PowerC@m Zoom camera which can operate in webcam mode also (USB ID=06d6:0031). I tried to use it together with Linux 2.6.28 and with xawtv-3.95.dfsg.1 and with gqcam 0.9.1. The
/dev/video0appeared, but no usable picture was visible.However, I downloaded
http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz and
Quoted 7 lines
[snip]Quoted 2 lines
Do you have any idea why the gspcav1 diver is working and the one which is included in Linux 2.6.28 not?
The gspcav1 is not maintained anymore.
It seems that your webcam has not been tested with gspcav2.
Yes, I found your status at page http://moinejf.free.fr/webcam.html .
Quoted 2 lines
First, did you use the v4l library and its wrapper when running xawtv and gqcam?
I don't really know, I just installed the xawtv package coming with Debian.
Quoted 1 line
Then, have you tried my program svv?
I could get the Trust 610 LCD PowerC@m Zoom's webcam mode working with 2.6.28 by doing the following steps:
1. download and compile http://people.atrpms.net/~hdegoede/libv4l-0.5.8.tar.gz
2. download and compile http://moinejf.free.fr/svv.c
3. export LD_LIBRARY_PATH=./libv4l-0.5.8/libv4lconvert/
4. run svv
I tested the following settings, all were working correctly:
$ ./svv raw pixfmt: JPEG 464x480 pixfmt: RGB3 464x480 mmap method $ ./svv -m r raw pixfmt: JPEG 464x480 pixfmt: RGB3 464x480 read method $ ./svv -m u raw pixfmt: JPEG 464x480 pixfmt: RGB3 464x480 userptr method
What I recognised is that the gspcav1 with xawtv delivered pictures in resolution of 288x384, while the version in 2.6.28 in 464x480. I guess this is an improved resolution, but I don't know why the aspect ratio changed (288/384 = 3/4 = 0.75, 464/480 = 29/30 = 0.9667).
Thanks for your help!
Regards,
Márton Németh
The output of v4l-info:
### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "sunplus"
card : "Trust 610 LCD POWERC@M ZOOM"
bus_info : "0000:00:10.0"
version : 2.3.0
capabilities : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]
standards
inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "sunplus"
type : CAMERA
audioset : 0
tuner : 0
std : 0x0 []
status : 0x0 []
video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 1
description : "JPEG"
pixelformat : 0x4745504a [JPEG]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 464
fmt.pix.height : 480
fmt.pix.pixelformat : 0x4745504a [JPEG]
fmt.pix.field : NONE
fmt.pix.bytesperline : 464
fmt.pix.sizeimage : 84110
fmt.pix.colorspace : JPEG
fmt.pix.priv : 1
controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : 0
maximum : 255
step : 1
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 255
step : 1
default_value : 32
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Color"
minimum : 0
maximum : 255
step : 1
default_value : 26
flags : 0
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "Trust 610 LCD POWERC@M ZOOM"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 464
maxheight : 480
minwidth : 48
minheight : 32
channels
VIDIOCGCHAN(0)
channel : 0
name : "sunplus"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0
tuner
ioctl VIDIOCGTUNER: Invalid argument
audio
ioctl VIDIOCGAUDIO: Invalid argument
picture
VIDIOCGPICT
brightness : 32896
hue : 0
colour : 6168
contrast : 8224
whiteness : 0
depth : 8
palette : unknown
buffer
ioctl VIDIOCGFBUF: Invalid argument
window
VIDIOCGWIN
x : 0
y : 0
width : 464
height : 480
chromakey : 0
flags : 0