Hello Laurent, I can't use your patch since I am not in a Linux OS system, but I do believe your patch is going to be able to work. In my system, I use the following method to patch these alignment problems:
static uint8_t get_byte(uint32_t dword, int offset) { return (0x000000FF & (dword >> (offset * 8))); } : //*(__le32*)&data[18] = cpu_to_le32(ctrl->dwMaxVideoFrameSize); data[18] = get_byte(ctrl->dwMaxVideoFrameSize,0); data[19] = get_byte(ctrl->dwMaxVideoFrameSize,1); data[20] = get_byte(ctrl->dwMaxVideoFrameSize,2); data[21] = get_byte(ctrl->dwMaxVideoFrameSize,3); This is working solution and I carefully inspect these data on my USB bus, it is fixed. After I have done fixing the alignment issue, I found my MicroSoft LifeCam NX-6000 still working on a very slow framerate. Fortunately by examine the alignment issue I mentioned previously, I had accidentally found that it is my system that caused the cam to work slowly. (I added a breakpoint at the code that trying to set the format of the cam, and that makes the hub_events(..) finished its execution by stopping at my video streaming thread which has try_set_format function, in this condition the video starts streaming at 30fps) So, that's what I said, its my system that caused the streaming slow. My system currently is a test system that once detect a UVC device, it will start streaming for a while. There are no typical Linux device driver architecture on my OS. I just simulate important things on my system. Hope that helps -Brian On Feb 13, 2008 3:45 PM, Laurent Pinchart <[EMAIL PROTECTED]> wrote: > Hi Brian, > > On Friday 01 February 2008, Brian Pin wrote: > > Hi Laurent, I found the answer why I get slow framerate on Microsoft CAM > > NX600. See the following three lines: (uvc_set_video_ctrl) > > *(__le16*)&data[16] = cpu_to_le16(ctrl->wDelay); > > *(__le32*)&data[18] = cpu_to_le32(ctrl->dwMaxVideoFrameSize); > > *(__le32*)&data[22] = cpu_to_le32(ctrl->dwMaxPayloadTransferSize); > > When I write dwMaxVideoFrameSize to data[18], it over writes the > > wDelay value and makes me like asking for delays in Microsoft CAM, so > > the CAM do what I said, and it gives me slow frame rate, actually the > > delay. > > > > The reason seems like when I try to cast &data[18] to a 32bit address, > > my system transfers it to a 32bit aligned address, which covers the > > address of wDelay. and that's why I get abnormal device behavior. > > > > Is it happening on other ARM platforms too? > > Have you been able to solve your problem ? Did the patch I sent you help ? > > Best regards, > > Laurent Pinchart > -- Best Regards Brian _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel