Re: Lenovo webcam problem which using gspca's vc032x driver
Dear Jean-Francois, I put the USB snoop log here http://people.canonical.com/~acelan/bugs/lp310760/UsbSnoop_{1,2,3,4,89}.log.gz The utility, USB Snoop, seems to have some problem with the camera preview utility, so the log may not so complete. And the dmslog is the USB traffic in binary form, you can read all USB traffic from dmslog by hexdump the files. Best regards, AceLan Kao. 2009/7/25 Jean-Francois Moine moin...@free.fr: Hi Acelan Kao, I got news from a person who has the sensor mi1320_soc and had a vertical flip problem. She found that the sensor register 0x20 sets the image flips: bit 0 = vertical, bit 1 = horizontal. Comparing the sequences of the mi1310_soc, the bit 0 is inverted in the sxga (0x0303 instead of 0x0302). May you change it and see if the image is normal? (line ~ 706 {0x20, 0x03, 0x03, 0xbb}, - 0x03, 0x02) Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
Hi Acelan Kao, I got news from a person who has the sensor mi1320_soc and had a vertical flip problem. She found that the sensor register 0x20 sets the image flips: bit 0 = vertical, bit 1 = horizontal. Comparing the sequences of the mi1310_soc, the bit 0 is inverted in the sxga (0x0303 instead of 0x0302). May you change it and see if the image is normal? (line ~ 706 {0x20, 0x03, 0x03, 0xbb}, - 0x03, 0x02) Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
2009/7/23 Jean-Francois Moine moin...@free.fr: On Wed, 22 Jul 2009 17:15:15 +0800 AceLan Kao acelan@canonical.com wrote: I would like to know which version of vc032x.c won't make 041e:405b device display upside down. And have you let the 041e:405b device owner to test the SXGA setting and with the 1280x960 resolution? What's the result? Hi AceLan Kao, The 041e:405b had a good display with the current version of vc032x (i.e., including the change 'Webcam 041e:405b added and mi1310_soc updated'). I've just asked the 405b owners to test the XGA resolution. I'll give you the results as soon as I will get them. Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ Dear Jean-Francois, It sounds like that the Lenovo webcam(0x17ef, 0x4802) sensor and the 0x041e, 0x405b device sensor doesn't be placed at the same direction and the initial tables seems not so compatible. Do you think that it would be better to split the code for these two model of webcams? If yes, I can do some help. Best regards, AceLan Kao. -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
On Fri, 24 Jul 2009 14:25:33 +0800 AceLan Kao acelan@canonical.com wrote: It sounds like that the Lenovo webcam(0x17ef, 0x4802) sensor and the 0x041e, 0x405b device sensor doesn't be placed at the same direction and the initial tables seems not so compatible. Do you think that it would be better to split the code for these two model of webcams? If yes, I can do some help. Hi Acelan Kao, An other guy with the 405b said that all modes were correct but 640x and 320x upside down. Looking at the .inf of the ms-win driver, it seems that the Mirror and Vertical controls exist for the mi1310_soc sensor. May you change them on ms-win? If yes, may you do a snoop to know which registers do the job? Then, in the vc032x subdriver, only the set h/v flip had to be inverted for the 2 webcam types. Otherwise, I compared the sequences of the ms-win files C0130Dev.inf (041e:405b) and usbvm323.inf (17ef:4802). The bridge sequences are close enough, but the sensors sequences are completely different, as if the sensors were different! So, it is not easy to find how the image may be upside down... BTW, I can't read your binary USB snoop. Have you any tool to read it or may you send me a more readable version? Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
On Wed, 22 Jul 2009 17:15:15 +0800 AceLan Kao acelan@canonical.com wrote: I would like to know which version of vc032x.c won't make 041e:405b device display upside down. And have you let the 041e:405b device owner to test the SXGA setting and with the 1280x960 resolution? What's the result? Hi AceLan Kao, The 041e:405b had a good display with the current version of vc032x (i.e., including the change 'Webcam 041e:405b added and mi1310_soc updated'). I've just asked the 405b owners to test the XGA resolution. I'll give you the results as soon as I will get them. Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
2009/7/21 AceLan Kao acelan@canonical.com: 2009/7/20 Jean-Francois Moine moin...@free.fr: On Mon, 20 Jul 2009 15:04:05 +0800 AceLan Kao acelan@canonical.com wrote: I use Lenovo WebCam Center and Dorgem to do the webcam preview function, there are the following resolution settings 160x120 176x144 320x240 352x288 640x480 Do you need all the resolutions logs? I try to use Device Monitoring Studio to log the USB traffic this time. You can download the QVGA and VGA USB snoop log and the .INF file from here. http://people.canonical.com/~acelan//bugs/lp310760/ Hello Acelan Kao, Thanks for the files. I could not look at the dms logs, having no tool to do. Anyway, the .inf gives the exact USB sequence you set. I got a return from one guy with the same sensor. He said the driver works better (with the LEDs), but there are still some frame overflows and the image is upside down. Have you such a problem? The sequence for the SXVGA mode (1280x1024) is defined in the .inf. I extracted it and attached. Does it work for you? Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ Dear Jean-Francois, The SXGA setting works for me if the resolution set to 1280x960 and the image is upside down. === {1280, 960, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi13x0_soc only */ .bytesperline = 1280, .sizeimage = 1280 * 960 * 1 / 4 + 590, .colorspace = V4L2_COLORSPACE_JPEG, .priv = 2}, === And for the QVGA and VGA resolution preview, my display is good, not upside down. Best regards, AceLan Kao. -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) Dear Jean-Francois, I would like to know which version of vc032x.c won't make 041e:405b device display upside down. And have you let the 041e:405b device owner to test the SXGA setting and with the 1280x960 resolution? What's the result? Best regards, AceLan Kao. -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
Dear Jean-Francois, I use Lenovo WebCam Center and Dorgem to do the webcam preview function, there are the following resolution settings 160x120 176x144 320x240 352x288 640x480 Do you need all the resolutions logs? I try to use Device Monitoring Studio to log the USB traffic this time. You can download the QVGA and VGA USB snoop log and the .INF file from here. http://people.canonical.com/~acelan//bugs/lp310760/ Dear Mauro, Sure, I'll give you the patches against the V4L/DVB hg tree. But I think I should come out a conclusion with Jean-Francois, right? Best regards, AceLan Kao. 2009/7/17 Jean-Francois Moine moin...@free.fr: On Fri, 17 Jul 2009 04:32:25 -0300 Mauro Carvalho Chehab mche...@redhat.com wrote: Em Fri, 17 Jul 2009 11:30:24 +0800 AceLan Kao acelan@canonical.com escreveu: [snip] Thanks for your advice and links, I have found out the correct i2c commands to turn on/off the LED flash for Lenovo webcam(SENSOR_MI1310_SOC). Also, I fixed the upstream kernel, so that the camera preview and capture function are working now. The problem came from these two patches 6af4e7a V4L/DVB (10424): gspca - vc032x: Add resolution 1280x1024 for sensor mi1310_soc. a92e906 V4L/DVB (10420): gspca - vc032x: Webcam 041e:405b added and mi1310_soc updated. I just disable the 1280x1024 resolution and revert back to the origin mi1310_soc VGA and QVGA settings. [snip] Also, since Jean-Francois added 1280x1024 resolution and changed the initialization tables, I suspect that this worked fine with some webcam model. So, probably, the bug is specific to this cam model (or related to a poor USB performance at Lenovo internal usb bus). So, it is important to know what is broken and what is not at the i2c sequence of commands, in order to not break other similar devices. Hi AceLan Kao, Sorry to be a bit late on the problem, I'm busy with too many other webcams! First about the LEDs. 0x89 as the request value in USB control messages seems to control to GPIO. It may turn on/off the LEDs and also does sensor selection for the Samsung Q1. It should be specific to the webcam. Then, about the mi1310_soc. The zs328.inf and the C0130Dev.inf extracted from the ms-win driver and the usb snoop I have contain almost identical sequences, the ones which are in the driver since the addition of the webcam 041e:405b. Three guys use this webcam. Indeed, they have problems (mainly image freeze with frame overflow messages in the kernel traces). For now, I may ask the 041e:405b owners to check if your patch works. Otherwise, I thought to add the YUYV mode to the mi1310_soc, as it is for the mi1320_soc (the usb snoop I have is in this mode). Also, as you have the webcam and surely the ms-win driver, may you send me usb snoops in all resolutions and the .INF? Thanks. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
On Mon, 20 Jul 2009 15:04:05 +0800 AceLan Kao acelan@canonical.com wrote: I use Lenovo WebCam Center and Dorgem to do the webcam preview function, there are the following resolution settings 160x120 176x144 320x240 352x288 640x480 Do you need all the resolutions logs? I try to use Device Monitoring Studio to log the USB traffic this time. You can download the QVGA and VGA USB snoop log and the .INF file from here. http://people.canonical.com/~acelan//bugs/lp310760/ Hello Acelan Kao, Thanks for the files. I could not look at the dms logs, having no tool to do. Anyway, the .inf gives the exact USB sequence you set. I got a return from one guy with the same sensor. He said the driver works better (with the LEDs), but there are still some frame overflows and the image is upside down. Have you such a problem? The sequence for the SXVGA mode (1280x1024) is defined in the .inf. I extracted it and attached. Does it work for you? Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ static const u8 mi1310_soc_InitSXGA_JPG[][4] = { {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, {0xb3, 0x08, 0x01, 0xcc}, {0xb3, 0x09, 0x0c, 0xcc}, {0xb3, 0x34, 0x02, 0xcc}, {0xb3, 0x35, 0xdd, 0xcc}, {0xb3, 0x02, 0x00, 0xcc}, {0xb3, 0x03, 0x0a, 0xcc}, {0xb3, 0x04, 0x0d, 0xcc}, {0xb3, 0x20, 0x00, 0xcc}, {0xb3, 0x21, 0x00, 0xcc}, {0xb3, 0x22, 0x03, 0xcc}, {0xb3, 0x23, 0xc0, 0xcc}, {0xb3, 0x14, 0x00, 0xcc}, {0xb3, 0x15, 0x00, 0xcc}, {0xb3, 0x16, 0x04, 0xcc}, {0xb3, 0x17, 0xff, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, {0xb8, 0x00, 0x00, 0xcc}, {0xbc, 0x00, 0x70, 0xcc}, {0xbc, 0x01, 0x01, 0xcc}, {0xf0, 0x00, 0x02, 0xbb}, {0xc8, 0x9f, 0x0b, 0xbb}, {0x5b, 0x00, 0x01, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, {0x20, 0x03, 0x03, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, {0x05, 0x00, 0x07, 0xbb}, {0x34, 0x00, 0x00, 0xbb}, {0x35, 0xff, 0x00, 0xbb}, {0xdc, 0x07, 0x02, 0xbb}, {0xdd, 0x3c, 0x18, 0xbb}, {0xde, 0x92, 0x6d, 0xbb}, {0xdf, 0xcd, 0xb1, 0xbb}, {0xe0, 0xff, 0xe7, 0xbb}, {0x06, 0xf0, 0x0d, 0xbb}, {0x06, 0x70, 0x0e, 0xbb}, {0x4c, 0x00, 0x01, 0xbb}, {0x4d, 0x00, 0x01, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, {0x2e, 0x0c, 0x60, 0xbb}, {0x21, 0xb6, 0x6e, 0xbb}, {0x37, 0x01, 0x40, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, {0x07, 0x00, 0x84, 0xbb}, {0x08, 0x02, 0x4a, 0xbb}, {0x05, 0x01, 0x10, 0xbb}, {0x06, 0x00, 0x39, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, {0x58, 0x02, 0x67, 0xbb}, {0x57, 0x02, 0x00, 0xbb}, {0x5a, 0x02, 0x67, 0xbb}, {0x59, 0x02, 0x00, 0xbb}, {0x5c, 0x12, 0x0d, 0xbb}, {0x5d, 0x16, 0x11, 0xbb}, {0x39, 0x06, 0x18, 0xbb}, {0x3a, 0x06, 0x18, 0xbb}, {0x3b, 0x06, 0x18, 0xbb}, {0x3c, 0x06, 0x18, 0xbb}, {0x64, 0x7b, 0x5b, 0xbb}, {0xb6, 0x00, 0x00, 0xcc}, {0xb6, 0x03, 0x05, 0xcc}, {0xb6, 0x02, 0x00, 0xcc}, {0xb6, 0x05, 0x03, 0xcc}, {0xb6, 0x04, 0xc0, 0xcc}, {0xb6, 0x12, 0xf8, 0xcc}, {0xb6, 0x13, 0x29, 0xcc}, {0xb6, 0x18, 0x09, 0xcc}, {0xb6, 0x17, 0x60, 0xcc}, {0xb6, 0x16, 0x00, 0xcc}, {0xb6, 0x22, 0x12, 0xcc}, {0xb6, 0x23, 0x0b, 0xcc}, {0xbf, 0xc0, 0x39, 0xcc}, {0xbf, 0xc1, 0x04, 0xcc}, {0xbf, 0xcc, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, {0x00, 0x00, 0x80, 0xdd}, {0xf0, 0x00, 0x02, 0xbb}, {0x00, 0x00, 0x10, 0xdd}, {0x22, 0xa0, 0x78, 0xbb}, {0x23, 0xa0, 0x78, 0xbb}, {0x24, 0x7f, 0x00, 0xbb}, {0x28, 0xea, 0x02, 0xbb}, {0x29, 0x86, 0x7a, 0xbb}, {0x5e, 0x52, 0x4c, 0xbb}, {0x5f, 0x20, 0x24, 0xbb}, {0x60, 0x00, 0x02, 0xbb}, {0x02, 0x00, 0xee, 0xbb}, {0x03, 0x39, 0x23, 0xbb}, {0x04, 0x07, 0x24, 0xbb}, {0x09, 0x00, 0xc0, 0xbb}, {0x0a, 0x00, 0x79, 0xbb}, {0x0b, 0x00, 0x04, 0xbb}, {0x0c, 0x00, 0x5c, 0xbb}, {0x0d, 0x00, 0xd9, 0xbb}, {0x0e, 0x00, 0x53, 0xbb}, {0x0f, 0x00, 0x21, 0xbb}, {0x10, 0x00, 0xa4, 0xbb}, {0x11, 0x00, 0xe5, 0xbb}, {0x15, 0x00, 0x00, 0xbb}, {0x16, 0x00, 0x00, 0xbb}, {0x17, 0x00, 0x00, 0xbb}, {0x18, 0x00, 0x00, 0xbb}, {0x19, 0x00, 0x00, 0xbb}, {0x1a, 0x00, 0x00, 0xbb}, {0x1b, 0x00, 0x00, 0xbb}, {0x1c, 0x00, 0x00, 0xbb}, {0x1d, 0x00, 0x00, 0xbb}, {0x1e, 0x00, 0x00, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, {0x00, 0x00, 0x20, 0xdd}, {0x06, 0xf0, 0x8e, 0xbb}, {0x00, 0x00, 0x80, 0xdd}, {0x06, 0x70, 0x8e, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, {0x00, 0x00, 0x20, 0xdd}, {0x5e, 0x6a, 0x53, 0xbb}, {0x5f, 0x40, 0x2c, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, {0x00, 0x00, 0x20, 0xdd}, {0x58, 0x00, 0x00, 0xbb}, {0x53, 0x09, 0x03, 0xbb}, {0x54, 0x31, 0x18, 0xbb}, {0x55, 0x8b, 0x5f, 0xbb}, {0x56, 0xc0, 0xa9, 0xbb}, {0x57, 0xe0, 0xd2, 0xbb}, {0xe1, 0x00, 0x00, 0xbb}, {0xdc, 0x09, 0x03, 0xbb}, {0xdd, 0x31, 0x18, 0xbb}, {0xde, 0x8b, 0x5f, 0xbb}, {0xdf, 0xc0, 0xa9, 0xbb}, {0xe0, 0xe0, 0xd2, 0xbb}, {0xb3, 0x5c, 0x01, 0xcc}, {0xf0, 0x00, 0x01, 0xbb}, {0x06, 0xf0, 0x8e, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, {0x2f, 0xde, 0x20, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, {0x24, 0x50, 0x20,
Re: Lenovo webcam problem which using gspca's vc032x driver
Em Mon, 20 Jul 2009 15:04:05 +0800 AceLan Kao acelan@canonical.com escreveu: Dear Jean-Francois, I use Lenovo WebCam Center and Dorgem to do the webcam preview function, there are the following resolution settings 160x120 176x144 320x240 352x288 640x480 Do you need all the resolutions logs? I try to use Device Monitoring Studio to log the USB traffic this time. You can download the QVGA and VGA USB snoop log and the .INF file from here. http://people.canonical.com/~acelan//bugs/lp310760/ Dear Mauro, Sure, I'll give you the patches against the V4L/DVB hg tree. But I think I should come out a conclusion with Jean-Francois, right? Yes, please. -- Cheers, Mauro -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Lenovo webcam problem which using gspca's vc032x driver
2009/7/20 Jean-Francois Moine moin...@free.fr: On Mon, 20 Jul 2009 15:04:05 +0800 AceLan Kao acelan@canonical.com wrote: I use Lenovo WebCam Center and Dorgem to do the webcam preview function, there are the following resolution settings 160x120 176x144 320x240 352x288 640x480 Do you need all the resolutions logs? I try to use Device Monitoring Studio to log the USB traffic this time. You can download the QVGA and VGA USB snoop log and the .INF file from here. http://people.canonical.com/~acelan//bugs/lp310760/ Hello Acelan Kao, Thanks for the files. I could not look at the dms logs, having no tool to do. Anyway, the .inf gives the exact USB sequence you set. I got a return from one guy with the same sensor. He said the driver works better (with the LEDs), but there are still some frame overflows and the image is upside down. Have you such a problem? The sequence for the SXVGA mode (1280x1024) is defined in the .inf. I extracted it and attached. Does it work for you? Best regards. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ Dear Jean-Francois, The SXGA setting works for me if the resolution set to 1280x960 and the image is upside down. === {1280, 960, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi13x0_soc only */ .bytesperline = 1280, .sizeimage = 1280 * 960 * 1 / 4 + 590, .colorspace = V4L2_COLORSPACE_JPEG, .priv = 2}, === And for the QVGA and VGA resolution preview, my display is good, not upside down. Best regards, AceLan Kao. -- Chia-Lin Kao(AceLan) http://blog.acelan.idv.tw/ E-Mail: acelan.kaoATcanonical.com (s/AT/@/) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html