First bits of the new stv0600/stv0610 pushed
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
As I've written in an earlier mail I've taken a stab at porting over the old qc-usb driver to the gspca framework.
The driver is nowhere complete but I've gotten it to work on my Quickcam Web using the vv6410 sensor. There is some untested support for the HDCS sensors but I need some testing on it (and probably some bug squashing).
Right now the camera streams a raw bayer image that is converted by the libv4l, the bridge supposedly suports some kind of bastardizes jpeg implementation. It's probably not impossible to implement this
together with libv4l but I'm unsure on how much I'm willing to
spend on this.
This is _not_ a pull request. My current plan is to finish support for the hdcs and pb0100 sensors before submitting it mainline.
The mercurial source repository is located at
http://linuxtv.org/hg/~eandren/gspca-stv06xx/
please have a look and let me know how it works for you and/or if you have any comments regarding the style and code.
Best regards,
Erik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkkjF1oACgkQN7qBt+4UG0EGKQCdHBb+qfFUDqhQx/TwX94VzB+T 9FkAnRmVdWrRCMBP4GcY2yYPCZJfLZ8M
=Ylc+
-----END PGP SIGNATURE-----
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 6 lines · Erik Andrén
Hi,
As I've written in an earlier mail I've taken a stab at porting over the old qc-usb driver to the gspca framework.
The driver is nowhere complete but I've gotten it to work on my Quickcam Web using the vv6410 sensor.
Should I try with:
[ 3737.600060] usb 4-1: new full speed USB device using uhci_hcd and address 2 [ 3737.800330] usb 4-1: configuration #1 chosen from 1 choice [ 3738.338375] Linux video capture interface: v2.00 [ 3738.381658] gspca: main v2.2.0 registered [ 3738.411220] gspca: probing 046d:092c [ 3738.472411] gspca: probe ok [ 3738.474574] usbcore: registered new interface driver spca561 [ 3738.475493] spca561: registered
carl@e18:~/vga2usb/dvgrab$ sudo lsusb -s 2 -v
Bus 004 Device 002: ID 046d:092c Logitech, Inc. QuickCam Chat
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x046d Logitech, Inc.
idProduct 0x092c QuickCam Chat
bcdDevice 0.00
iManufacturer 1
iProduct 2 Camera
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 233
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0370 1x 880 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0280 1x 640 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 5
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0300 1x 768 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 6
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0380 1x 896 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 7
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x03ff 1x 1023 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 8
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0220 1x 544 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 9
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0290 1x 656 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 10
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x02c0 1x 704 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 11
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0360 1x 864 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 12
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x03c0 1x 960 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 13
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x034d 1x 845 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)Carl K
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
2008/11/19 Jonathan McDowell <[email protected]>:
Quoted 246 lines · Jonathan McDowell
Quoted 23 lines · Jonathan McDowell
Quoted 13 lines · Erik Andrén
Quoted 6 lines
As I've written in an earlier mail I've taken a stab at porting over the old qc-usb driver to the gspca framework. The driver is nowhere complete but I've gotten it to work on my Quickcam Web using the vv6410 sensor. There is some untested support for the HDCS sensors but I need some testing on it (and probably some bug squashing).
Er, yeah, I'll say. ;) I don't have time to dig deeper tonight, but compiling up against 2.6.28-rc5 on
x86_64and trying with my Quickcam Express (HDCS 1020) gives the following on doing a "modprobe gspca-stv06xx":Quoted 6 lines
Linux video capture interface: v2.00
gspca: main v2.4.0 registered
STV06xx: Probing for a stv06xx device
gspca: probing 046d:0870
STV06xx: Configuring cameraBUG: unable to handle kernel NULL pointer dereference at 0000000000000000The below fixes that bit and I now get:
Quoted 8 lines
gspca: main v2.4.0 registered
STV06xx: Probing for a stv06xx device
gspca: probing 046d:0870
STV06xx: Configuring camera
usbcore: registered new interface driver STV06xx
STV06xx: registeredBut no sign of a
/dev/video0and nothing in/sys/class/video4linuxPatch below fixes a) the I2C address of the sensor and b) the fact that you can't compare the address of a struct that's defined in 2 separate places as static and get a useful result. It includes the previous
read_sensor0patch too.Successfully detects both a HDSC-1020 and a HDSC-1000/1100 and creates
/dev/video0Signed-off-by Jonathan McDowell <[email protected]>-----
diff -rd037630bbca6linux/drivers/media/video/gspca/stv06xx/stv06xx.clinux/drivers/media/video/gspca/stv06xx/stv06xx.c Wed Nov 19 07:48:28 2008 +0000 renamed from linux/drivers/media/video/gspca/stv06xx/stv06xx.c Tue Nov 18 18:50:20 2008 +0100 +2
-2@@ -407,11 +407,11 @@ if (!sd->sensor->probe(sd)) return 0; - sd->sensor = &hdcs1x00; + sd->sensor = &stv06xx_sensor_hdcs1x00; if (!sd->sensor->probe(sd)) return 0; - sd->sensor = &hdcs1020; + sd->sensor = &stv06xx_sensor_hdcs1020; if (!sd->sensor->probe(sd)) return 0;diff -r
d037630bbca6linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.clinux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c Wed Nov 19 07:48:28 2008 +0000 renamed from linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c Tue Nov 18 18:50:20 2008 +0100 +71
-11@@ -29,28 +29,28 @@ u8 sensor; int err; - err = stv06xx_read_sensor(sd, HDCS_IDENT, &sensor, 1); + err = stv06xx_read_sensor0(sd, HDCS_IDENT, &sensor); if (err < 0) return -ENODEV; - if ((sensor == 0x08) && (sd->sensor == &hdcs1x00)) { + if ((sensor == 0x08) && (sd->sensor == &stv06xx_sensor_hdcs1x00)) { info("HDCS-1000/1100 sensor detected"); - sd->gspca_dev.cam.cam_mode = hdcs1x00.modes; - sd->gspca_dev.cam.nmodes = hdcs1x00.nmodes; - sd->desc->ctrls = hdcs1x00.ctrls; - sd->desc->nctrls = hdcs1x00.nctrls; + sd->gspca_dev.cam.cam_mode = sd->sensor->modes; + sd->gspca_dev.cam.nmodes = sd->sensor->nmodes; + sd->desc->ctrls = sd->sensor->ctrls; + sd->desc->nctrls = sd->sensor->nctrls; return 0; } - if ((sensor == 0x10) && (sd->sensor == &hdcs1020)) { + if ((sensor == 0x10) && (sd->sensor == (&stv06xx_sensor_hdcs1020))) { info("HDCS-1020 sensor detected"); - sd->gspca_dev.cam.cam_mode = hdcs1020.modes; - sd->gspca_dev.cam.nmodes = hdcs1020.nmodes; - sd->desc->ctrls = hdcs1020.ctrls; - sd->desc->nctrls = hdcs1020.nctrls; + sd->gspca_dev.cam.cam_mode = sd->sensor->modes; + sd->gspca_dev.cam.nmodes = sd->sensor->nmodes; + sd->desc->ctrls = sd->sensor->ctrls; + sd->desc->nctrls = sd->sensor->nctrls; return 0; }@@ -181,3 +181,63 @@ { return 0; } + +struct stv06xx_sensor stv06xx_sensor_hdcs1x00 = { + .name = "HDCS-1000/1100", + .i2c_flush = 0, + .i2c_addr = HDCS_ADDR, + + .init = hdcs_init, + .probe = hdcs_probe, + .start = hdcs_start, + .stop = hdcs_stop, + .dump = hdcs_dump, + + .nctrls = 0, + .ctrls = {}, + + .nmodes = 1, + .modes = { + { + HDCS_1X00_DEF_WIDTH, + HDCS_1X00_DEF_HEIGHT, + V4L2_PIX_FMT_SBGGR8, + V4L2_FIELD_NONE, + .sizeimage = + HDCS_1X00_DEF_WIDTH * HDCS_1X00_DEF_HEIGHT, + .bytesperline = HDCS_1X00_DEF_WIDTH, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 1 + } + } +}; + +struct stv06xx_sensor stv06xx_sensor_hdcs1020 = { + .name = "HDCS-1020", + .i2c_flush = 0, + .i2c_addr = HDCS_ADDR, + + .nctrls = 0, + .ctrls = {}, + + .init = hdcs_init, + .probe = hdcs_probe, + .start = hdcs_start, + .stop = hdcs_stop, + .dump = hdcs_dump, + + .nmodes = 1, + .modes = { + { + HDCS_1020_DEF_WIDTH, + HDCS_1020_DEF_HEIGHT, + V4L2_PIX_FMT_SBGGR8, + V4L2_FIELD_NONE, + .sizeimage = + HDCS_1020_DEF_WIDTH * HDCS_1020_DEF_HEIGHT, + .bytesperline = HDCS_1020_DEF_WIDTH, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 1 + } + } +};diff -r
d037630bbca6linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.hlinux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h Wed Nov 19 07:48:28 2008 +0000 renamed from linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h Tue Nov 18 18:50:20 2008 +0100 +2
-55@@ -28,7 +28,7 @@ #include "stv06xx_sensor.h" /* I2C Address */ -#define HDCS_ADDR 0x55 +#define HDCS_ADDR (0x55 << 1) #define HDCS_1X00_DEF_WIDTH 360 #define HDCS_1X00_DEF_HEIGHT 296@@ -80,7 +80,7 @@ #define HDCS_SLEEP_MODE (1 << 1) #define IS_870(sd) ((sd)->gspca_dev.dev->descriptor.idProduct == 0x870) -#define IS_1020(sd) ((sd)->sensor == &hdcs1020) +#define IS_1020(sd) ((sd)->sensor == &stv06xx_sensor_hdcs1020) #define GET_CONTROL (IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL) int hdcs_probe(struct sd *sd);@@ -89,64 +89,7 @@ int hdcs_stop(struct sd *sd); int hdcs_dump(struct sd *sd); -static struct stv06xx_sensor hdcs1x00 = { - .name = "HDCS-1000/1100", - .i2c_flush = 0, - .i2c_addr = HDCS_ADDR, - - .init = hdcs_init, - .probe = hdcs_probe, - .start = hdcs_start, - .stop = hdcs_stop, - .dump = hdcs_dump, - - .nctrls = 0, - .ctrls = {}, - - .nmodes = 1, - .modes = { - { - HDCS_1X00_DEF_WIDTH, - HDCS_1X00_DEF_HEIGHT, - V4L2_PIX_FMT_SBGGR8, - V4L2_FIELD_NONE, - .sizeimage = - HDCS_1X00_DEF_WIDTH * HDCS_1X00_DEF_HEIGHT, - .bytesperline = HDCS_1X00_DEF_WIDTH, - .colorspace = V4L2_COLORSPACE_SRGB, - .priv = 1 - } - } -}; - -static struct stv06xx_sensor hdcs1020 = { - .name = "HDCS-1020", - .i2c_flush = 0, - .i2c_addr = HDCS_ADDR, - - .nctrls = 0, - .ctrls = {}, - - .init = hdcs_init, - .probe = hdcs_probe, - .start = hdcs_start, - .stop = hdcs_stop, - .dump = hdcs_dump, - - .nmodes = 1, - .modes = { - { - HDCS_1020_DEF_WIDTH, - HDCS_1020_DEF_HEIGHT, - V4L2_PIX_FMT_SBGGR8, - V4L2_FIELD_NONE, - .sizeimage = - HDCS_1020_DEF_WIDTH * HDCS_1020_DEF_HEIGHT,
linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h Wed Nov 19 07:48:28 2008 +0000 line 95
Quoted 10 lines
linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h Wed Nov 19 07:48:28 2008 +0000 renamed from linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.h Tue Nov 18 18:50:20 2008 +0100 +2
-6- .bytesperline = HDCS_1020_DEF_WIDTH, - .colorspace = V4L2_COLORSPACE_SRGB, - .priv = 1 - } - } -}; +extern struct stv06xx_sensor stv06xx_sensor_hdcs1x00; +extern struct stv06xx_sensor stv06xx_sensor_hdcs1020; #endif
Thanks, I'll try to apply it tonight.
Do you any image when testing with ekiga?
Regards,
Erik
Quoted 10 lines
-----
J.
--
101 things you can't have too much of : 48 - Pies.-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Quoted 16 lines
iQIVAwUBSSPFo/8WL8XPP7rRAQJZnw//Xq1N9MBjdLr5FJSa1l8zBM4n9i2yZ4V3 LGGY9fdPZxBomJ1A3AdMukq0rO46wlCV8lZakTB8VRDbr6brNx52rvRuCIff8jAF oEvInHwrJcACKzI+5Q7vhO6esWnVnXmkCXsagw60gjFwV/I7ocYBh+jV88wf4E+U hs8AVksCEajJ6HKf3iqYBNEqNtAdIWhmQxeoizaGKoYfdUaUOU5RK2Yb2zbn9ZXR cMw9o3IR6q8A3LtombxWiAGMJjZB39vCKwEDRQCIGJenC+JmsnboEwayR8st9QGT YHAoicnDr5nZqkZ0WHKLGjOooeNySpPP5sN25Jvve04PDyH/RpYNMaANc3na/dCP JH7Hk2x1eb/mWk3k661V4Zx8iQZtvCvA021uyckK0KZ1tfVp7gSkg2gJeRaskV/R OI80zUAy0ZrUufP9onNHprVO2spxotDbXc3NVEtc84qnpDcqZb4jLgVV1d0IZfhC ld/duVDWVdPcOZH1kfFkp9gzNmb6I9gpDoHejCa3cMy+72p96v/de5vGzT7KGgPx xQmvp7hAnTYRpWx25DGm8IlS1PTJ3hA9gWTFeo8bx3dpD8xFLE78Q9fpwN83eh6w KbcxjTr+uasKOzz2Ih6rW+k4fs+ryC823Tp9ikN/sd4bW/8zzlN0OHp42lf11HvO 8d/9kNzjPuM=
=NYq+
-----END PGP SIGNATURE-----
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list