Fwd: [hg:v4l-dvb] gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.

205 views
Skip to first unread message

Brian Johnson

unread,
Jul 19, 2009, 5:31:06 PM7/19/09
to micr...@googlegroups.com
Well ts been a little while but i've finally got the gspca patch for
sn9c20x webcams into the main v4l-dvb repository. From what i've been
told this patch should make it into 2.6.31 as well so the next kernel
release should finally have support for sn9c20x webcams. :-)

The major change to the last patch i had posted here was removing the
debugfs code and replacing it with the v4l2 get and set register
ioctls. For debugging you can now use the v4l2-dbg utility that is
part of the v4l-dvb repository to view and set registers on the
camera.

Gwater, Have you been able to figure out what exactly was wrong with
your camera under the gspca version?

Brian Johnson

---------- Forwarded message ----------
From: Patch from Brian Johnson <hg-c...@linuxtv.org>
Date: Sun, Jul 19, 2009 at 4:50 PM
Subject: [hg:v4l-dvb] gspca - sn9c20x: New subdriver for sn9c201 and
sn9c202 bridges.
To: linuxtv...@linuxtv.org
Cc: Brian Johnson <bri...@gmail.com>, Jean-Francois Moine <moi...@free.fr>


The patch number 12283 was added via Jean-Francois Moine <moi...@free.fr>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
       Linux Media Mailing List <linux...@vger.kernel.org>

------

From: Brian Johnson  <bri...@gmail.com>
gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.


Priority: high

Signed-off-by: Brian Johnson <bri...@gmail.com>
Signed-off-by: Jean-Francois Moine <moi...@free.fr>


---

 linux/Documentation/video4linux/gspca.txt |   32
 linux/drivers/media/video/gspca/Kconfig   |   16
 linux/drivers/media/video/gspca/Makefile  |    2
 linux/drivers/media/video/gspca/sn9c20x.c | 2433 ++++++++++++++++++++++
 linux/include/linux/videodev2.h           |    1
 linux/include/media/v4l2-chip-ident.h     |   12
 6 files changed, 2496 insertions(+)

<diff discarded since it is too big>

---

Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/122d4e155f946e919c0ddf3f730202815559a429

Vasily Khoruzhick

unread,
Jul 19, 2009, 5:38:29 PM7/19/09
to micr...@googlegroups.com
On Monday 20 July 2009 00:31:06 Brian Johnson wrote:
> Well ts been a little while but i've finally got the gspca patch for
> sn9c20x webcams into the main v4l-dvb repository. From what i've been
> told this patch should make it into 2.6.31 as well so the next kernel
> release should finally have support for sn9c20x webcams. :-)

Cool, thank you for your work ;)

Regards
Vasily

signature.asc

Josua Grawitter

unread,
Jul 20, 2009, 10:19:35 AM7/20/09
to micr...@googlegroups.com
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---

Great news, I'll checkout their current HEAD and report the results.

GWater

signature.asc

Brian Johnson

unread,
Jul 28, 2009, 11:52:34 AM7/28/09
to micr...@googlegroups.com
Update:

Well the code as of yesterday is finally in Linus' kernel tree so
2.6.31 will have support for sn9c20x webcams.

GWater, have you tested the current driver in the v4l-dvb repo yet?

Josua Grawitter

unread,
Jul 28, 2009, 3:23:38 PM7/28/09
to micr...@googlegroups.com
Don't you get my mails?

I've been telling you several times:
I don't get a stream. That's it. No video stream. I have no idea why - the old
driver still works fine.

GWater

signature.asc

Brian Johnson

unread,
Jul 28, 2009, 3:43:48 PM7/28/09
to micr...@googlegroups.com
The last email i've seen from you was the previous one and this thread
where you said you would check out the HEAD and report the results. If
you've sent others i have not seen them.

Did you try turning on debug messages in gspca? you can do so with the
debug=0x100 parameter for the gspca_main module. I'd like to see if
the v4l ioctl calls look at all normal.

Josua Grawitter

unread,
Jul 28, 2009, 4:13:53 PM7/28/09
to micr...@googlegroups.com
Here you go:

gspca: main v2.7.0 registered
usbcore: registered new interface driver sn9c20x
sn9c20x: registered
usb 1-4: new high speed USB device using ehci_hcd and address 5
usb 1-4: New USB device found, idVendor=0c45, idProduct=624e
usb 1-4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-4: Product: USB20 Camera
usb 1-4: configuration #1 chosen from 1 choice
input: SN9C20X Webcam as /devices/pci0000:00/0000:00:02.1/usb1/1-4/input/input7
sn9c20x: SOI968 sensor detected
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_G_FMT type=vid-cap
gspca main driver: width=640, height=480, format=S920, field=none, bytesperline=960 sizeimage=460800, colorspace=8
gspca main driver: VIDIOC_ENUM_FMT index=0, type=1, flags=0, pixelformat=S920, description='S920'
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=808597843, type=0 <7>gspca main driver: - Unknown type!
gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT index=1, type=1, flags=0, pixelformat=BA81, description='BA81'
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=825770306, type=0 <7>gspca main driver: - Unknown type!
gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT index=2, type=1, flags=1, pixelformat=JPEG, description='JPEG'
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=1195724874, type=0 <7>gspca main driver: - Unknown type!
gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT error -22
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_G_STD std=0x00000000
gspca main driver: VIDIOC_ENUMINPUT index=0, name=sn9c20x, type=2, audioset=0, tuner=0, std=00000000, status=0
gspca main driver: VIDIOC_ENUMINPUT error -22
gspca main driver: VIDIOC_G_INPUT value=0
gspca main driver: VIDIOC_ENUM_FMT index=0, type=1, flags=0, pixelformat=S920, description='S920'
gspca main driver: VIDIOC_ENUM_FMT index=1, type=1, flags=0, pixelformat=BA81, description='BA81'
gspca main driver: VIDIOC_ENUM_FMT index=2, type=1, flags=1, pixelformat=JPEG, description='JPEG'
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=S920, field=none, bytesperline=960 sizeimage=460800, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=BA81, field=none, bytesperline=640 sizeimage=307200, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=JPEG, field=none, bytesperline=960 sizeimage=460800, colorspace=7
gspca main driver: VIDIOC_S_FMT type=vid-cap
gspca main driver: width=640, height=480, format=JPEG, field=none, bytesperline=960 sizeimage=460800, colorspace=7
gspca main driver: VIDIOC_ENUMINPUT index=0, name=sn9c20x, type=2, audioset=0, tuner=0, std=00000000, status=0
gspca main driver: VIDIOC_S_INPUT value=0
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=320, height=240, format=S920, field=none, bytesperline=480 sizeimage=115200, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=320, height=240, format=BA81, field=none, bytesperline=320 sizeimage=76800, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=JPEG, field=none, bytesperline=960 sizeimage=460800, colorspace=7
gspca main driver: VIDIOC_S_FMT type=vid-cap
gspca main driver: width=320, height=240, format=S920, field=none, bytesperline=480 sizeimage=115200, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=320, height=240, format=S920, field=none, bytesperline=480 sizeimage=115200, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=320, height=240, format=BA81, field=none, bytesperline=320 sizeimage=76800, colorspace=8
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=JPEG, field=none, bytesperline=960 sizeimage=460800, colorspace=7
gspca main driver: VIDIOC_REQBUFS count=2, type=vid-cap, memory=mmap
gspca main driver: VIDIOC_QUERYBUF 00:00:00.00000000 index=0, type=vid-cap, bytesused=0, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x00000000, length=118784
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_QUERYBUF 00:00:00.00000000 index=0, type=vid-cap, bytesused=0, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x00000000, length=118784
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_QUERYBUF 00:00:00.00000000 index=1, type=vid-cap, bytesused=0, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x0001d000, length=118784
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_QBUF 00:00:00.00000000 index=0, type=vid-cap, bytesused=0, flags=0x00000002, field=1, sequence=0, memory=mmap, offset/userptr=0xabcdef00, length=16777216
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_QUERYBUF 00:00:00.00000000 index=1, type=vid-cap, bytesused=0, flags=0x00000001, field=1, sequence=0, memory=mmap, offset/userptr=0x0001d000, length=118784
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_QBUF 00:00:00.00000000 index=1, type=vid-cap, bytesused=0, flags=0x00000002, field=1, sequence=0, memory=mmap, offset/userptr=0xabcdef01, length=16777216
gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980909, value=0
gspca main driver: VIDIOC_S_CTRL error -22
gspca main driver: VIDIOC_QUERYCTRL id=0x980900, type=1, name=Brightness, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980900, value=127
gspca main driver: VIDIOC_QUERYCTRL id=0x980903, type=1, name=Hue, min/max=-180/180, step=1, default=0, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980903, value=0
gspca main driver: VIDIOC_QUERYCTRL id=0x980902, type=1, name=Saturation, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980902, value=127
gspca main driver: VIDIOC_QUERYCTRL id=0x980901, type=1, name=Contrast, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980901, value=127
gspca main driver: VIDIOC_STREAMON type=vid-cap
sn9c20x: Set 320x240
gspca main driver: VIDIOC_STREAMOFF type=vid-cap
gspca main driver: VIDIOC_DQBUF error -22
gspca main driver: VIDIOC_S_CTRL id=0x980909, value=1
gspca main driver: VIDIOC_S_CTRL error -22

GWater

signature.asc

Brian Johnson

unread,
Jul 28, 2009, 8:42:37 PM7/28/09
to micr...@googlegroups.com
GWater,

Ok sure seems that the DQBUF ioctl isn;t getting called so no video stream.

However it also seems you are using the gspca_sn9c20x module with an
older version of the whole v4l subsystem. Please make sure to unload
all v4l related module and use the ones that are compiled when you
compile the hg v4l-dvb repository. The following modules should be the
main v4l modules you need to make sure to use the latest version of
gspca_sn9c20x
gspca_main
videodev
v4l1-compat

Don't know if this will actually fix things but you probably shouldn't
be mixing module versions just to be safe.
If things stil don't work after doing that post the new debugging log
and i'll take another look.

Josua Grawitter

unread,
Jul 29, 2009, 2:50:35 AM7/29/09
to micr...@googlegroups.com
OK,
this time I reloaded all video related modeles (inculuding videodev, v4l2-common, etc).
This time the mplayer window went black - so there was a stream, just not a lot of imagery.
(I even got one of those broken JPEG frames when I first tried, but I didn't log that. And it was really just one frame.)

This makes a problem in the sensopr setup likely - what is keeping us from implementing autogain?

// Loading all v4l modules

Linux video capture interface: v2.00
gspca: main v2.7.0 registered


input: SN9C20X Webcam as /devices/pci0000:00/0000:00:02.1/usb1/1-4/input/input7
sn9c20x: SOI968 sensor detected

usbcore: registered new interface driver sn9c20x
sn9c20x: registered

gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001

// Running mplayer

gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_G_FMT type=vid-cap

gspca main driver: width=320, height=240, format=S920, field=none, bytesperline=480 sizeimage=115200, colorspace=8

gspca main driver: VIDIOC_ENUM_FMT index=0, type=1, flags=0, pixelformat=S920, description='S920'

gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=S920, type=1 gspca main driver: width = 160, height=120
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=1, pixelformat=S920, type=1 gspca main driver: width = 320, height=240
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=2, pixelformat=S920, type=1 gspca main driver: width = 640, height=480
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=3, pixelformat=S920, type=0 gspca main driver: - Unknown type!


gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT index=1, type=1, flags=0, pixelformat=BA81, description='BA81'

gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=BA81, type=1 gspca main driver: width = 160, height=120
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=1, pixelformat=BA81, type=1 gspca main driver: width = 320, height=240
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=2, pixelformat=BA81, type=1 gspca main driver: width = 640, height=480
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=3, pixelformat=BA81, type=0 gspca main driver: - Unknown type!


gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT index=2, type=1, flags=1, pixelformat=JPEG, description='JPEG'

gspca main driver: VIDIOC_ENUM_FRAMESIZES index=0, pixelformat=JPEG, type=1 gspca main driver: width = 160, height=120
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=1, pixelformat=JPEG, type=1 gspca main driver: width = 320, height=240
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=2, pixelformat=JPEG, type=1 gspca main driver: width = 640, height=480
gspca main driver: VIDIOC_ENUM_FRAMESIZES index=3, pixelformat=JPEG, type=0 gspca main driver: - Unknown type!


gspca main driver: VIDIOC_ENUM_FRAMESIZES error -22
gspca main driver: VIDIOC_ENUM_FMT error -22
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_QUERYCAP driver=sn9c20x, card=USB20 Camera , bus=usb-0000:00:02.1-4, version=0x00020700, capabilities=0x05000001
gspca main driver: VIDIOC_G_STD std=0x00000000
gspca main driver: VIDIOC_ENUMINPUT index=0, name=sn9c20x, type=2, audioset=0, tuner=0, std=00000000, status=0
gspca main driver: VIDIOC_ENUMINPUT error -22
gspca main driver: VIDIOC_G_INPUT value=0
gspca main driver: VIDIOC_ENUM_FMT index=0, type=1, flags=0, pixelformat=S920, description='S920'
gspca main driver: VIDIOC_ENUM_FMT index=1, type=1, flags=0, pixelformat=BA81, description='BA81'
gspca main driver: VIDIOC_ENUM_FMT index=2, type=1, flags=1, pixelformat=JPEG, description='JPEG'
gspca main driver: VIDIOC_TRY_FMT type=vid-cap
gspca main driver: width=640, height=480, format=S920, field=none, bytesperline=960 sizeimage=460800, colorspace=8

gspca main driver: VIDIOC_S_FMT type=vid-cap

gspca main driver: VIDIOC_QUERYBUF 1193:00:06.00420181 index=0, type=vid-cap, bytesused=115264, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QUERYBUF 1193:00:06.00420181 index=0, type=vid-cap, bytesused=115264, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QUERYBUF 1193:00:06.00076234 index=1, type=vid-cap, bytesused=115264, flags=0x00000000, field=1, sequence=0, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:06.00420181 index=0, type=vid-cap, bytesused=115264, flags=0x00000002, field=1, sequence=0, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QUERYBUF 1193:00:06.00076234 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=0, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:06.00076234 index=1, type=vid-cap, bytesused=115264, flags=0x00000002, field=1, sequence=0, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980909, value=0
gspca main driver: VIDIOC_S_CTRL error -22
gspca main driver: VIDIOC_QUERYCTRL id=0x980900, type=1, name=Brightness, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980900, value=127
gspca main driver: VIDIOC_QUERYCTRL id=0x980903, type=1, name=Hue, min/max=-180/180, step=1, default=0, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980903, value=0
gspca main driver: VIDIOC_QUERYCTRL id=0x980902, type=1, name=Saturation, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980902, value=127
gspca main driver: VIDIOC_QUERYCTRL id=0x980901, type=1, name=Contrast, min/max=0/255, step=1, default=127, flags=0x00000000
gspca main driver: VIDIOC_S_CTRL id=0x980901, value=127
gspca main driver: VIDIOC_STREAMON type=vid-cap
sn9c20x: Set 320x240

gspca main driver: VIDIOC_DQBUF 1193:00:14.00065019 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=1, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:14.00065019 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=1, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:14.00412966 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=2, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:14.00412966 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=2, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:14.00759914 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=3, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:14.00759914 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=3, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:15.00107861 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=4, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:15.00107861 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=4, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:15.00455808 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=5, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:15.00455808 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=5, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:15.00799755 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=6, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:15.00799755 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=6, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:16.00147703 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=7, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:16.00147703 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=7, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:16.00495650 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=8, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:16.00495650 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=8, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:16.00843597 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=9, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:16.00843597 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=9, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:17.00191544 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=10, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:17.00191544 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=10, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:17.00539491 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=11, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:17.00539491 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=11, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:17.00887438 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=12, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:17.00887438 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=12, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:18.00231386 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=13, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:18.00231386 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=13, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:18.00579333 index=1, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=14, memory=mmap, offset/userptr=0x0001d000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:18.00579333 index=1, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=14, memory=mmap, offset/userptr=0xabcdef01, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_DQBUF 1193:00:18.00927280 index=0, type=vid-cap, bytesused=115264, flags=0x00000001, field=1, sequence=15, memory=mmap, offset/userptr=0x00000000, length=118784


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_QBUF 1193:00:18.00927280 index=0, type=vid-cap, bytesused=115200, flags=0x00000003, field=1, sequence=15, memory=mmap, offset/userptr=0xabcdef00, length=16777216


gspca main driver: timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000

gspca main driver: VIDIOC_STREAMOFF type=vid-cap
gspca main driver: VIDIOC_DQBUF error -22
gspca main driver: VIDIOC_S_CTRL id=0x980909, value=1
gspca main driver: VIDIOC_S_CTRL error -22

GWater

signature.asc

Brian Johnson

unread,
Jul 29, 2009, 9:31:51 AM7/29/09
to micr...@googlegroups.com
Ok there are some things i want you to try to see what values are
getting set. first apply the attached patch will add some out when
setting either exposure or gain and then recompile and reload the
gspca_sn9c20x module you shouldn't need to turn on the debugging this
time.

Once you reload the module open up v4l2ucp and set to to update the
controls every second. now start mplayer and chec to see if the
exposure value in v4l2ucp is actually increaseing it should slowly
increase until as exposure gets adjusted does it? next try increasing
the gain control in v4l2ucp and see if there is any noticable
difference in your picture. Now you can close mplayer and then check
your dmesg log to make sure all the exposure and gain changes actually
worked with no errors logged. Finally use v4l2-dbg to check the value
of registers 0x00, 0x2d and 0x2e. v4l2-dbg is located under the
v4l2-apps directory in the v4l-dvb checkout. just go there and type
make when finished check under the util directory for the executable.
You can request the contents of a sensor register using the followin

# sudo ./v4l2-dbg --chip=<i2c addr> --get-register=<register>

Now let me know the contents of the three registers as well as what
values are currently listed in v4l2ucp for both gain and exposure.

test.patch
Reply all
Reply to author
Forward
0 new messages