xmos / lib_tsn

Time sensitive networking library
Other
48 stars 29 forks source link

Improved fast connect to make it compliant to 1722.1 spec and support power cut #16

Closed ThomasGmeinder closed 7 years ago

ThomasGmeinder commented 8 years ago

Fixed stream flag for stream input too.

fixes bugs 17333 and 17039

Testing was hampered by issues with the avdecccmdline controller. See bug 17488

ThomasGmeinder commented 8 years ago

Note: To test this, the fast connect must be explicitly enabled in avb_conf.h:

define AVB_1722_1_FAST_CONNECT_ENABLED 1

larry-xmos commented 8 years ago

Thank you for this. I have manually merged 17039 into master. I tried fixing 17333 by triggering fast connect from ADP discovery. Do you mind testing branch fast_connect_adp before I complete the merge?

ThomasGmeinder commented 7 years ago

Hi Larry I have tried the fastconnect improvements on the fast_connect_adp branch and couldn't find any functional issues. Bidirectional stream connection is always re-established. Test report below.

However, the messages should be improved. "no data in flash" is not very informative. Suggest changing to something like "fastconnect: No connection data in flash"

Test report: I tried every scenario 5 times on two xCORE-200 MC audio boards connected via a Motu AVB Switch to a Mac. AVB/EAV must be disabled (In Network Preferences->Hardware) The initial connections were established with avdecccmdline.

start EP0 wait for 10 seconds start EP1 Result: Bidirectional connection established However a few issues occured: Talker Advertise -> Failed for stream 2297803F00000

start EP1 wait for 10 seconds start EP0 Result: Bidirectional connection established However a few issues occured: On one or both EPs: compensation too large: -25595 samples This is repeatable: EP0 prints 3 times: Talker Advertise -> Failed for stream 2297803F40000

EP0 and EP1 simultaneously Result: Bidirectional connection established However, this is printed on EP0: Media output 7 compensation too large: -25595 samples

In all cases the avdecc 1722.1 controller shows the correct connections after fastconnect: show connections 0x002297fffe8003f4[0] -> 0x002297fffe8003f0[0] 0x002297fffe8003f0[0] -> 0x002297fffe8003f4[0]

Keep in mind: The clock source setting is not restored during fastconnect. -> Both EPs will be set to INPUT_STREAM_DERIVED This means they try to recover the clock from each other.