Isochronous can not work under linux

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
laze_4418921
Level 3
Level 3
25 sign-ins First solution authored 25 replies posted

Hi,

    within the  AN75779 firmware i have already make it work well in win10(not work well when transfer video 2560*1024@25fps) and it can't work in linux.

    I want to know what else should be changed to make sure the firmware work well in both windows and linux. and it seems I didn't use the full bandwidth in win10(350MBps),what should i do to transfer video(2560*1024@25fps) in SS mode? 

(https://community.infineon.com/t5/Knowledge-Base-Articles/Change-Bulk-endpoint-to-Isochronous-in-FX3...

 

0 Likes
1 Solution

Hello,

From the logs shared, it seems that the device enumerates as a USB 3.0 device, unlike the Windows logs. For Linux, if you want the device as a USB 3.0 device, please try to reduce the MULT and Burst settings to understand if the bandwidth is causing the issue

Also, If possible please share the USB trace for Windows and Linux both. This will help us to understand the difference in the requests from Linux and Windows.

Regards,
Rashi

View solution in original post

0 Likes
19 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know if the device enumerates properly in Linux. If yes, please explain the issue properly - is the video streaming not working at all or is it streaming but with errors.

Also, please let me know the video bandwidth 2560*1024* 25 *bits/pixel

Regards,
Rashi
0 Likes

Hi,

1.the device can enumerates as uvc-video device in Linux properly, and the video streaming not working at all.

2.the video bandwidth is 2560*1024* 2*25/1024/1024=125MBps

3.the firmware can not streaming at all in win7 even the video frame is 400*300@25fps.

0 Likes

Hello, 

Please share the UART debug prints when the streaming doesn't work on Linux to understand the cause of the issue.

Please confirm if the alternate setting is changed by the host application to stream the video.

The maximum bandwidth achievable using the ISOC-IN endpoint under UVC for USB 3.0 in
Windows 7/8 machine is 24 Mbps because the UVC driver limits the BURST to 1 for the ISOC
endpoint.

Regards,
Rashi
0 Likes
lock attach
Attachments are accessible only for community members.

hi Rashi,

     this is the demo  i used. and it can work well in windows10 and can emunerate correct in linux, but can't transfer any stream. could you tell me what else should i change?

0 Likes

Hello,

As you are using a different resolution/camera, it will be difficult for us to reproduce the issue at our end. 

To debug the issue, please share the UART debug prints for us to check when the issue is seen on Linux PC. Also, please let me know if the streaming is proper when using BULK endpoints?

Regards,
Rashi
0 Likes

hi Rashi,

1.it's proper when using BULK mode.

2.this is the device information when thrans stream@1280*1024(25fps) in windows10.

Bus Type: USB 2.0 mode
Bus Speed: 480 megabit (hi-speed)
Power Drawn: 100 milliamps @ 5.0 volts
Endpoint 0: Type=CTL Class=0e SubClass=01 Protocol=00 MaxPacket=8
Endpoint 2 IN: Type=INT Class=0e SubClass=01 Protocol=00 MaxPacket=40
Endpoint 3 IN: Type=ISOC Class=0e SubClass=02 Protocol=00 MaxPacket=600000
Hardware ID: USB\VID_04B4&PID_00F9&REV_0000&MI_00
Data Read: 1KB @ 60KB/Sec
Data Written: 102 bytes
Isochronous: 17.0GB @ 65.0MB/Sec
Utilization: 100%

3.it's the device information in linux, enumeration seems right。

[ 1141.846205] usb 4-1: new SuperSpeed USB device number 6 using xhci_hcd
[ 1141.867402] usb 4-1: LPM exit latency is zeroed, disabling LPM.
[ 1141.868042] usb 4-1: Isoc endpoint with wBytesPerInterval of 49152 in config 1 interface 1 altsetting 1 ep 131: setting to 46080
[ 1141.868943] usb 4-1: New USB device found, idVendor=04b4, idProduct=00f9
[ 1141.868944] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1141.868945] usb 4-1: Product: FX3
[ 1141.868945] usb 4-1: Manufacturer: Cypress
[ 1141.873418] uvcvideo: Found UVC 1.10 device FX3 (04b4:00f9)
[ 1141.875548] input: FX3: FX3 as /devices/pci0000:00/0000:00:15.0/0000:03:00.0/usb4/4-1/4-1:1.0/input/input10

and it's the error infotmation when use guvcview in linux:

guvcview
GUVCVIEW: version 2.0.2
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (MIXER,'AC97 2ch->4ch Copy Switch',0,0,0): No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (MIXER,'AC97 2ch->4ch Copy Switch',0,0,0): No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable

0 Likes

Hello,

Thank you for the details.

From the USB trace, it seems that each of the Control requests is completed successfully.

Is it possible for you to share UART debug prints from FX3 side. Please let me know if you are using CYUSB3KIT-003  or some custom board

Regards,
Rashi
0 Likes

hi  Rashi,

   it's not easy to get the UART debug information now,cause i'm using custom board with cyusb3014, no more debug interfaces retain after the device work well in bulk trans mode.

0 Likes

hi Rashi,

     can you show me some advice on the situation I am facing,  about configurations that may make the device work well in windows but unnormal in linux?or what configuration need to be changed in my project uploaded before.

    Appreciate for your help!

0 Likes

Hello,

From the logs shared, it seems that the device enumerates as a USB 3.0 device, unlike the Windows logs. For Linux, if you want the device as a USB 3.0 device, please try to reduce the MULT and Burst settings to understand if the bandwidth is causing the issue

Also, If possible please share the USB trace for Windows and Linux both. This will help us to understand the difference in the requests from Linux and Windows.

Regards,
Rashi
0 Likes

hi  Rashi,

    thank you for your suggestion, the device works well in linux after reduce the MULT and Burst. 

    Now i still have one question, when i set MULT (16) Burst(3),the maxpacket can be  600000. but when working in windows 10@superspeed mode  the speed can not increase(Isochronous: 6.6GB @ 45.5MB/Sec). however, i found the speed of your demo is 144.6MB/Sec with the same configration(Isochronous: 893.1MB @ 144.6MB/Sec).  Could this be the cause of the problem the device can't transfer stream@2560*1024pixel?  And what should i do to solve this?

0 Likes

Hello,

The bandwidth for the isochronous endpoint is allocated based on the availability (by the host controller).

The video bandwidth for your application is 2560*1024*2*25 = ~ 125MBps. Please try to configure your endpoint size near to this value by adjusting MULT and burst settings

Regards,
Rashi
0 Likes

hi   Rashi,

     Thank you for your reply,  i'm afraid it might not the reason. cause when it trans stream 1280*1024@25fps well(the bandwith is equal to stream 2560*1024@12.5fps), but stream 2560*1024@12.5fps can't be transfered with the same configration.

 
0 Likes

hi Rashi,

       In order to solve the problem that sream@2560*1024*25fps transfer wrong, i changed the demo Fx3UvcDemo_BULK_ISO Demo, and change the 1080P to 2560*1024(https://community.infineon.com/t5/USB-superspeed-peripherals/CX3-Isochronous-mode/m-p/181108#M17908)and stream transfer wrong . it works like i'm facing.

0 Likes

Hello,

I didn't understand your response.

Please restate.

Regards,
Rashi
0 Likes

hi Rashi,

     i want to show you that with the same configuration device can transfer stream 1280*1024@25fps, but can't transfer stream 2560*1024@12.5fps. So i think it might be other reason but not only bandwidth that cause the situation i'm facing(stream 2560*1024@25fps can't transfer).

0 Likes

Hello,

From your response, I understand that if you do not change the endpoint configuration i.e. MULT, burst etc, and try to stream 1280*1024 @25 fps, the streaming is proper but with the endpoint configuration 2560*1024 @ 12.5 fps. Is my understanding correct? 

If yes, please let me know the current endpoint configuration that is being used. Also confirm when the host application is started, does Fx3 get data from sensor. You can track the producer events to check that.

Regards,
Rashi
0 Likes

Rashi,

       this is the CTL information when open the FX3 device by guvcview in linux .

Bus Hound 6.01 capture on Windows Vista (x64). Complements of www.perisoft.net

Device - Device ID (followed by the endpoint for USB devices)
(19) FX3
(22) FX3
(23) VMware USB Device
(24) VMware USB Device
Phase - Phase Type
CTL USB control transfer
IN Data in transfer
OUT Data out transfer
Data - Hex dump of the data transferred
Descr - Description of the phase
Cmd... - Position in the captured data


Device Phase Data Description Cmd.Phase.Ofs(rep)
------ ----- ------------------------------------------------------------------------------------------------------ -------------------------------- ------------------
23.0 CTL 80 00 00 00 00 00 02 00 GET STATUS 1.1.0
23.0 IN 0c 00 .. 1.2.0
23.0 CTL 81 00 00 00 00 00 02 00 GET STATUS 2.1.0
23.0 IN 00 00 .. 2.2.0
23.0 CTL a1 81 00 02 00 02 02 00 GET CUR 3.1.0
23.0 IN 00 00 .. 3.2.0
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 4.1.0
23.0 OUT 01 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 4.2.0
00 00 .. 4.2.32
23.0 CTL a1 82 00 01 01 00 22 00 GET MIN 5.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 5.2.0
00 00 .. 5.2.32
23.0 CTL a1 83 00 01 01 00 22 00 GET MAX 6.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 6.2.0
00 00 .. 6.2.32
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 7.1.0
23.0 OUT 01 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 7.2.0
00 00 .. 7.2.32
23.0 CTL a1 81 00 01 01 00 22 00 GET CUR 8.1.0(2)
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 8.2.0
00 00 .. 8.2.32
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 9.1.0(2)
23.0 OUT 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 b4 00 00 00 60 e3 16 00 00 ....................(......`.... 9.2.0
00 00 .. 9.2.32
23.0 CTL a1 82 00 01 01 00 22 00 GET MIN 12.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 12.2.0
00 00 .. 12.2.32
23.0 CTL a1 83 00 01 01 00 22 00 GET MAX 13.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 13.2.0
00 00 .. 13.2.32
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 14.1.0(2)
23.0 OUT 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 b4 00 00 00 60 e3 16 00 00 ....................(......`.... 14.2.0
00 00 .. 14.2.32
23.0 CTL a1 81 00 01 01 00 22 00 GET CUR 15.1.0(2)
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 15.2.0
00 00 .. 15.2.32
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 18.1.0
23.0 OUT 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 b4 00 00 00 60 e3 16 00 00 ....................(......`.... 18.2.0
00 00 .. 18.2.32
23.0 CTL a1 82 00 01 01 00 22 00 GET MIN 19.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 19.2.0
00 00 .. 19.2.32
23.0 CTL a1 83 00 01 01 00 22 00 GET MAX 20.1.0
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 20.2.0
00 00 .. 20.2.32
23.0 CTL 21 01 00 01 01 00 22 00 SET CUR 21.1.0(2)
23.0 OUT 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 b4 00 00 00 60 e3 16 00 00 ....................(......`.... 21.2.0
00 00 .. 21.2.32
23.0 CTL a1 81 00 01 01 00 22 00 GET CUR 22.1.0(2)
23.0 IN 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 b4 00 00 00 60 e3 16 00 00 ....................P......`.... 22.2.0
00 00 .. 22.2.32
23.0 CTL 21 01 00 02 01 00 22 00 SET CUR 25.1.0
23.0 OUT 00 00 01 02 a0 86 01 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 b4 00 00 00 60 e3 16 00 00 ....................(......`.... 25.2.0
00 00 .. 25.2.32
23.0 CTL 01 0b 01 00 01 00 00 00 SET INTERFACE 26.1.0
23.0 CTL 01 0b 00 00 01 00 00 00 SET INTERFACE 27.1.0

0 Likes

hi Rashi,

     can you show me some advice on the situation I am facing.  about configurations that may make the device work well in windows but unnormal in linux? Appreciate for your help.

0 Likes