I can see two possible causes for the issues. One the bridge registers
for setting the resolution are not being set correctly, this should
only effect resolutions less then 640x480. Second there could be a
problem with some of the decode routines in microdia-decoder.c
So I'm going to ask that those having these image issues try some of
the following things and report back on this thread. First make sure
you turn on debugging messages which is described here:
http://groups.google.com/group/microdia/web/testing-microdia-driver-draft
(Read the section on debugfs)
Once you have done that start up video streaming using skype and find
out what resolution and format it is using by looking at the debugging
information that is logged to your syslog. This should info should be
part of the last logged VIDIOC_S_FMT call before the VIDIOC_STREAMON
call.
Example:
Aug 24 08:44:16 ubuntu kernel: [247383.736813] Microdia USB Video
Camera: v4l2 ioctl VIDIOC_S_FMT, dir=rw (0xc0cc5605)
Aug 24 08:44:16 ubuntu kernel: [247383.736816] Microdia USB Video
Camera: type=video-cap
Aug 24 08:44:16 ubuntu kernel: [247383.736820] Microdia USB Video
Camera: width=320, height=240, format=YU12, field=interlaced,
bytesperline=0 sizeimage=0, colorspace=0
Now that you have determined the resolution and format information use
the debugfs system to find the current value of the value 6 registers:
0x10fb-0x10ff and 0x1189. Now check to see if they match the following
list of values for the resolution being used and if not set them to
the correct values using debugfs. Register 0x1189 only uses bits 5 and
4 (I'm counting uses 0 as the first bit) so rather then give a
specific value for that register i'll give the values of just those
two bits. so for example if the current value of 1189 is 0x80 and the
resolution being used is 320x240 you would set it to 0x90.
640x480:
0x10fb: 0x00
0x10fc: 0xa0
0x10fd: 0x00
0x10fe: 0xf0
0x10ff: 0x00
0x1189[5:4]: 0 0
320x240:
0x10fb: 0x00
0x10fc: 0x50
0x10fd: 0x00
0x10fe: 0x78
0x10ff: 0x00
0x1189[5:4]: 0 1
160x120:
0x10fb: 0x00
0x10fc: 0x28
0x10fd: 0x00
0x10fe: 0x3c
0x10ff: 0x00
0x1189[5:4]: 1 0
When those values are set correctly hopefully the image will now look
correct. If not it is likely then an issue with the function used to
decode the image for your webcam model.
In replies to this plese make sure you include the following:
webcam model
format and resolution skype is using.
The value of the 6 mentioned registers and if setting them manually to
the specified value fixes things.
I removed all 10fb - 10ff writes from 627b start_stream,
I moved 1189 writes from 627b start_stream to 627b_init
I get a stable image, but still some issues with scaling.(see attached
screenshot).
The Bridge Dump
0x10F0 0F FD 0F FF 00 00 40 09 10 00 C2 00 50 00 78 00
0x1180 01 00 01 00 28 3C 0E 00 86 10 04 0C 1F 1F 1F 1F
Entire bridge dump.
0x1000 38 84 18 03 02 45 40 60 02 FF 41 00 00 00 00 00
0x1010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 21
0x1020 26 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1040 A4 79 40 1D 1E 1F 00 00 00 00 00 00 00 00 00 00
0x1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1060 03 03 00 00 10 00 00 D0 A6 7C 53 29 00 01 20 00
0x1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10C0 A4 21 00 00 00 00 00 00 23 00 00 00 00 00 00 00
0x10D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10E0 4B 13 00 26 00 07 00 F6 0F D2 0F 38 00 34 00 CF
0x10F0 0F FD 0F FF 00 00 40 09 10 00 C2 00 50 00 78 00
0x1100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1180 01 00 01 00 28 3C 0E 00 86 10 04 0C 1F 1F 1F 1F
0x1190 0A 37 4C 5D 68 75 82 8E 9B A6 B2 BE CA D6 E4 EC
0x11A0 F5 00 08 00 28 01 00 00 02 08 00 05 00 82 11 00
0x11B0 01 03 00 0E 00 00 00 00 B8 04 0B 00 00 03 04 03
0x11C0 00 11 40 04 80 04 00 00 40 44 02 08 08 00 00 90
0x11D0 89 00 01 01 00 00 00 80 00 40 80 E0 00 04 40 02
0x11E0 08 03 02 A0 00 80 00 01 05 22 00 30 00 80 00 02
0x11F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1189 seems to be some kind of ZOOM, to me it seems to magnify a
portion of the image
-JoJo
I get a stable/clear image, but there's some corruption at the bottom.
I guess you were right, this could be an issue with the stream decoder.
The Bridge Dump
0x10F0 0F FD 0F FF 00 00 5F 09 10 00 C2 00 28 00 3C 00
0x1180 01 00 01 00 28 3C 0E 00 86 20 04 0C 1F 1F 1F 1F
0x1000 38 84 18 03 02 45 40 60 02 FF 41 00 00 00 00 00
0x1010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7C 21
0x1020 26 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1040 A4 79 40 1D 1E 1F 00 00 00 00 00 00 00 00 00 00
0x1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1060 03 03 00 00 10 00 00 D0 A6 7C 53 29 00 01 20 00
0x1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10C0 A4 21 00 00 00 00 00 00 23 00 00 00 00 00 00 00
0x10D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10E0 4B 13 00 26 00 07 00 F6 0F D2 0F 38 00 34 00 CF
0x10F0 0F FD 0F FF 00 00 5F 09 10 00 C2 00 28 00 3C 00
0x1100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1180 01 00 01 00 28 3C 0E 00 86 20 04 0C 1F 1F 1F 1F
0x1190 0A 37 4C 5D 68 75 82 8E 9B A6 B2 BE CA D6 E4 EC
0x11A0 F5 00 08 00 28 01 00 00 02 08 00 05 00 82 11 00
0x11B0 01 03 00 0E 00 00 00 00 B8 0C 0B 00 00 03 04 03
0x11C0 00 11 40 04 80 04 00 00 40 44 02 08 08 00 00 90
0x11D0 89 00 01 01 00 00 00 80 00 40 80 E0 00 04 40 02
0x11E0 08 03 02 A0 00 80 00 01 05 22 00 30 00 80 00 02
0x11F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-JoJo