hello :
I want to use dm365 with a usb webcam.I have two usb webcams and the driver I think is right for them.Now I load the usb_core and musb_hdrc module from kernel source,and then load the driver for each other.
But after that, I use the v4l2's example code, I got the following two error messages for each other:
webcam with UVC driver:
the driver load sucessful messageuvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:62f1)usbcore: registered new driver uvcvideoexecute error messageuvcvideo: Failed to submit isoc URB 0 (-90).VIDIOC_STREAMON error 90, Message too long
webcam with gspca driver:
the driver load sucessful message/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: USB GSPCA camera found.(ZC3XX)/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_probe:4275] Camera type JPEG/home/pencil722/獢/DM365/useful/gspcav1-20071224/Vimicro/zc3xx.h: [zc3xx_config:669] Find Sensor HV7131R(c)/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_getcapability:1249] maxw 640 maxh 480 minw 160 minh 120usbcore: registered new driver gspca/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: gspca driver01.00.20 registeredexecute error message/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_set_light_freq:1932] Sensor currently not support light frequency banding filters./home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [gspca_set_isoc_ep:945] ISO EndPoint found 0x81 AlternateSet 7/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: init isoc: usb_submit_urb(0) ret -90/home/pencil722/獢/DM365/useful/gspcav1-20071224/gspca_core.c: [spca5xx_open:1996] DEALLOC error on init_Isoc
According the these two messages, I think that there are some problems I need to solve.One is the URB related problem, the other is ISO related problem.These two problems I think related to the error message are new to me.As result, I don't have any idea to solve them.
Can anyone tell me what my problem with the error message?And How to slove the error message?
regards,
Peter
Peter,
Pl. ensure that you have programmed the fifo table in "drivers/usb/musb/musb_core.c" file for the needed fifo space for the ISO endpoint. I believe the camera is asking for 1024 bytes of fifo space but the table is not programmed for one. This might explain the behavior seen.
regards
swami
Swami:
Thanks for your answer.
I am new to this area, so I still have some problem with your reply.You say that "programmed the fifo table in "drivers/usb/musb/musb_core.c" file for the needed fifo space for the ISO endpoint",is this mean I need to edit the kernel source code or I can set the values by configure file or command?
I have seen the musb_core.c of kernel source with editor,I think the if I need to edit this file, the code I need to edit is something like the following code
/* * tables defining fifo_mode values. define more if you like. * for host side, make sure both halves of ep1 are set up. *//* mode 0 - fits in 2KB */static struct fifo_cfg __initdata mode_0_cfg[] = {{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },{ .hw_ep_num = 2, .style = FIFO_RXTX, .maxpacket = 512, },{ .hw_ep_num = 3, .style = FIFO_RXTX, .maxpacket = 256, },{ .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },};
Am I right?
Except programming the fifo space to 1024, do I need to change the setting of Linux Kernel configuration of the source code before crooss compile a new image file?The seting I think related is Device Driver--->USB Support--->[ ]Disable DMA (always use PIO) [ ]Reserve Bulk Endpoint [*]Reserve ISO Endpointthe above is the seting of my configuration now.
Can you explain this clearly?
Thank you,
You are almost right. You should be looking for "mode 2" config structure. You should have something as below
/* mode 2 - fits in 4KB */static struct fifo_cfg __initdata mode_2_cfg[] = {{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 1024, },{ .hw_ep_num = 3, .style = FIFO_RX, .maxpacket = 1024, },{ .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },};
Reserving for ISO EP is good for your use case.
Swami
I edit the "driver/usb/musb/musb_core.c", and changing the following lines:
static struct fifo_cfg __initdata mode_2_cfg[] = {{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 1024, },{ .hw_ep_num = 3, .style = FIFO_TX, .maxpacket = 512, },{ .hw_ep_num = 3, .style = FIFO_RX, .maxpacket = 1024, },{ .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },};
then make the new musb_hdrc.ko module.
When I insert the module with command "insmod musb_hdrc.ko mode_default=1", I got the following error messages:
musb_hdrc: version 6.0, cppi-dma, peripheralhost, debug=0switchUSB_HW: gpio_direction_output called, value=0ray: plat-mode = 1musb_hdrc musb_hdrc: No DMA interrupt linemusb_hdrc: probe of musb_hdrc failed with error -22insmod: error inserting 'musb_hdrc.ko': -1 No such device
Can you help me why I got this message?
I also write down my steps for this.The steps I do after boot the DM365 is:1.plug my usb webcam2.insmod usbcore.ko3.insmod musb_hdrc.ko mode_default=14.insmod the usb webcam driver5.run the sample program come from the v4l4. and 5 will do if 2 and 3 sucessful
Is there any step I do wrong or forget to do?
if i change it to 1024 i get the same problem:
musb_hdrc: probe of musb_hdrc failed with error -22
now i just want to ask if you know how to fix it ..
Regards, Mike
after change .ram_bits = 11, in ./arch/arm/mach-davinci/usb.c
i get the problem sloved,but the previous comes up again...
the problem comes form the High-bandwidth ISO mode webcam with DM365.
check it out: section 4.72 about USB
Hi Zanget,
I'm also facing the same problem when i capture VGA frame through external USB camera. This problem is not seen if i configure to get QVGA frame from the camera.the frame rate is very low. Its only 3 fps. I used Logitech camera. Please let me know if there is a patch which solves the URB errorson DM 368
pradeep
Pradeep
Can you check with this patch http://arago-project.org/git/projects/?p=linux-omap3.git;a=commitdiff;h=09f9005fc4438feb2225ea67c37c176843002a48;hp=d95a57edef3489ca21b67ca2ad3a025f295609b5
arago link http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog;h=refs/heads/TI814XPSP_04.01.00.07
Regards
Ravi B
If my reply answers your question then please click on the green button "Verify Answer"
the patch tell us that :
This patch is still being tested and not intended for any official release to customer. This will be released in PSP release after complete testing.
are you sure it works ?
regards, Mike
You can pickup all the patches from arago link and see whether this resolve the issue. Currently these patches are available on top of 4.01.00.07 PSP release for DM814X series, will be included for the next PSP release after complete testing.
Hi ravi,
The patch is for 2.6.37 for DM 8148 where as i want it on linux 2.6.32 on DM 368. Is there any patch on 2.6.32 for DM 368
ravi
i've downloaded I've downloaded linux-omap3-094a37960c7fee23bc38386a280491a97502a99b.tar.gz ,compiled the kernel and used it to boot DM 8148. i could capture HD image (1280 x 720) through external usb camera and in raw format (yuyv). Is it 04.01.00.07. version which were you mentioning ? Please confirm ? I thought all the patches which you have mentioned are present in linux-omap3-094a37960c7fee23bc38386a280491a97502a99b.tar.gz