usb 3.0 uvc camera issue.

We are using an UVC camera with TX2, capturing at fix resolution and format. We set the video stream on and off on the fly, and eventually the camera will stop streaming with following issue. We are using R28.1.

[ 4924.099096] xhci-tegra 3530000.xhci: Ring expansion failed
[ 4924.158310] xhci-tegra 3530000.xhci: Ring expansion failed
[ 4924.158471] uvcvideo: Failed to submit URB 61 (-12).
[ 4924.283168] uvcvideo: Failed to resubmit video URB (-12).
[ 4924.347856] xhci-tegra 3530000.xhci: Ring expansion failed
[ 4924.413365] uvcvideo: Failed to resubmit video URB (-12).
[ 4924.478046] xhci-tegra 3530000.xhci: Ring expansion failed
[ 4924.543559] uvcvideo: Failed to resubmit video URB (-12).
[ 4924.608234] uvcvideo: Failed to resubmit video URB (-1).
[ 4924.716657] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6
[ 4924.787851] ------------[ cut here ]------------
[ 4924.842827] WARNING: at ffffffc00074f1f8 [verbose debug info unavailable]
[ 4924.924073] Modules linked in: iptable_filter ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat ip_tables rfcomm bnep hci_uart snd_usb_audio uvcvideo snd_hwdep snd_usbmidi_lib videobuf2_vmalloc bcmdhd cfg80211 pci_tegra bluedroid_pm

[ 4925.221450] CPU: 4 PID: 1182 Comm: cpn Not tainted 4.4.38 #59
[ 4925.299679] Hardware name: quill (DT)
[ 4925.343451] task: ffffffc07a9d8c80 ti: ffffffc1d25fc000 task.ti: ffffffc1d25fc000
[ 4925.433037] PC is at vb2_start_streaming+0xc8/0x148
[ 4925.491364] LR is at vb2_start_streaming+0x64/0x148
[ 4925.549649] pc : [<ffffffc00074f1f8>] lr : [<ffffffc00074f194>] pstate: 20000045
[ 4925.638217] sp : ffffffc1d25ffb50
[ 4925.677789] x29: ffffffc1d25ffb50 x28: ffffffc001280520
[ 4925.753733] x27: 0000000000000001 x26: ffffffc1d25ffd30
[ 4925.817309] x25: 0000000000000000 x24: ffffffbffd1082a8
[ 4925.880883] x23: ffffffc1e1761f80 x22: ffffffc1e2708900
[ 4925.944457] x21: ffffffc0593df6b0 x20: ffffffc0593df698
[ 4926.008032] x19: 00000000fffffff4 x18: 0000000000000014
[ 4926.071608] x17: 0000007f9b5cdf68 x16: ffffffc0001d7394
[ 4926.135183] x15: 001dcd6500000000 x14: ffffffc000f8d1e0
[ 4926.198757] x13: 000000008002f0c0 x12: 0000000000000008
[ 4926.262332] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f
[ 4926.325907] x9 : 66646b687568714f x8 : 7f7f7f7f7f7f7f7f
[ 4926.389481] x7 : 0000000040000000 x6 : 0000000000210d00
[ 4926.453057] x5 : ffffffbffd104da0 x4 : 0000000000000000
[ 4926.516633] x3 : 0000000000000000 x2 : 000000000000297e
[ 4926.580205] x1 : 0000000000000000 x0 : 00000000fffffff4

[ 4926.661528] ---[ end trace 5db50a21020ab674 ]---
[ 4926.704376] Call trace:
[ 4926.733533] [<ffffffc00074f1f8>] vb2_start_streaming+0xc8/0x148
[ 4926.804352] [<ffffffc0007509a4>] vb2_core_streamon+0x138/0x168
[ 4926.874139] [<ffffffc000752720>] vb2_streamon+0x3c/0x60
[ 4926.936650] [<ffffffbffd100174>] uvc_queue_streamon+0x2c/0x48 [uvcvideo]
[ 4927.016845] [<ffffffbffd101298>] uvc_ioctl_streamon+0x3c/0x68 [uvcvideo]
[ 4927.097041] [<ffffffc000738cc4>] v4l_streamon+0x1c/0x24
[ 4927.159511] [<ffffffc00073cce0>] __video_do_ioctl+0x224/0x298
[ 4927.228282] [<ffffffc00073c758>] video_usercopy+0x22c/0x574
[ 4927.294942] [<ffffffc00073cab4>] video_ioctl2+0x14/0x1c
[ 4927.357430] [<ffffffc000737a9c>] v4l2_ioctl+0xbc/0xcc
[ 4927.417847] [<ffffffc0001d528c>] do_vfs_ioctl+0x328/0x5e8
[ 4927.482411] [<ffffffc0001d55d0>] SyS_ioctl+0x84/0x98
[ 4927.541796] [<ffffffc000084ff0>] el0_svc_naked+0x24/0x28

Please share the steps to reproduce the issue. We will try to reproduce it with our USB cameras. Thanks.

Hi, we have our own application which open the video device first, and leave the open until exiting. During the running period, we query the cap, format, resolution, and set the format and resolution accordingly. We set the stream type and buffer, then turn on the stream on/off depend on our need. This routine works OK in TX1. Those error usually happen after 10 times on/off switching, then we will fail to start the steam anymore.

Hi usaarizona,
Can you share a simple test app for us to reproduce the issue? Have you tried other USB cameras? Or is it specific to certain camera?

Hi DaneLLL,
Who should we speak to in order to solve this problem. We need the HDCP working to pass the encrypted video, and there is no problem in TX1. Thanks.

Hi usaarizona,
We have to reproduce it first. Need your help to share a test app. If you have concerns to share it online, please contact your NVIDIA region salesperson.

There is no HDCP supported on tegra. If you make it enabled, we don’t guarantee the functionality.

Also, why should uvc cam issue is related to hdcp? Please elaborate it.

Could you share a sample to us to reproduce? There is no way to debug if we don’t know how to reproduce.

Hi DaneLLL,

We have problem with one usb 3.0 camera keep reporting “Failed to Submit URB 0”, and we follow this link below to increase the UVC_URBS from 5 to 76 and also the UVC_MAX_PACKETS. which cause this problem, When we change those value back, the problem is gone. Thanks you all the same.

https://devtalk.nvidia.com/default/topic/937487/jetson-tx1/currupted-frames-from-ar1820-usb-camera/

Many thanks for sharing the information.