Beaglebone video capture with stk1160 gives image corruption - DMA issue?

Ladies and Gentlemen,

This is a question for anyone with experience of the USB DMA issues. I’ve been running a beaglebone with an stk1160 ‘easycap’ video capture card.
I’ve had stability issues with the easycap driver and am trying to get the stk1160 driver to work.

When streaming images from motion I get corrupt “choppy” frames - see image attached - does that look like it could be a product of the known USB DMA issues?
(ignore the chrominance - it’s a B/W camera)

I’m using Robert Nelson’s ubuntu precise 12.04hf (3.2-psp16).
I have tried PIO only = Y but it makes it seemingly much worse… reducing the image to a narrow band of noise at the top of the frame.

Any assistance gratefully received,

Regards,

Michael.

So that’s from early July 2012, care to retest with something newer to see if’s fixed?

wget http://rcn-ee.net/deb/precise-armhf/v3.2.33-psp26/install-me.sh
/bin/bash install-me.sh

Regards,

Thanks Robert,

Humble apologies - it’s my notes that are out of date - I’ve booted up and discovered that I was on 3.2.32-psp25, but I’ll upgrade to v3.2.33-psp26 now. I’ll have build the kernel sources and stk1160.ko, so i’ll get back to you soon.

Regards,

Michael.

Just an upate - On 3.2.33-psp26 now and still choppy.

Michael

Any logs ?

Output from dmesg ?

Is that camera using ISO transfers ? What is the average BW (not much considering 8bit per pixel) ?

How are you powering the BB ?

Hi Juanjo,

Thanks for having a look. The author of the driver has had a look at my dmesg and confirms there’s nothing shown up there, but here it is for reference. He has looked into bulk transfers for his stk1160 driver but it isn’t possible, so I assume they are iso transfers.

[ 147.468402] stk1160: registers to PAL like standard
[ 147.703087] stk1160: fourcc format 0x56595559 invalid
[ 147.729742] stk1160: queue_setup: buffer count 8, each 829440 bytes
[ 147.731887] Allocated vmalloc buffer of size 829440 at vaddr=d0938000
[ 147.734231] Allocated vmalloc buffer of size 829440 at vaddr=d0a04000
[ 147.736311] Allocated vmalloc buffer of size 829440 at vaddr=d0ad0000
[ 147.738404] Allocated vmalloc buffer of size 829440 at vaddr=d0b9c000
[ 147.740471] Allocated vmalloc buffer of size 829440 at vaddr=d0c68000
[ 147.742543] Allocated vmalloc buffer of size 829440 at vaddr=d0d34000
[ 147.744713] Allocated vmalloc buffer of size 829440 at vaddr=d0e00000
[ 147.746795] Allocated vmalloc buffer of size 829440 at vaddr=d0ecc000
[ 147.749039] stk1160: vma=0xcfb56bd0
[ 147.751316] stk1160: vma start=0x4283a000, size=831488 (0)
[ 147.752365] stk1160: vma=0xcfb567b0
[ 147.754499] stk1160: vma start=0x42c00000, size=831488 (0)
[ 147.755443] stk1160: vma=0xcfb56700
[ 147.757441] stk1160: vma start=0x42d94000, size=831488 (0)
[ 147.758255] stk1160: vma=0xcfb56758
[ 147.760587] stk1160: vma start=0x42f4a000, size=831488 (0)
[ 147.761419] stk1160: vma=0xcf13c0d0
[ 147.763614] stk1160: vma start=0x4303b000, size=831488 (0)
[ 147.764454] stk1160: vma=0xcf13c128
[ 147.766584] stk1160: vma start=0x43150000, size=831488 (0)
[ 147.773096] stk1160: vma=0xcf13c180
[ 147.775081] stk1160: vma start=0x432ae000, size=831488 (0)
[ 147.776141] stk1160: vma=0xcf13c1d8
[ 147.778315] stk1160: vma start=0x433d6000, size=831488 (0)
[ 147.782708] stk1160: setting alternate 5
[ 147.782743] stk1160: minimum isoc packet size: 3072 (alt=5)
[ 147.782774] stk1160: setting alt 5 with wMaxPacketSize=3072
[ 147.789976] stk1160: 16 urbs allocated
[ 147.801529] stk1160: streaming started
[ 200.928848] stk1160: killing urbs…
[ 200.931512] stk1160: all urbs killed
[ 200.931531] stk1160: setting alternate 0
[ 200.932073] stk1160: streaming stopped
[ 200.934632] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0938000
[ 200.934856] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0a04000
[ 200.935038] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0ad0000
[ 200.935216] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0b9c000
[ 200.935379] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0c68000
[ 200.935548] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0d34000
[ 200.935717] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0e00000
[ 200.935881] vb2_vmalloc_put: Freeing vmalloc mem at vaddr=d0ecc000

Power is via 5v 1.5A regulator.
I’ll try and have a look at bandwidth.

Ezequiel has pushed some updates for his stk1160 driver that i’m going to try now - that will be all I get time to look at tonight.

I was naively hoping the USB DMA problem might have some visual characteristics?

Regards,

Michael.

Hello

I am trying to have the same driver running on BBB as well. How I can have a 3.2 kernel? when I try to run the install_me of old versions it dose install the files; but keep booting with the new kernel on restarting. Trying to fix this… is there any prebuilt SDCard image that has a psp based kernel? How I can force the bone to boot from an older kernel?

Best Regards

Mahammad

laughs, well i didn't code the install-me's to do that.. But it's a
good thing as that 3.2 based kernel is NOT supported for the BBB and
WILL NOT BOOT...

Regards,

Hi Robert… thank you for the information.

Sorry for the typo… I mean install_kernel.sh

I finally managed to install 3.2 PSP kernel over an old Angstrom image. I can see it has CPPi41 driver. Hope it will work… trying with it.

Is there any way to install TI PSP kernel alone or with ubuntu?

I also note that the sdcard with the old kernel runs on BBW only and hangs with LEDs all up on BBB. What changes I should made to make it work on BBB?

Are there any of the linux flavors based on TI PSP kernel? Any sdcard image with TI PSP kernel ready for BBB or BBW? I want that version because the driver maintainer confirmed he verified his driver on the BB with the PSP kernel and it was working ok.

Best Regards

Mahammad

Hi Robert.. thank you for the information.

Sorry for the typo.. I mean install_kernel.sh

I finally managed to install 3.2 PSP kernel over an old Angstrom image. I
can see it has CPPi41 driver. Hope it will work.. trying with it.

Is there any way to install TI PSP kernel alone or with ubuntu?

I also note that the sdcard with the old kernel runs on BBW only and hangs
with LEDs all up on BBB. What changes I should made to make it work on BBB?

I'd say, you'd need to pay about someone a weeks worth of time...

Are there any of the linux flavors based on TI PSP kernel? Any sdcard image
with TI PSP kernel ready for BBB or BBW? I want that version because the
driver maintainer confirmed he verified his driver on the BB with the PSP
kernel and it was working ok.

Sorry, been down that road too many times, unless it's mainline, i
don't care.. :wink:

Regards,