No output when XMOS used as listener

If you have a simple question and just want an answer.
cchandini
Member++
Posts: 28
Joined: Fri Jul 29, 2016 8:25 am

No output when XMOS used as listener

Post by cchandini »

I am trying to connect a 3rd party AVB compliant device to XMOS AVB endpoint (XR-AVB-LC-BRD). 3rd party is configured as talker and XMOS as listener. Stream reservation between these two devices is successfull (following the MSRP protocol). 3rd party sends data packets that contain 16 bit data. Only channels 1 & 2 contain valid data and rest of the channels have data as 0. AVTP timestamp is 0 for all 1722 packets and SPH is set to 0 and SYT to 0xFFFF.

When observed on Wireshark, I can see 1722 AVB packets being sent on on the physical ethernet but don't know if it received by XMOS AVB Endpoint.

Can someone please help me debug this issue? Does XMOS play audio packets that contain valid AVTP timestamp value or what the issue can be? How does XMOS work as a listener? Can I find the listener code that is used to configure XMOS AVB Endpoint as a listener and how depacketization is done at XMOS end?

This is an urgent task. Please reply as soon as possible.

Thank you!


User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Can you post console output from one of the XMOS listeners?
cchandini
Member++
Posts: 28
Joined: Fri Jul 29, 2016 8:25 am

Post by cchandini »

How do I get the console output?
My PC never detects XMOS device (when connected to PC through XTAG-2 adapter).
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

xTIMEcomposer prints it in debug mode or "xrun --xscope" if you are using command line
cchandini
Member++
Posts: 28
Joined: Fri Jul 29, 2016 8:25 am

Post by cchandini »

Can I find source code for listener application and MRP protocol that runs on XMOS AVB Endpoint?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

cchandini wrote:Can I find source code for listener application and MRP protocol that runs on XMOS AVB Endpoint?
Sure, it's in avb_1722_listener.xc and avb_mrp.c plus a few other C, XC and H files in relevant folders. The full source code is available on the AVB Audio Endpoint page under "AVB Endpoint Software (AVnu certified audio endpoint/Tools 13.2.1)"

https://www.xmos.com/support/boards?product=14769
cchandini
Member++
Posts: 28
Joined: Fri Jul 29, 2016 8:25 am

Post by cchandini »

What are the requirements for the XMOS to work as a listener?
What is the packet format that it expects do a playback?

Also, can XMOS work as a talker/listener with a device that does not run MRP protocol i.e. is it possible to send/receive 1722 packets between XMOS and a 3rd party device without bandwidth being reserved?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

XMOS endpoint should work with any compliant 1722 talker. Audio data is in IEC 61883 format, 24bit PCM in 4-byte slots.

I think it would be possible to use XMOS AVB without stream reservation.

- You'd need to explicitly join each listener, by setting its sink state to POTENTIAL
- You will need to manually set up multicast tables in your switch so forwarding works like with reservations
- You will need to register the streams' MAC addresses on each listener for their Ethernet MAC receive filtering

There might be a couple more things I didn't think about, but it shouldn't be a great deal.
cchandini
Member++
Posts: 28
Joined: Fri Jul 29, 2016 8:25 am

Post by cchandini »

I need a clarification..I checked log on Wireshark when I connected my device (as Talker) to an XMOS AVB Endpoint (listener). I have set the Timestamp Valid field in 1722 packets to be false. I came across XMOS AVB Design Guide v5.1.0. It states that, in API avb_1722_listener, we output data present in media FIFO to an XC channel using function media_output_fifo_to_xc_channel() and/or media_output_fifo_to_xc_channel_split_lr(). It also states that - "The protocol over the channel is that the thread expects a timestamp to be sent to it and then it will output num_channels samples, pulling from the ofifos array. It will then expect another timestamp before the next set of samples."

Does this mean that XMOS requires a valid timestamp to output data on any of the I2S channels? Won't it output data if the Timestamp Valid field in 1722 packet is set to "False"?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Sorry I can't recall what AVB 5 does, but version 6 or 7 (i.e. TSN) will interpret 1722 timestamp valid flag correctly, that is only take a timestamp from packets that have the valid flag set. Timestamps are passed on to media output FIFO who uses them to adjust media clock.
Post Reply