(Patch) Please test this & tell us - Seperate 627b start-stream into bridge & sensor functions

8 views
Skip to first unread message

Ni-62 metal

unread,
Aug 24, 2008, 11:07:06 AM8/24/08
to micr...@googlegroups.com
Hello

I have finished doing the following:-
Seperate 627b start-stream into bridge & sensor functions
- Adds functions to control OV7660 series Image Sensors
- Adds functions to initialize Sn9C20x series micro-controllers/bridges

Signed-off-by: Neekhil <Nickel...@Gmail.com>

All users please help test this patch.
apply this patch via git am like below, (get a copy of driver source &
copy the patch in the same directory)

$ git am ./0004-Seperate-627b-start-stream-into-bridge-sensor-func.patch

Note: this applies cleanly on top of commit
c68ab53ff8f2c5e3969731fd7e3b1e6b6fe235bd

We can now start using the same base Bridge(SN9C20x) sequences,
and let only model specific sequences remain in the various init/start streams.

Brightness/contrast/exposure on 627b
The default settings aren't correct in natural & artificial lighting,
hence you need to test it with the following software

Universal control panel for v4l2 devices (As suggested by Brian)
get your binary packages here,
http://www.debian-multimedia.org/dists/stable/main/binary-i386/package/v4l2ucp.php
or here,
http://www.debian-multimedia.org/dists/stable/main/binary-amd64/package/v4l2ucp.php
launch this software by executing the following command $ v4l2ucp

With this GUI software you can adjust the picture quality without
mucking around with the command line/debugfs !

I also request developers (who own NON 627b webcams) to test if this
patch breaks their webcams's
if not, please confirm & go ahead and push this patch to main repo. So
that I can finish the checkpatch cleanup that I started earlier on top
of this commit.

Brian, can you suggest what to do to support resolution switching
scaling patch you posted earlier on top of this reduces start stream
sequence.

Neekhil

0004-Seperate-627b-start-stream-into-bridge-sensor-func.patch

GWater

unread,
Aug 24, 2008, 12:37:27 PM8/24/08
to micr...@googlegroups.com
Ni-62 metal schrieb:
I'd really like to use this app but the configure script always stops
with this message:

checking for Qt... yes:
QT_CXXFLAGS=-I/usr/lib64/qt-3.3/include -DQT_THREAD_SUPPORT
QT_DIR=/usr/lib64/qt-3.3
QT_LIBS=-L/usr/lib64/qt-3.3/lib -lqt-mt -lSM -lICE -L/usr/lib64
-lX11 -lXext -lXmu -lXt -lXi
QT_UIC=/usr/lib64/qt-3.3/bin/uic
QT_MOC=/usr/lib64/qt-3.3/bin/moc
checking correct functioning of Qt installation... failure
configure: error: Failed to find matching components of a complete
Qt installation. Try using more options,
see ./configure --help.


If anybody knows which part of QT is missing I could probably solve it
but I really don't understand what problem it has.

GWater

JoJo jojo

unread,
Aug 24, 2008, 1:32:41 PM8/24/08
to micr...@googlegroups.com
Hi Greywater

Does the attached package work for you ?

You will need Qt3.x & Qt-devel packages installed as well i suppose

-JoJo

v4l2ucp-1.2-1.1.x86_64.rpm

GWater

unread,
Aug 24, 2008, 1:40:47 PM8/24/08
to micr...@googlegroups.com
JoJo jojo schrieb:
Works like a charm - thanks alot.

GWater

GWater

unread,
Aug 24, 2008, 1:42:45 PM8/24/08
to micr...@googlegroups.com
JoJo jojo schrieb:
BTW development packages were installed for both, qt3 and qt4.

GWater

JoJo jojo

unread,
Aug 24, 2008, 1:52:19 PM8/24/08
to micr...@googlegroups.com
Probably a PATH issue, check the configure file.

and ofcourse, I used alien to convert this simple package *.deb to *.rpm ;-)

-JoJo

Rpnpif

unread,
Aug 25, 2008, 5:49:19 AM8/25/08
to micr...@googlegroups.com
Le dimanche 24 août 2008, Ni-62 metal a écrit :
> Hello
>
> I have finished doing the following:-
> Seperate 627b start-stream into bridge & sensor functions
> - Adds functions to control OV7660 series Image Sensors
> - Adds functions to initialize Sn9C20x series micro-controllers/bridges
>
> Signed-off-by: Neekhil <Nickel...@Gmail.com>
>
> All users please help test this patch.
> apply this patch via git am like below, (get a copy of driver source &
> copy the patch in the same directory)
>
> $ git am ./0004-Seperate-627b-start-stream-into-bridge-sensor-func.patch
>
> Note: this applies cleanly on top of commit
> c68ab53ff8f2c5e3969731fd7e3b1e6b6fe235bd
>
> We can now start using the same base Bridge(SN9C20x) sequences,
> and let only model specific sequences remain in the various init/start
> streams.
>
> Brightness/contrast/exposure on 627b
> The default settings aren't correct in natural & artificial lighting,
> hence you need to test it with the following software
>
> Universal control panel for v4l2 devices (As suggested by Brian)
> get your binary packages here,
> http://www.debian-multimedia.org/dists/stable/main/binary-i386/package/v4l2
>ucp.php or here,
> http://www.debian-multimedia.org/dists/stable/main/binary-amd64/package/v4l
>2ucp.php launch this software by executing the following command $ v4l2ucp

>
> With this GUI software you can adjust the picture quality without
> mucking around with the command line/debugfs !
>
> I also request developers (who own NON 627b webcams) to test if this
> patch breaks their webcams's
> if not, please confirm & go ahead and push this patch to main repo. So
> that I can finish the checkpatch cleanup that I started earlier on top
> of this commit.
>
> Brian, can you suggest what to do to support resolution switching
> scaling patch you posted earlier on top of this reduces start stream
> sequence.
>
> Neekhil

Hello,

With this patch, I have now no image on my 627b webcam.
gqcam said :
Sometimes a white picture is shown without errors.
And other times a black picture and these messages :
grab_image: incorrect input_type 135691536
Error reading image...
Without this patch I had an image, very bad but an image.


Note that with or without this patch my webcam does not work under mplayer
with a green image and the errors :
microdia: isoc_init() submit_urb 194 failed with error -27

--
Alain rpnpif

Tomasz Torcz

unread,
Aug 25, 2008, 12:14:56 PM8/25/08
to microdia


On 24 Sie, 17:07, "Ni-62 metal" <nickel62me...@gmail.com> wrote:
> I have finished doing the following:-
> Seperate 627b start-stream into bridge & sensor functions
>  - Adds functions to control OV7660 series Image Sensors
>  - Adds functions to initialize Sn9C20x series micro-controllers/bridges
>
> All users please help test this patch.
>

Doesn't work for me (Thinkpad z61t) :(
Without the patch I have good picture with mplayer and
distorted with Cheese.
With path I got only green screen in mplayer and cheese doesn't
show anything except gnome foot (aka spinner).

Some outputs:
1) loading module with log_level=8 and starting mplayer:
[ 4916.754441] microdia: Probe function called with VendorID=0C45,
ProductID=627B and InterfaceNumber=0
[ 4916.756266] microdia: Set mode [640x480]
[ 4916.756962] usbcore: registered new interface driver
usb_microdia_driver
[ 4916.816347] microdia: v4l_microdia_ioctl 00
[ 4916.816357] microdia: VIDIOC_QUERYCAP
[ 4916.816360] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCAP,
dir=r- (0x80685600)
[ 4916.816366] Microdia USB Video Camera: driver=microdia,
card=Microdia USB Video Camera, bus=usb-0000:00:1d.7-7,
version=0x00000000, capabilities=0x05000001
[ 4916.817012] microdia: v4l_microdia_ioctl 01
[ 4916.817017] microdia: VIDIOC_QUERYCAP
[ 4916.817021] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCAP,
dir=r- (0x80685600)
[ 4916.817026] Microdia USB Video Camera: driver=microdia,
card=Microdia USB Video Camera, bus=usb-0000:00:1d.7-7,
version=0x00000000, capabilities=0x05000001
[ 4916.817031] microdia: VIDIOC_ENUMINPUT 0
[ 4916.817034] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUMINPUT,
dir=rw (0xc04c561a)
[ 4916.817041] Microdia USB Video Camera: index=0, name=Webcam,
type=2, audioset=0, tuner=0, std=0, status=0
[ 4916.817044] microdia: VIDIOC_ENUMINPUT 1
[ 4916.817047] Microdia USB Video Camera: err:
[ 4916.817049] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUMINPUT,
dir=rw (0xc04c561a)
[ 4916.817055] microdia: VIDIOC_ENUM_FMT 0
[ 4916.817058] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUM_FMT,
dir=rw (0xc0405602)
[ 4916.817064] Microdia USB Video Camera: index=0, type=1, flags=0,
pixelformat=YU12, description='YU12'
[ 4916.817069] Microdia USB Video Camera: v4l2 ioctl VIDIOC_TRY_FMT,
dir=rw (0xc0cc5640)
[ 4916.817075] Microdia USB Video Camera: type=video-cap
[ 4916.817078] microdia: TRY FMT 1
[ 4916.817082] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.904571] microdia: v4l_microdia_ioctl 00
[ 4934.904579] microdia: VIDIOC_QUERYCAP
[ 4934.904583] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCAP,
dir=r- (0x80685600)
[ 4934.904588] Microdia USB Video Camera: driver=microdia,
card=Microdia USB Video Camera, bus=usb-0000:00:1d.7-7,
version=0x00000000, capabilities=0x05000001
[ 4934.905294] microdia: v4l_microdia_ioctl 04
[ 4934.905404] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.905409] Microdia USB Video Camera: type=video-cap
[ 4934.905411] microdia: GET FMT 1
[ 4934.905413] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=none, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.905944] microdia: v4l_microdia_ioctl 17
[ 4934.905947] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_STD,
dir=r- (0x80085617)
[ 4934.905950] Microdia USB Video Camera: value=0
[ 4934.906291] microdia: v4l_microdia_ioctl 19
[ 4934.906523] microdia: v4l_microdia_ioctl 19
[ 4934.906697] microdia: v4l_microdia_ioctl 1A
[ 4934.906807] microdia: VIDIOC_ENUMINPUT 0
[ 4934.906809] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUMINPUT,
dir=rw (0xc04c561a)
[ 4934.906813] Microdia USB Video Camera: index=0, name=Webcam,
type=2, audioset=0, tuner=0, std=0, status=0
[ 4934.907267] microdia: v4l_microdia_ioctl 1A
[ 4934.907377] microdia: VIDIOC_ENUMINPUT 1
[ 4934.907380] Microdia USB Video Camera: err:
[ 4934.907381] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUMINPUT,
dir=rw (0xc04c561a)
[ 4934.907727] microdia: v4l_microdia_ioctl 26
[ 4934.907730] microdia: GET INPUT 4934
[ 4934.907731] Microdia USB Video Camera: err:
[ 4934.907733] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_INPUT,
dir=r- (0x80045626)
[ 4934.908233] microdia: v4l_microdia_ioctl 02
[ 4934.908350] microdia: VIDIOC_ENUM_FMT 0
[ 4934.908353] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUM_FMT,
dir=rw (0xc0405602)
[ 4934.908357] Microdia USB Video Camera: index=0, type=1, flags=0,
pixelformat=YU12, description='YU12'
[ 4934.908793] microdia: v4l_microdia_ioctl 02
[ 4934.908898] microdia: VIDIOC_ENUM_FMT 1
[ 4934.908901] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUM_FMT,
dir=rw (0xc0405602)
[ 4934.908904] Microdia USB Video Camera: index=1, type=1, flags=0,
pixelformat=BGR3, description='BGR3'
[ 4934.909344] microdia: v4l_microdia_ioctl 02
[ 4934.909481] microdia: VIDIOC_ENUM_FMT 2
[ 4934.909485] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUM_FMT,
dir=rw (0xc0405602)
[ 4934.909489] Microdia USB Video Camera: index=2, type=1, flags=0,
pixelformat=RGB3, description='RGB3'
[ 4934.910071] microdia: v4l_microdia_ioctl 02
[ 4934.910252] microdia: VIDIOC_ENUM_FMT 3
[ 4934.910257] Microdia USB Video Camera: err:
[ 4934.910259] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUM_FMT,
dir=rw (0xc0405602)
[ 4934.910894] microdia: v4l_microdia_ioctl 04
[ 4934.911148] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.911157] Microdia USB Video Camera: type=video-cap
[ 4934.911160] microdia: GET FMT 1
[ 4934.911163] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=none, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.911951] microdia: v4l_microdia_ioctl 05
[ 4934.912185] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.912193] Microdia USB Video Camera: type=video-cap
[ 4934.912196] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=none, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.912200] microdia: SET FMT 1 : 842093913
[ 4934.912818] microdia: TRY FMT 1
[ 4934.914030] microdia: Set mode [640x480]
[ 4934.914407] microdia: v4l_microdia_ioctl 04
[ 4934.914621] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.914629] Microdia USB Video Camera: type=video-cap
[ 4934.914632] microdia: GET FMT 1
[ 4934.914635] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=none, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.915383] microdia: v4l_microdia_ioctl 05
[ 4934.915531] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.915537] Microdia USB Video Camera: type=video-cap
[ 4934.915540] Microdia USB Video Camera: width=640, height=480,
format=YV12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.915544] microdia: SET FMT 1 : 842094169
[ 4934.915546] microdia: TRY FMT 1
[ 4934.915548] Microdia USB Video Camera: err:
[ 4934.915549] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.917096] microdia: v4l_microdia_ioctl 04
[ 4934.917104] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.917108] Microdia USB Video Camera: type=video-cap
[ 4934.917110] microdia: GET FMT 1
[ 4934.917113] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=none, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.917119] microdia: v4l_microdia_ioctl 05
[ 4934.917121] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.917124] Microdia USB Video Camera: type=video-cap
[ 4934.917127] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.917130] microdia: SET FMT 1 : 842093913
[ 4934.917132] microdia: TRY FMT 1
[ 4934.920749] microdia: Set mode [640x480]
[ 4934.920765] microdia: v4l_microdia_ioctl 1A
[ 4934.920768] microdia: VIDIOC_ENUMINPUT 0
[ 4934.920770] Microdia USB Video Camera: v4l2 ioctl VIDIOC_ENUMINPUT,
dir=rw (0xc04c561a)
[ 4934.920777] Microdia USB Video Camera: index=0, name=Webcam,
type=2, audioset=0, tuner=0, std=0, status=0
[ 4934.920780] microdia: v4l_microdia_ioctl 27
[ 4934.920783] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_INPUT,
dir=rw (0xc0045627)
[ 4934.920786] Microdia USB Video Camera: value=0
[ 4934.920788] microdia: SET INPUT 0
[ 4934.920792] microdia: v4l_microdia_ioctl 19
[ 4934.920913] microdia: v4l_microdia_ioctl 19
[ 4934.920994] microdia: v4l_microdia_ioctl 04
[ 4934.920997] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.921007] Microdia USB Video Camera: type=video-cap
[ 4934.921011] microdia: GET FMT 1
[ 4934.921016] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.921021] microdia: v4l_microdia_ioctl 05
[ 4934.921024] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.921029] Microdia USB Video Camera: type=video-cap
[ 4934.921034] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.921038] microdia: SET FMT 1 : 842093913
[ 4934.921041] microdia: TRY FMT 1
[ 4934.922242] microdia: Set mode [640x480]
[ 4934.922246] microdia: v4l_microdia_ioctl 04
[ 4934.922249] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.922256] Microdia USB Video Camera: type=video-cap
[ 4934.922259] microdia: GET FMT 1
[ 4934.922262] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.922267] microdia: v4l_microdia_ioctl 05
[ 4934.922269] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_FMT,
dir=rw (0xc0cc5605)
[ 4934.922275] Microdia USB Video Camera: type=video-cap
[ 4934.922279] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.922283] microdia: SET FMT 1 : 842093913
[ 4934.922286] microdia: TRY FMT 1
[ 4934.923605] microdia: Set mode [640x480]
[ 4934.923659] microdia: v4l_microdia_ioctl 04
[ 4934.923662] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.923666] Microdia USB Video Camera: type=video-cap
[ 4934.923669] microdia: GET FMT 1
[ 4934.923673] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.923679] microdia: v4l_microdia_ioctl 04
[ 4934.923683] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.923687] Microdia USB Video Camera: type=video-cap
[ 4934.923690] microdia: GET FMT 1
[ 4934.923694] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.923698] microdia: v4l_microdia_ioctl 04
[ 4934.923700] Microdia USB Video Camera: v4l2 ioctl VIDIOC_G_FMT,
dir=rw (0xc0cc5604)
[ 4934.923705] Microdia USB Video Camera: type=video-cap
[ 4934.923708] microdia: GET FMT 1
[ 4934.923711] Microdia USB Video Camera: width=640, height=480,
format=YU12, field=any, bytesperline=960 sizeimage=460800,
colorspace=8
[ 4934.923727] microdia: v4l_microdia_ioctl 08
[ 4934.924421] Microdia USB Video Camera: v4l2 ioctl VIDIOC_REQBUFS,
dir=rw (0xc0145608)
[ 4934.924427] Microdia USB Video Camera: count=2, type=video-cap,
memory=mmap
[ 4934.924432] microdia: v4l_microdia_ioctl 09
[ 4934.924435] microdia: QUERY BUFFERS 0 2
[ 4934.924438] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYBUF,
dir=rw (0xc0445609)
[ 4934.924446] Microdia USB Video Camera: 00:00:00.00000000 index=0,
type=video-cap, bytesused=0, flags=0x00000000, field=1, sequence=0,
memory=mmap, offset/userptr=0x00000000, length=3932160
[ 4934.924451] Microdia USB Video Camera: timecode= 00:00:00 type=0,
flags=0x00000000, frames=0, userbits=0x00000000
[ 4934.924836] microdia: v4l_microdia_ioctl 0F
[ 4934.924839] microdia: VIDIOC_QBUF
[ 4934.924842] microdia: Queuing buffer 0.
[ 4934.924844] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QBUF,
dir=rw (0xc044560f)
[ 4934.924851] Microdia USB Video Camera: 00:00:00.00000000 index=0,
type=video-cap, bytesused=0, flags=0x00000000, field=1, sequence=0,
memory=mmap, offset/userptr=0x00000000, length=3932160
[ 4934.924856] Microdia USB Video Camera: timecode= 00:00:00 type=0,
flags=0x00000000, frames=0, userbits=0x00000000
[ 4934.924860] microdia: v4l_microdia_ioctl 09
[ 4934.924863] microdia: QUERY BUFFERS 1 2
[ 4934.924866] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYBUF,
dir=rw (0xc0445609)
[ 4934.924874] Microdia USB Video Camera: 00:00:00.00000000 index=1,
type=video-cap, bytesused=0, flags=0x00000000, field=1, sequence=0,
memory=mmap, offset/userptr=0x003c0000, length=3932160
[ 4934.924879] Microdia USB Video Camera: timecode= 00:00:00 type=0,
flags=0x00000000, frames=0, userbits=0x00000000
[ 4934.925251] microdia: v4l_microdia_ioctl 0F
[ 4934.925253] microdia: VIDIOC_QBUF
[ 4934.925256] microdia: Queuing buffer 1.
[ 4934.925259] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QBUF,
dir=rw (0xc044560f)
[ 4934.925265] Microdia USB Video Camera: 00:00:00.00000000 index=1,
type=video-cap, bytesused=0, flags=0x00000000, field=1, sequence=0,
memory=mmap, offset/userptr=0x003c0000, length=3932160
[ 4934.925270] Microdia USB Video Camera: timecode= 00:00:00 type=0,
flags=0x00000000, frames=0, userbits=0x00000000
[ 4934.925274] microdia: v4l_microdia_ioctl 1C
[ 4934.925277] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_CTRL,
dir=rw (0xc008561c)
[ 4934.925282] Microdia USB Video Camera: id=9963785, value=0
[ 4934.925285] microdia: SET CTRL id=9963785 value=0
[ 4934.925288] Microdia USB Video Camera: err:
[ 4934.925291] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_CTRL,
dir=rw (0xc008561c)
[ 4934.925343] microdia: v4l_microdia_ioctl 24
[ 4934.925346] microdia: VIDIOC_QUERYCTRL id = 9963776
[ 4934.925349] microdia: VIDIOC_QUERYCTRL found
[ 4934.925351] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCTRL,
dir=rw (0xc0445624)
[ 4934.925357] Microdia USB Video Camera: id=9963776, type=1,
name=Brightness, min/max=0/65280, step=1, default=32512,
flags=0x00000000
[ 4934.925361] microdia: v4l_microdia_ioctl 1C
[ 4934.925364] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_CTRL,
dir=rw (0xc008561c)
[ 4934.925369] Microdia USB Video Camera: id=9963776, value=32512
[ 4934.925371] microdia: SET CTRL id=9963776 value=32512
[ 4934.926961] microdia: v4l_microdia_ioctl 24
[ 4934.926973] microdia: VIDIOC_QUERYCTRL id = 9963779
[ 4934.926976] Microdia USB Video Camera: err:
[ 4934.926977] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCTRL,
dir=rw (0xc0445624)
[ 4934.927737] microdia: v4l_microdia_ioctl 24
[ 4934.927859] microdia: VIDIOC_QUERYCTRL id = 9963778
[ 4934.927861] Microdia USB Video Camera: err:
[ 4934.927863] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCTRL,
dir=rw (0xc0445624)
[ 4934.928227] microdia: v4l_microdia_ioctl 24
[ 4934.928242] microdia: VIDIOC_QUERYCTRL id = 9963777
[ 4934.928244] microdia: VIDIOC_QUERYCTRL found
[ 4934.928245] Microdia USB Video Camera: v4l2 ioctl VIDIOC_QUERYCTRL,
dir=rw (0xc0445624)
[ 4934.928249] Microdia USB Video Camera: id=9963777, type=1,
name=Contrast, min/max=0/65280, step=1, default=0, flags=0x00000000
[ 4934.928285] microdia: v4l_microdia_ioctl 1C
[ 4934.928484] Microdia USB Video Camera: v4l2 ioctl VIDIOC_S_CTRL,
dir=rw (0xc008561c)
[ 4934.928488] Microdia USB Video Camera: id=9963777, value=0
[ 4934.928490] microdia: SET CTRL id=9963777 value=0
[ 4934.991790] microdia: v4l_microdia_ioctl 12
[ 4934.992000] Microdia USB Video Camera: v4l2 ioctl VIDIOC_STREAMON,
dir=-w (0x40045612)
[ 4934.992005] Microdia USB Video Camera: type=video-cap
[ 4934.992007] microdia: VIDIOC_STREAMON
[ 4934.993924] microdia: usb_microdia_isoc_init()
[ 4934.998068] microdia: dev->isoc_in_size = 1400
[ 4934.998078] microdia: dev->isoc_in_endpointAddr = 1
[ 4935.011555] microdia: I2C write to 12: a0 21 12 85 00 00 00 10
[ 4935.012677] microdia: I2C write to 0e: a0 21 0e 80 00 00 00 10
[ 4935.013946] microdia: I2C write to 09: a0 21 09 03 00 00 00 10
[ 4935.015468] microdia: I2C write to 0d: a0 21 0d 08 00 00 00 10
[ 4935.016096] microdia: I2C write to 0f: a0 21 0f c3 00 00 00 10
[ 4935.017219] microdia: I2C write to 04: a0 21 04 c3 00 00 00 10
[ 4935.018339] microdia: I2C write to 10: a0 21 10 40 00 00 00 10
[ 4935.019464] microdia: I2C write to 11: a0 21 11 40 00 00 00 10
[ 4935.020589] microdia: I2C write to 12: a0 21 12 05 00 00 00 10
[ 4935.021712] microdia: I2C write to 13: a0 21 13 b8 00 00 00 10
[ 4935.022961] microdia: I2C write to 37: c0 21 37 0f 02 43 00 10
[ 4935.024226] microdia: I2C write to 3a: a0 21 3a 00 00 00 00 10
[ 4935.025851] microdia: I2C write to 69: a0 21 69 90 00 00 00 10
[ 4935.027115] microdia: I2C write to 2d: b0 21 2d f6 0b 00 00 10
[ 4935.028339] microdia: I2C write to 01: a0 21 01 78 00 00 00 10
[ 4935.029464] microdia: I2C write to 02: a0 21 02 50 00 00 00 10
[ 4935.031721] microdia: I2C write to 2d: a0 21 2d 33 00 00 00 10
[ 4935.032980] microdia: I2C write to 2e: a0 21 2e 03 00 00 00 10
[ 4935.034964] microdia: I2C write to 13: 90 21 13 00 00 00 00 10
[ 4935.036085] microdia: I2C read from 00: 92 21 00 00 00 00 00 10
[ 4935.037582] microdia: I2C write to 13: a0 21 13 01 00 00 00 10
[ 4945.029852] microdia: v4l_microdia_ioctl 13
[ 4945.029864] Microdia USB Video Camera: v4l2 ioctl VIDIOC_STREAMOFF,
dir=-w (0x40045613)
[ 4945.029872] Microdia USB Video Camera: type=video-cap
[ 4945.029876] microdia: VIDIOC_STREAMOFF
[ 4945.031945] microdia: Isoc cleanup
[ 4945.502585] microdia: v4l_microdia_ioctl 11
[ 4945.502595] microdia: VIDIOC_DQBUF
[ 4945.502599] Microdia USB Video Camera: err:
[ 4945.502603] Microdia USB Video Camera: v4l2 ioctl VIDIOC_DQBUF,
dir=rw (0xc0445611)
[ 4945.538369] microdia: Isoc cleanup



2) mplayer output:
% mplayer tv:// -tv fps=25:width=640:height=480
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team

Playing tv://.
Cache fill: 0.00% (0 bytes)
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olsch...@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: Microdia USB Video Camera
Capabilites: video capture read/write streaming
supported norms:
inputs: 0 = Webcam;v4l2: ioctl get input failed: Invalid argument

Current input: 1
Current format: YUV420
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar
I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar I420 [zoom]
Selected video codec: [rawi420] vfm: raw (RAW I420)
==========================================================================
Audio: no sound
Starting playback...
v4l2: select timeout
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%
v4l2: select timeout ??% ??,?% 0 0 0%


MPlayer interrupted by signal 8 in module: free_demuxer

My OS is Ubuntu, Linux sandworm 2.6.24-19-generic #1 SMP Fri Jul 11
23:41:49 UTC 2008 i686 GNU/Linux


P.S. Starting tomorrow I'll be offline for for two weeks.


--
Tomasz Torcz

Ni-62 metal

unread,
Aug 26, 2008, 12:01:51 PM8/26/08
to micr...@googlegroups.com
Thanks for reporting this issue,

I believe the cause of this issue could be,
a) recent commit to head (but both of you said, latest head works fine ?)
b) both the failure reports of 0c45:627b are in embeded webcams, Mine
is standalone webcam, USB 2.0
so its very possible that the bare minimum that works for me, will
require some more writes to work for your embeded ones,
c) one of the failure reports seems to be with USB 1.1 (not enough
info to rule it out)

Possibly we can try a mix of mine & Brian's bridge writes to see if it
gets initialized properly


Neekhil

JoJo jojo

unread,
Aug 26, 2008, 2:24:08 PM8/26/08
to micr...@googlegroups.com
I believe that embedded webcams are different from standalone ones,
only with respect to the way we can reset all bridge registers,

with standalone webcam you can un-plug & replug the device, with embeded
we cannot do that, so its possible that the "reset all bridge registers" command
was not part of this patch.

-JoJo

JoJo jojo

unread,
Aug 26, 2008, 4:10:21 PM8/26/08
to micr...@googlegroups.com
Heh, just tried this patch again

few of the register writes had failed, & I got the green screen as
another poster mentioned

so i re-ran the init sequence
index 7ed058c..333d4d0 100644
--- a/microdia-dev.c
+++ b/microdia-dev.c
@@ -5058,6 +5058,7 @@ int microdia_627b_start_stream(struct usb_microdia *dev)
int sn9c20x_initialize(struct usb_microdia *dev);

ret = sn9c20x_initialize(dev);
+ ret = sn9c20x_initialize(dev);

if (dev->sensor_init)
dev->sensor_init(dev);

this time no error in register writes, & I get dark video in 1st try !

some issues noticed
/* Get green diagonal bands w/o this dummy write, Bridge does not know
sensor address ? */
reg = 0x10c0;
buf[0] = 0x80; buf[1] = 0x21; buf[2] = 0x00; buf[3] = 0x00;
buf[4] = 0x00; buf[5] = 0x00; buf[6] = 0x00; buf[7] = 0x00;
buf[8] = 0x03;
ret = usb_microdia_control_write(dev, reg, buf, 9);
if (ret < 0)
goto err;

that comment / what it implies seems wrong, else we'll need to make it
a paramater

may be someone can tell us whether what the comments tell us about
these register's purpose is true or not ?

can we replace the above with a call to sn9c20x_initialize_i2c()
instead ? since 9th byte doesn't matter.

-JoJo

Rpnpif

unread,
Aug 28, 2008, 10:29:29 AM8/28/08
to micr...@googlegroups.com
> >4l 2ucp.php launch this software by executing the following command $

> > v4l2ucp
> >
> > With this GUI software you can adjust the picture quality without
> > mucking around with the command line/debugfs !
> >
> > I also request developers (who own NON 627b webcams) to test if this
> > patch breaks their webcams's
> > if not, please confirm & go ahead and push this patch to main repo. So
> > that I can finish the checkpatch cleanup that I started earlier on top
> > of this commit.
> >
> > Brian, can you suggest what to do to support resolution switching
> > scaling patch you posted earlier on top of this reduces start stream
> > sequence.
> >
> > Neekhil
>
> Hello,
>
> With this patch, I have now no image on my 627b webcam.
> gqcam said :
> Sometimes a white picture is shown without errors.
> And other times a black picture and these messages :
> grab_image: incorrect input_type 135691536
> Error reading image...
> Without this patch I had an image, very bad but an image.
>
>
> Note that with or without this patch my webcam does not work under mplayer
> with a green image and the errors :
> microdia: isoc_init() submit_urb 194 failed with error -27

Hello,

I have just installing an USB2 card on my system and the behaviour of the
webcam is very different (with MS Windows, this webcam works also under
USB1.1).

No change on the image with mplayer but error messages are now :
mplayer tv:// -tv
noaudio:driver=v4l2:width=640:height=480:outfmt=yuy2:device=/dev/video1:fps=30
...
Playing tv://.


TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olsch...@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: Microdia USB Video Camera
Capabilites: video capture read/write streaming
supported norms:
inputs: 0 = Webcam;v4l2: ioctl get input failed: Invalid argument

Current input: 1
Current format: YUV420
v4l2: ioctl set format failed: Invalid argument

v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument

==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar I420 [zoom]
Selected video codec: [rawi420] vfm: raw (RAW I420)
==========================================================================
Audio: no sound
Starting playback...

v4l2: ioctl dequeue buffer failed: Invalid argument, idx = 0
v4l2: ioctl query buffer failed: Invalid argument, idx = 0
Exception floating point,?% 0 0

With gqcam, the things are very different.
Without this patch and USB1.1, the image was partially drawn. Now with USB2
the image is complete and stable, but too bright or too white. Setting light
or contrast has not effect.
With the patch and USB1.1, no image was avaliable.
With the patch and USB2, yes ! For the first time the image is fine !!!...
but...
But a flicking appears at a frequency about 1.5Hz (about all the 0.7 seconds).

With ekiga, no image but magenta lines in diagonals are on a white background.
With kopete, the image is running quickly from rigth to left.

So good progress.

--
Alain rpnpif

JoJo jojo

unread,
Aug 29, 2008, 12:45:51 AM8/29/08
to micr...@googlegroups.com
On Thu, Aug 28, 2008 at 7:59 PM, Rpnpif <rpn...@free.fr> wrote:
>
> With gqcam, the things are very different.
> Without this patch and USB1.1, the image was partially drawn. Now with USB2
> the image is complete and stable, but too bright or too white. Setting light
> or contrast has not effect.
> With the patch and USB1.1, no image was avaliable.
> With the patch and USB2, yes ! For the first time the image is fine !!!...
> but...
> But a flicking appears at a frequency about 1.5Hz (about all the 0.7 seconds).
>
> With ekiga, no image but magenta lines in diagonals are on a white background.
> With kopete, the image is running quickly from rigth to left.
>
> So good progress.
>
> --
> Alain rpnpif

Hi Alain

Wow, so finally a success report with this patch !
But we are so disappointed ;-0

So common' make a screenshot/video or two,
Dim the lights, take off your shirt, put on some soul music
dance a little, for inspiration look here ;-)
https://microdia.googlegroups.com/web/JwmCapture.avi

OK I believe the issue is that the current SN9C20x init functions work
correctly for descrete webcams[1]
integrated webcams will require tweaking (all register reset)

> But a flicking appears at a frequency about 1.5Hz (about all the 0.7 seconds).

This is the auto exposure/white balance etc fighting each other.

-JoJo


[1] descrete webcams : seperate from computer can be plugges in/out of
a USB port

GWater

unread,
Aug 30, 2008, 2:31:25 PM8/30/08
to micr...@googlegroups.com
JoJo jojo schrieb:
I can tell from 624e that the ninth byte is indeed very important if not
the purpose of this write.

You made me remember my old friend sn9c20x_initialize_i2c(). This
function is only used in one startstream and we have no prove it is
indeed a general sn9c20x feature and not some special treatment for a
specific sensor. I really want it improved or removed since it will
always cause misunderstandings.

GWater

Brian Johnson

unread,
Aug 31, 2008, 8:29:55 AM8/31/08
to micr...@googlegroups.com
Sorry Its taken awhile to respond i've been busy for this last week.
First to make sure resolution switching works right you must make sure
the start stream does not overwrite teh values of 0x10fb-0x10ff as
well as the value for 0x1189.

For the separation of the 7660 code I think it would be somewhat
easier to read if you wrote the initialization routine using a two
dimensional array of register writes like i use in my 965x init. It
would also allow us to use a single sensor init function that just
uses the proper nit sequence as well.

I also think that most of the register writes currently being used for
the start_stream functions would be better off being done within the
initialized function, abut all we really need to do for start stream
is maybe switch on the camera's LED and start the stream.

Ni-62 metal

unread,
Sep 3, 2008, 10:32:27 AM9/3/08
to micr...@googlegroups.com
On Sun, Aug 31, 2008 at 5:59 PM, Brian Johnson <bri...@gmail.com> wrote:
>
> Sorry Its taken awhile to respond i've been busy for this last week.
> First to make sure resolution switching works right you must make sure
> the start stream does not overwrite teh values of 0x10fb-0x10ff as
> well as the value for 0x1189.
>

Removed both sets of register writes.

> For the separation of the 7660 code I think it would be somewhat
> easier to read if you wrote the initialization routine using a two
> dimensional array of register writes like i use in my 965x init. It
> would also allow us to use a single sensor init function that just
> uses the proper nit sequence as well.
>

done and done.

> I also think that most of the register writes currently being used for
> the start_stream functions would be better off being done within the
> initialized function, abut all we really need to do for start stream
> is maybe switch on the camera's LED and start the stream.
>

start_stream functions are executed whenever an app requests a stream
initialized function are executed only if the device is
connected/reconnected or driver is loaded/reloaded
so Mplayer/ekiga/skype won't work after the first time(w/o
reconnecting/reloading the webcam/driver)
so this approach is not very attractive, unless I misunderstood your suggestion.

Plus there shouldn't be any need to do so, as I have removed the
conflicting 10fb-10ff & 1189 writes.

Neekhil

Ni-62 metal

unread,
Sep 3, 2008, 10:34:26 AM9/3/08
to micr...@googlegroups.com
wonderful work with testing these,
I have pushed these changes, please test the latest master head again
this weekend for any issues

Neekhil

On Thu, Aug 28, 2008 at 7:59 PM, Rpnpif <rpn...@free.fr> wrote:
>

Ni-62 metal

unread,
Sep 3, 2008, 10:37:03 AM9/3/08
to micr...@googlegroups.com
I'll work with you to resolve these issues, when you come back.

I like the detailed feedback, let me know after testing the latest
driver source if these issues still persist.

Neekhil

On Mon, Aug 25, 2008 at 9:44 PM, Tomasz Torcz <zdz...@gmail.com> wrote:

> Doesn't work for me (Thinkpad z61t) :(
> Without the patch I have good picture with mplayer and
> distorted with Cheese.
> With path I got only green screen in mplayer and cheese doesn't
> show anything except gnome foot (aka spinner).
>
>
>

Reply all
Reply to author
Forward
0 new messages