UVC problems with Beaglebone

4,480 views
Skip to first unread message

David Lambert

unread,
Dec 12, 2011, 11:21:20 AM12/12/11
to Beagle Board
I have been using the Beagleboard xM for some time for video capture
using various USB web-cams. Now I have received my first Beaglebone, and
although I appear to be able to set and read camera parameters, no mmap
streaming appears to work. I am setting up a select/poll for the fd but
the call only times out. I have tried multiple programs including the
example capture program from the V4L2 manual. All appear to give similar
symptoms. For example, with the V4L2 capture program:

./capture -d /dev/video0
select timeout

Any one else had similar experiences?

Thanks,

Dave.

jbuehl

unread,
Dec 12, 2011, 11:33:18 AM12/12/11
to Beagle Board
I was able to get a Logitech C250 to work with no problems using mjpeg-
streamer http://mjpg-streamer.svn.sourceforge.net/viewvc/mjpg-streamer/mjpg-streamer/?view=tar.

David Lambert

unread,
Dec 12, 2011, 11:44:58 AM12/12/11
to beagl...@googlegroups.com
On 12/12/2011 10:33 AM, jbuehl wrote:
> I was able to get a Logitech C250 to work with no problems using mjpeg-
> streamer http://mjpg-streamer.svn.sourceforge.net/viewvc/mjpg-streamer/mjpg-streamer/?view=tar.
Thanks, but I am more specifically looking at problems with raw yuyv
capture using the memory mapping interface.


David Lambert

unread,
Dec 12, 2011, 5:30:33 PM12/12/11
to beagl...@googlegroups.com
Update on my own post. It appears that the USB DMA is not working from
UVC. Are there any known issues here?

Jason Kridner

unread,
Dec 13, 2011, 7:08:26 AM12/13/11
to beagl...@googlegroups.com, ajay....@ti.com
On Mon, Dec 12, 2011 at 5:30 PM, David Lambert <da...@lambsys.com> wrote:
> Update on my own post. It appears that the USB DMA is not working from UVC.
> Are there any known issues here?

Here's a note I got from Ajay:

Dave,

You can try enabling the DMA and see if this helps. We have tested UVC
camera streaming on AM335x EVM in DMA mode.

Regards,
Ajay


>
>> I have been using the Beagleboard xM for some time for video capture using
>> various USB web-cams. Now I have received my first Beaglebone, and although
>> I appear to be able to set and read camera parameters, no mmap streaming
>> appears to work. I am setting up a select/poll for the fd but the call only
>> times out. I have tried multiple programs including the example capture
>> program from the V4L2 manual. All appear to give similar symptoms. For
>> example, with the V4L2 capture program:
>>
>> ./capture -d /dev/video0
>> select timeout
>>
>> Any one else had similar experiences?
>>
>> Thanks,
>>
>> Dave.
>>
>

> --
> You received this message because you are subscribed to the Google Groups
> "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to
> beagleboard...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/beagleboard?hl=en.
>

Jason Kridner

unread,
Dec 13, 2011, 9:31:23 AM12/13/11
to beagl...@googlegroups.com
FYI.

---------- Forwarded message ----------
From: Gupta, Ajay Kumar <ajay....@ti.com>
Date: Tue, Dec 13, 2011 at 7:12 AM
Subject: RE: [beagleboard] UVC problems with Beaglebone
To: Jason Kridner <jkri...@beagleboard.org>


Jason,

I am not sure which release is used by Dave but we have below fix for
640x480 streaming issue which is pushed to integration branch.

Regards,
Ajay

------------------------------------------------------------------
commit bc4c08dbf211399a2c28a21c7e80c0ea9e9893f5
Author: Ravi B <ravi...@ti.com>
Date:   Wed Nov 9 11:26:39 2011 +0530

   musb: host: safe to giveback URB without taking spinlock

   merge to cc42fb36 (musb: Add workqueue for URB giveback)

   the giveback workqueue has only succesfull completed
   URBs, it is safe to giveback URBs without taking
   musb spinlocks.

   Signed-off-by: Ravi B <ravi...@ti.com>
   Signed-off-by: Ajay Kumar Gupta <ajay....@ti.com>

diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 399f144..2f49f1f 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -361,16 +361,10 @@ static inline void musb_save_toggle(struct
musb_qh *qh, int is_in,
 void musb_gb_work(struct work_struct *data)
 {
       struct musb *musb = container_of(data, struct musb, gb_work);
-       unsigned long flags;
       struct urb *urb;

-       while ((urb = pop_queue(musb)) != 0) {
-               spin_lock_irqsave(&musb->lock, flags);
-               spin_unlock(&musb->lock);
+       while ((urb = pop_queue(musb)) != 0)
               musb_giveback(musb, urb, 0);
-               spin_lock(&musb->lock);
-               spin_unlock_irqrestore(&musb->lock, flags);
-       }
 }

 /*
------------------------------------------------------------------

David Lambert

unread,
Dec 13, 2011, 6:32:50 PM12/13/11
to beagl...@googlegroups.com
> Here's a note I got from Ajay: Dave, You can try enabling the DMA and
> see if this helps. We have tested UVC camera streaming on AM335x EVM
> in DMA mode. Regards, Ajay
OK thanks. I had thought that DMA was enabled by default. In any case,
how do I enable DMA?


David Lambert

unread,
Dec 15, 2011, 3:25:36 PM12/15/11
to beagl...@googlegroups.com
Thanks for all the suggestions. I found that "./oebb.sh update followed
by bitbake virtual-kernel" produced a kernel that now works!

Dave.

David Lambert

unread,
Feb 10, 2012, 10:38:37 AM2/10/12
to beagl...@googlegroups.com
I just updated my kernel to 3.2 and found that UVC video YUYV streaming
no longer works as it did in version 3.1h. Any ideas?

Dave.

Koen Kooi

unread,
Feb 10, 2012, 10:45:45 AM2/10/12
to beagl...@googlegroups.com
Op 10 feb. 2012, om 16:38 heeft David Lambert het volgende geschreven:

> I just updated my kernel to 3.2 and found that UVC video YUYV streaming no longer works as it did in version 3.1h. Any ideas?

I have a new uImage with some more USB fixes, which might fix your issues, can you give these a try?

http://dominion.thruhere.net/koen/angstrom/beaglebone/uImage-3.2.5-r2a+gitr09e9651bcf2ee8d86685f2a8075bc6557b1d3b91-beaglebone-20120210140111.bin
http://dominion.thruhere.net/koen/angstrom/beaglebone/modules-3.2.5+-r2a+gitr09e9651bcf2ee8d86685f2a8075bc6557b1d3b91-beaglebone.tgz

Copy the uImage to the fat partition (after renaming it) and extra the modules to your rootfs, reboot, depmod -a, reboot.

regards,

Koen


>
> Dave.
>
> On 12/15/2011 02:25 PM, David Lambert wrote:
>> Thanks for all the suggestions. I found that "./oebb.sh update followed by bitbake virtual-kernel" produced a kernel that now works!
>>
>> Dave.
>>
>>
>>
>

> --
> To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard...@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq

David Lambert

unread,
Feb 10, 2012, 11:48:14 AM2/10/12
to beagl...@googlegroups.com
Thanks for your quick reply. Unfortunately this did not work but there
are a couple of messages that I thought might be a clue:

During bootup:
[ 7.192468] musb_g_ep0_irq 720: SetupEnd came in a wrong ep0stage setup

A couple of minutes later:
root@argus2:~# [ 107.383667] usb_process_rx_queue 1463: Invalid PD
popped from Rx completion queue

heint...@gmail.com

unread,
Feb 15, 2012, 11:45:00 AM2/15/12
to beagl...@googlegroups.com
Any updates on this? I seem to be having the same issue. My camera is a Creative Live! Cam Sync (uvcvideo). Select timeouts in the demo v4l program. Various other programs timeout or hang. No suspicious messages in dmesg. I have a few non-uvc webcams and verified they work.

Wayne Visser

unread,
Feb 15, 2012, 12:13:29 PM2/15/12
to beagl...@googlegroups.com

I have managed to get a UVC camera to work. Worked on the stock
2012-01-27 angstrom distribution (3.1.0+) and also worked after
upgrading to 3.2.0+. In both cases I used mjpg_streamer.

However, the best I can get is about 7fps at 320x240 and can only use
YUV mode. No 640x480 or greater resolution seems possible. I did find
a post about enabling DMA in musb, but I haven't tried that yet.

http://osdir.com/ml/beagleboard/2011-12/msg00393.html

No luck yet with a non-uvc camera...

--- Wayne

Hein

unread,
Feb 15, 2012, 2:52:25 PM2/15/12
to beagl...@googlegroups.com, wa...@vissernet.ca
I tried on the 2012-01-27 image with no luck. Tried http://elinux.org/BeagleBoardUbuntu#Oneiric_11.10 too. My UVC webcam still didn't work but both of my gspca webcams worked. Didn't get a chance to test them on Angstrom thou. I'll try later if I have time.

David Lambert

unread,
Feb 27, 2012, 10:04:30 AM2/27/12
to beagl...@googlegroups.com
I still have had no luck with UVC on the 3.2 kernel. I tried the
"released" image
Angstrom-Cloud9-IDE-eglibc-ipk-v2012.02-core-beaglebone-2012.02.14.img.xz,
but still UVC does not work. Any suggestions?

> chance to test them on Angstrom thou. I'll try later if I have time. --

mrne

unread,
Feb 28, 2012, 9:38:14 AM2/28/12
to Beagle Board
I had some issues with kernel 3.1.0+ (uvc driver failed eventually)
but solved them after installing the kernel 3.2.6+
> opkg install kernel-3.2.6+
> opkg install kernel-image-3.2.6+

and then:
> mkdir sd
> mount /dev/mmcblk0p1 sd
> cp /boot/uImage-3.2.6+ sd
> umount sd
> reboot

On 27 feb, 16:04, David Lambert <d...@lambsys.com> wrote:
> I still have had no luck with UVC on the 3.2 kernel. I tried the
> "released" image
> Angstrom-Cloud9-IDE-eglibc-ipk-v2012.02-core-beaglebone-2012.02.14.img.xz,
> but still UVC does not work. Any suggestions?
>
> On 02/15/2012 01:52 PM, Hein wrote:
>
>
>
>
>
>
>
> > I tried on the 2012-01-27 image with no luck. Tried
> >http://elinux.org/BeagleBoardUbuntu#Oneiric_11.10too. My UVC webcam

mrne

unread,
Feb 28, 2012, 9:39:35 AM2/28/12
to Beagle Board
Sorry an errata:
I had some issues with kernel 3.1.0+ (uvc driver failed eventually)
but solved them after installing the kernel 3.2.6+

> opkg install kernel-3.2.6+
> opkg install kernel-image-3.2.6+

and then:

> mkdir sd
> mount /dev/mmcblk0p1 sd
> cp /boot/uImage-3.2.6+ sd/uImage
> umount sd
> reboot

David Lambert

unread,
Mar 16, 2012, 9:51:27 AM3/16/12
to vishnu, beagleboard
I had found that one of the intermediate 3.1 kernels worked fine, but
when I upgraded to 3.2, it stopped working again. Currently I am still
using that 3.1 kernel which I will attach in a private email. In the
meantime I hope that the 3.2 kernel will fix this issue as it stabilizes
for the Beaglebone.

Regards,

Dave.


On 03/16/2012 08:20 AM, vishnu wrote:
> Hi David,
>
> I am facing the same issue? How did u fix it? Please let me know

Sorat A

unread,
Mar 19, 2012, 11:22:37 AM3/19/12
to beagl...@googlegroups.com, vishnu
Dear Mr. David,

I try to do image processing on beaglebone (ubuntu oneiric) and I stuck with as same as your problem.
Previously, I try updating the kernel to 
bone: v3.2-psp5
 kernel, but it can not resolve this problem, too.
After that, while I don't know how to deal with this problem, I found your post.
 
It seems, You can solve this problem with switch the kernel to intermediate 3.1 kernels, right?
If the answer is yes, what does the intermediate 3.1 kernels means? Could please suggest me the way you used?

Thank you in advance
Sorat A.

David Lambert

unread,
Mar 19, 2012, 1:23:27 PM3/19/12
to beagl...@googlegroups.com
This appears to be an issue with the USB DMA driver on the Beaglebone. When I first transitioned from the Bagleboard XM I noticed that shared memory UVC streaming would not work for me. Sometime around February 9, I built a 3.1 kernel from scratch which worked albeit with surprisingly high CPU load. Later kernels (3.2.x) would not work for me. Yesterday someone else suggested rebuilding the kernel with USB DMA disabled (CONFIG_MUSB_PIO_ONLY=y). This appears to work. The CPU load is about half that of the 3.1 kernel (around 10% when streaming 640x480 YUYV at 15fps).

I hope in future that there is a fix for USB-DMA, but this works for me right now.

Regards,

Dave.
--

Sorat A

unread,
Mar 19, 2012, 1:34:31 PM3/19/12
to beagl...@googlegroups.com
Dear Mr.David,

Thank you very much for your answers.
I will try your solution. :)

Regards,
Sorat A.

เมื่อ วันอังคารที่ 20 มีนาคม ค.ศ. 2012, 0 นาฬิกา 23 นาที 27 วินาที UTC+7, David เขียนว่า:

vishnu

unread,
Mar 19, 2012, 11:04:09 AM3/19/12
to Beagle Board
Koen,

I have tried disabling USB DMA in 3.2 kernel. It worked for me. I
was able to capture properly at 320x240. But 640x480 did not work.

On Feb 10, 8:45 pm, Koen Kooi <k...@beagleboard.org> wrote:
> Op 10 feb. 2012, om 16:38 heeft David Lambert het volgende geschreven:
>
> > I just updated my kernel to 3.2 and found that UVC video YUYV streaming no longer works as it did in version 3.1h. Any ideas?
>
> I have a new uImage with some more USB fixes, which might fix your issues, can you give these a try?
>
> http://dominion.thruhere.net/koen/angstrom/beaglebone/uImage-3.2.5-r2...http://dominion.thruhere.net/koen/angstrom/beaglebone/modules-3.2.5+-...

David Lambert

unread,
Mar 19, 2012, 2:01:09 PM3/19/12
to beagl...@googlegroups.com
I have found that 640x480 only works intermittently with the 3.2.9+
kernel (DMA disabled) - images are very dark.

David Lambert

unread,
Mar 19, 2012, 2:29:44 PM3/19/12
to beagl...@googlegroups.com
On 03/19/2012 01:01 PM, David Lambert wrote:
> I have found that 640x480 only works intermittently with the 3.2.9+
> kernel (DMA disabled) - images are very dark.
>
Please ignore my last comment. It appears that my camera has a very slow
AGC after initialization.

Apologies for any confusion. :-[

Dave.

Sorat A

unread,
Mar 19, 2012, 10:30:29 PM3/19/12
to beagl...@googlegroups.com
Dear Mr.David

Just report, I already try rebuilding the 
bone: v3.2-psp5
 kernel with USB DMA disabled (CONFIG_MUSB_PIO_ONLY=y),
the output images from camera looks broken, it filled with stripes and noises. Be at the end of one's wits for now.

Anyway, really thanks for your help

Regards,
Sorat A. 

Sorat A

unread,
Mar 22, 2012, 12:13:47 PM3/22/12
to beagl...@googlegroups.com
Dear Mr. David,

just FYI,
finally I found that your suggestion is work, but only in case captured (image) size < 640x480 pixels.
and Thank you again :) 

Regards
Sorat A.

mpom...@googlemail.com

unread,
Mar 31, 2012, 2:22:34 PM3/31/12
to beagl...@googlegroups.com
Hello,

a Linux newbie here, but with the same issues with UVC webcams and BeagleBone. My question is, what steps are there to either disable DMA on the USB controller at runtime, or recompile the kernel, with an option (like CONFIG_MUSB_PIO_ONLY) changed?

Thanks for the time,
Mihai Pomarlan

David Lambert

unread,
Apr 12, 2012, 4:22:57 PM4/12/12
to beagl...@googlegroups.com
On 03/31/2012 01:22 PM, mpom...@googlemail.com wrote:
> Hello,
>
> a Linux newbie here, but with the same issues with UVC webcams and
> BeagleBone. My question is, what steps are there to either disable DMA
> on the USB controller at runtime, or recompile the kernel, with an
> option (like CONFIG_MUSB_PIO_ONLY) changed?
I recompiled the kernel with CONFIG_MUSB_PIO_ONLY=y. I believe that
there is an option that you can pass to a module at load time, but I do
not have the details at this time. I think they are in the kernel config
help.

HTH,

Dave.

Krcevina

unread,
Sep 4, 2012, 8:05:19 AM9/4/12
to beagl...@googlegroups.com
Hello Mr. David,

I'm a student and I'm working with BeagleBoard REVC4. Currently I have problems with USB WEB camera (with UVC support). When I boot kernel (version 3.5.0-dirty) on BB I do the following:

"depmod -a"

then in folder /lib/modules/3.5.0-dirty/kernel/drivers/media/video/uvc I type

"insmod uvcvideo.ko"

The following appears on console:
[  119.566070] uvcvideo: Unknown symbol vb2_queue_init (err 0)                                                                                                  
[  119.572753] uvcvideo: Unknown symbol vb2_streamoff (err 0)                                                                                                   
[  119.578643] uvcvideo: Unknown symbol vb2_queue_release (err 0)                                                                                               
[  119.584869] uvcvideo: Unknown symbol vb2_poll (err 0)                                                                                                        
[  119.590332] uvcvideo: Unknown symbol vb2_dqbuf (err 0)                                                                                                       
[  119.595825] uvcvideo: Unknown symbol vb2_reqbufs (err 0)                                                                                                     
[  119.601593] uvcvideo: Unknown symbol vb2_streamon (err 0)                                                                                                    
[  119.607360] uvcvideo: Unknown symbol vb2_querybuf (err 0)                                                                                                    
[  119.613067] uvcvideo: Unknown symbol vb2_qbuf (err 0)                                                                                                        
[  119.618469] uvcvideo: Unknown symbol vb2_buffer_done (err 0)                                                                                                 
[  119.624450] uvcvideo: Unknown symbol vb2_plane_vaddr (err 0)                                                                                                 
[  119.630554] uvcvideo: Unknown symbol vb2_vmalloc_memops (err 0)                                                                                              
[  119.636962] uvcvideo: Unknown symbol vb2_mmap (err 0)                                                                                                        
insmod: error inserting 'uvcvideo.ko': -1 Unknown symbol in module         

then I try with: "modprobe uvcvideo"

and I get:

[  141.286560] usbcore: registered new interface driver uvcvideo                                                                                                
[  141.292755] USB Video Class driver (1.1.1)      

After that in file  /lib/modules/3.5.0-dirty/kernel/drivers/usb/gadget I type

"insmod g_webcam,ko"

and I get:

[  337.707519]  gadget: uvc_function_bind                                                                                                                       
[  337.724212]  gadget: Webcam Video Gadget                                                                                                                     
[  337.728363]  gadget: g_webcam ready                                                                                                                          
[  337.732147] musb-hdrc musb-hdrc: MUSB HDRC host driver                                                                                                       
[  337.738922] musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 2                                                                               
[  337.747161] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002                                                                                    
[  337.754272] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1                                                                               
[  337.761901] usb usb2: Product: MUSB HDRC host driver                                                                                                         
[  337.767181] usb usb2: Manufacturer: Linux 3.5.0-dirty musb-hcd                                                                                               
[  337.773345] usb usb2: SerialNumber: musb-hdrc                                                                                                                
[  337.780517] hub 2-0:1.0: USB hub found                                                                                                                       
[  337.784637] hub 2-0:1.0: 1 port detected               

After that i plug my USB WEB camera directly in the USB port (not the OTG one) and I get nothing. There isn't "video" in /dev.

I tried connecting USB WEB camera with BB through high-speed USB hub (powered with external 5 V) but still I get nothing...

Could you tell me what am I missing?

David Lambert

unread,
Sep 4, 2012, 8:32:33 AM9/4/12
to beagl...@googlegroups.com
Krcevina,
Apparently there is a problem when USB DMA is enabled for
isochronous transfers (which UVC uses) . I am told that TI have been
working on this for years, but there is still no fix :-( . The
workaround that I use is to recompile the kernel with USB DMA disabled
(CONFIG_MUSB_PIO_ONLY=y).


HTH,

Dave.

Krcevina

unread,
Sep 4, 2012, 11:16:56 AM9/4/12
to beagl...@googlegroups.com
Thank You Mr. David for your quick replay.

Now I can see video0 on /dev/.

When I type "gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=320,height=240 ! fakesink"

i got the following message:

Setting pipeline to PAUSED ...                                                                                                                                  
ERROR: Pipeline doesn't want to pause.                                                                                                                          
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' is not a capture device.                                                   
Additional debug info:                                                                                                                                          
v4l2_calls.c(510): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:                                                                                
Capabilities: 0x4000002                                                                                                                                         
Setting pipeline to NULL ...                                                                                                                                    
Freeing pipeline ...                       

So, still to work :) If I eventually get it work I will report here so that maybe that information can benefit someone.



Krcevina

unread,
Dec 13, 2012, 4:11:16 AM12/13/12
to beagl...@googlegroups.com
Hello Halil,

If I can remember correctly, the problem was bad EHCI port. I solved it by applying these two patches:

[PATCH 1/2] ARM: OMAP: USB: Fixup ehci_hcd_omap_probe error path

A recent commit, [PATCH] Fix OMAP EHCI suspend/resume failure
(i693) '354ab856' causes ehci probe to fail on omap3xxx. This
exposed bugs in the ehci_hcd_omap_probe error path causing
an oops.

On the error path, call usb_remove_hcd if usb_add_hcd has been
called, and call usb_put_hcd if usb_alloc_hcd has been called.

Tested on BB-xM.

Signed-off-by: Russ.Dill <at> ti.com
---
 drivers/usb/host/ehci-omap.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 17cfb8a..6e15fc8 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -347,7 +347,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
 	ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
 	if (ret) {
 		dev_err(dev, "failed to add hcd with err %d\n", ret);
-		goto err_add_hcd;
+		goto err_pm_runtime;
 	}

 	/* root ports should always stay powered */
@@ -424,8 +424,12 @@ err_utmi_p1_fck:
 	clk_put(utmi_p1_fck);

 err_add_hcd:
+	usb_remove_hcd(hcd);
+
+err_pm_runtime:
 	disable_put_regulator(pdata);
 	pm_runtime_put_sync(dev);
+	usb_put_hcd(hcd);

 err_io:
 	iounmap(regs);
--

[PATCH 2/2] ARM: OMAP: USB: Fix omap3xxx EHCI regression caused by i693 errata fix.

[PATCH] Fix OMAP EHCI suspend/resume failure (i693) '354ab856' causes an oops on boot for all omap3xxx platforms that use usbhs_omap for EHCI. The actual oops comes from faulty ehci-omap cleanup, but the failure caused by the change is evidenced here: [ 3.655059] ehci-omap ehci-omap.0: utmi_p1_gfclk failed error:-2 [ 3.661376] ehci-omap: probe of ehci-omap.0 failed with error -2 utmi_p1_gfclk is a clock that exists on OMAP4, but not OMAP3. In the OMAP3 case, it is configured as a dummy clock. However, OMAP4 lists the dev_id as NULL, but OMAP3 lists it as "usbhs_omap". Attempting to get that clock from ehci-omap then fails. The solution is to just change the clock3xxx_data.c for dummy clocks used in the errata fix to match the dev_id, NULL, used in clock44xx_data.c. Tested on BB-xM. Signed-off-by: Russ Dill <Russ.Dill <at> ti.com> --- arch/arm/mach-omap2/clock3xxx_
data.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 4e1a3b0..59d5315 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3391,15 +3391,15 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK(NULL,	"usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK(NULL,	"usbhost_ick",	&usbhost_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
 	CLK("usbhs_omap",	"usbhost_ick",	&usbhost_ick,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
-	CLK("usbhs_omap",	"utmi_p1_gfclk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"utmi_p2_gfclk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"xclk60mhsp1_ck",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"xclk60mhsp2_ck",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"usb_host_hs_utmi_p1_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"usb_host_hs_utmi_p2_clk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"utmi_p1_gfclk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"utmi_p2_gfclk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"xclk60mhsp1_ck",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"xclk60mhsp2_ck",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"usb_host_hs_utmi_p1_clk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"usb_host_hs_utmi_p2_clk",	&dummy_ck,	CK_3XXX),
 	CLK("usbhs_omap",	"usb_tll_hs_usb_ch0_clk",	&dummy_ck,	CK_3XXX),
 	CLK("usbhs_omap",	"usb_tll_hs_usb_ch1_clk",	&dummy_ck,	CK_3XXX),
-	CLK("usbhs_omap",	"init_60m_fclk",	&dummy_ck,	CK_3XXX),
+	CLK(NULL,	"init_60m_fclk",	&dummy_ck,	CK_3XXX),
 	CLK(NULL,	"usim_fck",	&usim_fck,	CK_3430ES2PLUS | CK_36XX),
 	CLK(NULL,	"gpt1_fck",	&gpt1_fck,	CK_3XXX),
 	CLK(NULL,	"wkup_32k_fck",	&wkup_32k_fck,	CK_3XXX),
--

That was my problem, and I solved it, but maybe you have other kind of problem... Good luck!


Vojislav Mokric

unread,
Dec 13, 2012, 3:16:04 PM12/13/12
to beagl...@googlegroups.com
I have experienced many problems with BB but at the end everything worked. You got to love it. I'm glad that you solved your current problem. Prepare yourself  for many more :D

Cheers!

On Thu, Dec 13, 2012 at 7:05 PM, Halil Can Kaşkavalcı <com...@gmail.com> wrote:
Hi Krcevina,

Thanks for your reply. I tried to flash downloaded Angstrom to flash and surprisingly it worked. Maybe new version included that fix. Also I experienced if I don't set resolution, I get timeout errors again. 800x600, 1024x768, 2048x1536 worked fine but not 640x480 :)
--
For more options, visit http://beagleboard.org/discuss
 
 

Teknoman117

unread,
Dec 17, 2012, 2:40:50 AM12/17/12
to beagl...@googlegroups.com
Its this still the solution?  I have video working mostly, I'm just using the straight API, wrote my own framegrabber code and I can pull mjpeg frames and small yuyv frames.  If the input size of the image gets to a certain point, the driver just truncates the transmission to about 70 - 80k of image data.

- Nathaniel

Michael Darling

unread,
Mar 5, 2013, 5:44:00 PM3/5/13
to beagl...@googlegroups.com
Hello, Krcevina!  (and anyone else willing to help)

I am trying to use the BeagleBone to run OpenCV but have been having issues capturing images of reasonable quality from the Playstation 3 Eye webcam.  I am able to run my vision applications on my desktop with absolutely no problem, but receive timeout errors when trying to capture 640x480 frames on the BeagleBone, exactly as described in this thread.

I have tried a number of different things, but haven't been unable to resolve the issue.  It sounds like your fix is the most promising.  However, I am brand new to embedded Linux and am not very familiar with the kernel build process.  I was hoping that you could provide just a little bit more detail of how you applied these patches.

So far, I have found these two pages the most helpful:


Where exactly do I need to apply your patches, and what steps do I need to take to make sure they get applied?  If I am correct, I should be modifying/adding things in this directory: /setup-scripts/sources/meta-ti/recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/

I also see in the "defconfig" file that the default settings for the following lines are:
# CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_MUSB_HDRC=y
and
 CONFIG_MUSB_PIO_ONLY=y

What should I use for these settings?  From a terminal call to dmesg, I see that my desktop is using EHCI_HCD to interface with the camera, while I believe the BeagleBone is using MUSB.  

Thank you in advance for your help.  I am trying to get this working as part of my thesis work, and have come to a dead stop trying to deal with this hardware issue.


-Mike

Michael Darling

unread,
Mar 9, 2013, 8:11:16 PM3/9/13
to beagl...@googlegroups.com
I found a fix that gave (very slight) improvement:  http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=35689&p=305745


Its looking like something in the uvcvideo driver or v4l2 is the culprit.

Michael Darling

unread,
Jun 11, 2013, 4:29:23 AM6/11/13
to beagl...@googlegroups.com
Hey Andrei,

I have spent tons of time trying to track down the issue, but I really don't have the embedded Linux know-how to have made much headway.  I have been able to get 640x480 frames but only at a very low framerate, and if I jump through some hoops in starting my program up.  I found that (if you are trying to use OpenCV, like me) OpenCV actually doesn't work at setting the framerate (at least for cameras controlled under the V4L2 API -- you can confirm this by 'set' and 'get' calls on the camera capture object).  I used Martin's custom capture code from here:  https://bitbucket.org/beldenfox/cvcapture/src/b7f279b278aa?at=default.

I just compiled OCVCapture along with the rest of my project and used the capture.cpp file as an example for how to capture from the OCVCapture object in my own project.  If I remember right, 15fps worked "stock" but I had to go through some trickery to get 30 fps to work.

Here are a couple of other places that I have posted to -- you might find these resources helpful.  (You may want to ctrl+F to filter through to find my posts)

http://bear24rw.blogspot.com/2009/11/ps3-eye-driver-patch.html
https://groups.google.com/forum/?fromgroups#!topic/beagleboard/G5Xs2JuwD_4


And here is a git repo that I have used for saving my capture code into.  Its been awhile since I touched it and I really just intended to use it for my own purpose, so I apologize if its all a little bit jankey.
https://github.com/mdarling39/PS3EyeCapture.git


I bought a BeagleBone black, myself, hoping that it would resolve the issue but haven't had the time to try it out yet (I have shifted my thesis focus to less frustrating things for now).  I will try and answer any questions I can, but you are probably better-versed in Linux than I am.  I have some email correspondence with other people I can share with you privately, but I don't know that any of it was very helpful to me anyways.


Best of luck.
-Mike


On Sat, Jun 8, 2013 at 8:59 AM, Andrei <and...@gmail.com> wrote:
UPDATE 3:

In case anyone else who has similar problems is interested:

* I noticed mjpg_streamer works perfectly with the higher res: mjpg_streamer -i "./input_uvc.so -d /dev/video0 -r 640x480" -o "./output_http.so -w ./www" (starts streaming to http localhost port 8080)
* motion will also work flawlessly if you set v4l2_palette 2 (i.e. MJPEG)
* I'm using the demo image at http://elinux.org/BeagleBoardUbuntu (Raring 13.04) probably with the default settings (DMA enabled); no other special settings have been used for the uvcvideo module (so no modprobe uvcvideo custom_setting=val or anything like that was required)


On Friday, June 7, 2013 10:15:06 PM UTC+8, Andrei wrote:
UPDATE 2:

Managed to get the kernel installed (with CONFIG_MUSB_PIO_ONLY) using the instructions here: http://ferryzhou.wordpress.com/2012/04/24/beaglebone-audio-kworker-noise-solution/ but the problem persists. I can't capture at res. above 320x240 (programs hang).

Also, tested uvccapture -x640 -y480 -w -m on the Angstrom Linux which comes on board and it hangs as well. The Angstrom Linux that comes with my Beaglebone Black supposedly already has CONFIG_MUSB_PIO_ONLY=y by default.

So no, this will not fix the issue on the Beaglebone Black.

Any other ideas?

Thanks!

On Thursday, June 6, 2013 11:18:23 PM UTC+8, Andrei wrote:
Update: it seems that the consensus is that I should set CONFIG_MUSB_PIO_ONLY=y when compiling the kernel.

As such, could someone please assist me in doing either:

1.) Recompiling the kernel with CONFIG_MUSB_PIO_ONLY=y; how do I do that for an Ubuntu image taken from here: http://elinux.org/BeagleBoardUbuntu (which is apparently using a base kernel from here: git://github.com/RobertCNelson/stable-kernel.git); I just need a few general pointers, I can manage the details...

2.) Disabling DMA (that is, setting CONFIG_MUSB_PIO_ONLY=y) at run time, even though it is enabled in the kernel. This option may be easier to do, if possible.

Thanks!

On Thursday, June 6, 2013 9:53:14 PM UTC+8, Andrei wrote:
Do you guys have any updates on this issue?

I have a Beaglebone Black, and used Ubuntu 13.04 and 12.10 both with the 3.8 kernel and I can only capture at the maximum resolution of 320x240. Very annoying...

Is there a definitive fix for this? I read that some recommended to enable DMA whereas others said that DMA has to be disabled. Others said that it used to work with a 3.2 kernel, but I found no image for my Beaglebone Black with the 3.2 kernel (Arch Linux installed using the manual method doesn't work on my Beaglebone Black; at least with Arch Linux I could have had more freedom to tinker with low level things like the kernel etc.).

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/sgCwaP5RVUo/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages