Repository navigation
Description
Hi,
I need some help debugging a USB transfer problem on my raspberry pi.
The problem is that the DVB Transport stream recorded from a USB DVB stick (cinergy htc stick)
attached to a usb hub which is attached to the raspberry pi is broken because packages are missing.
I plugged the USB DVB stick directly into the Pi's USB Port (with additional power) with the
same results. I use the latest media_build from linuxtv.org against the 3.1.9 raspberry pi kernel.
The same drivers from the media_build work perfectly with a 3.1.9 kernel on my thinkpad.
When turning on debugging in the DVB driver I get the following messages:
[ 126.162705] tda18271: performing RF tracking filter calibration [ 128.056572] tda18271: RF tracking filter calibration complete [ 128.057855] em28xx #0/2-dvb: Using 5 buffers each with 64 x 940 bytes [ 129.052712] em28xx #0/2-dvb: ISO ERROR COUNT: 1. [ 129.052743] em28xx #0/2-dvb: URB packet 0, status -4001 [Unknown]. [ 129.581352] em28xx #0/2-dvb: ISO ERROR COUNT: 1. [ 129.581384] em28xx #0/2-dvb: URB packet 0, status -4001 [Unknown]. [ 129.872090] em28xx #0/2-dvb: ISO ERROR COUNT: 1. [ 129.872122] em28xx #0/2-dvb: URB packet 0, status -4001 [Unknown]. [ 129.969224] em28xx #0/2-dvb: ISO ERROR COUNT: 1. [ 129.969258] em28xx #0/2-dvb: URB packet 44, status -4001 [Unknown].
My assumption is that the isochronous transfer is broken for the usb host driver.
The error code is defined in:
drivers/usb/host/dwc_common_port/dwc_os.h:#define DWC_E_NO_STREAM_RES 4001
which is caused by a DWC_OTG_HC_XFER_FRAME_OVERRUN in the URB:
dwc_otg/dwc_otg_hcd_intr.c: frame_desc->status = -DWC_E_NO_STREAM_RES;
I'm a bit lost since I do not have any USB specific knowledge but I really want
to get the DVB Stick running. What can I do for further testing/debugging?
Thanks for your help!
Cheers,
Ruben
Activity
Dexterp37 commentedon Aug 13, 2012
I guess this is closely related to the problem we are experiencing with the Kinect as documented here
r10r commentedon Aug 15, 2012
@Dexterp37 Do you have any solution for this problem? Or is there any work in progress?
Dexterp37 commentedon Aug 15, 2012
Sadly.. no :( I noticed that latest kernel source has update USB driver so I'm trying to compile the kernel from source and see if it helps.
r10r commentedon Aug 15, 2012
Which kernel are you trying? The latest https://github.com/raspberrypi/linux.git from @popcornmix ? Please let me know if it works for you.
Dexterp37 commentedon Aug 16, 2012
At the moment I'm trying to compile the one from @popcornmix . I'll also give 3.2.x from https://github.com/bootc/linux/tree/rpi-3.2.23 a try. I'm still fighting with some cross compilation/fork issues with Cygwin on Windows.
r10r commentedon Aug 16, 2012
I recommend you to use a debian VM for cross compilation. Setting up the toolchain there is really simple.
Last version I tried was 921a3d1 - but maybe the newest commit df9a562 fixes something.
r10r commentedon Aug 18, 2012
@Dexterp37 The error code has changed, but unfortunately USB isoc transfer is still broken with the latest raspberry pi kernel:
r10r commentedon Aug 18, 2012
@Dexterp37 You can try the patch from #29 (comment). With this patch I can at least use the TPLink wireless dongle and my USB keyboard together.
popcornmix commentedon Aug 20, 2012
Can you try latest firmware with:
dwc_otg.microframe_schedule=1
added to cmdline.txt
r10r commentedon Aug 20, 2012
Hi thanks for the info. I already tried 0872b20 with the microframe scheduler patch? I already tried the microframe scheduler patch before - USB is more stable, but isoc transfer is still broken.
Dexterp37 commentedon Aug 25, 2012
I can confirm that the transfer is still broken. Tried this morning with latest kernel + microframe schedule and Microsoft Kinect.
ghollingworth commentedon Aug 31, 2012
Can you do a lsusb -v to output the endpoint information, just be interested to see if it's highbandwidth isochronous endpoints that are the problem...
Likely issue is that it's just the same high latency problem we're seeing elsewhere (i.e. interrupts are disabled for long enough that we miss processing the isochronous requests until the source overrun's its buffers)
Gordon
Dexterp37 commentedon Aug 31, 2012
@ghollingworth this is my lsusb -v for Microsoft Kinect. This was done by directly connecting to the pi, without an hub. If you need I can provide a lsusb -v listing with an hub too.
http://pastebin.com/wxY7NQCT
r10r commentedon Aug 31, 2012
@ghollingworth you can find the output from lsusb -v at https://gist.github.com/3549890. The output from the DVB-C stick is below the full output.
Are you working on this issue Gordon? Is this similar to the spinlock problem in the sdhci driver?
r10r commentedon Aug 31, 2012
direct link is https://gist.github.com/3549890#file_terratec%20dvb_c%20htc%20stick
127 remaining items
scx: Sync from scx repo
bpf: Fix a few selftest failures due to llvm18 change
bpf: Fix a few selftest failures due to llvm18 change
powerpc/bpf/32: Fix failing test_bpf tests
powerpc/32: Remove powerpc select specialisation
Merge branch 'Support bpf trampoline for s390x'
cifs: Fix warning and UAF when destroy the MR list
bpf: Fix a few selftest failures due to llvm18 change
powerpc/bpf/32: Fix failing test_bpf tests
LoongArch: BPF: Optimize sign-extention mov instructions
net/sched: sch_fq_codel: Do not call qdisc_tree_reduce_backlog during…
net/sched: sch_fq_codel: Do not call qdisc_tree_reduce_backlog during…
net/sched: sch_fq_codel: Do not call qdisc_tree_reduce_backlog during…
net/sched: sch_fq_codel: Do not call qdisc_tree_reduce_backlog during…
riscv, bpf: Add support for BPF_MOVSX in RV32 JIT