AVN/TSN: Single channel Listener for House Clock Sync

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
Posts: 30
Joined: Fri Mar 31, 2017 5:16 pm

AVN/TSN: Single channel Listener for House Clock Sync

Postby ahogen » Tue Jun 20, 2017 6:37 pm

Hi all,

It is recommended on page 26 of [1] to include a single-channel Listener stream on any endpoint, whether Talker or Listener, so that a house clock can be routed to this channel and any (all) other devices in your AVB/TSN system for precise synchronization.

I've started out with AN01032 and was trying to make the appropriate configuration in "avb_conf.h" for a single-channel Listener but am having some issues.

Here is an excerpt from my "avb_conf.h"

Code: Select all

/* Listener configuration */

/** The total number of AVB sinks (incoming streams that can be listened to) */
#define AVB_NUM_SINKS 1
/** The total number or listener components
  * (typically the number of tasks running the `avb_1722_listener` function) */
/** The total number of media outputs (typically the number of I2S output channels). */
/** Enable the 1722.1 Listener functionality */
#define AVB_1722_1_LISTENER_ENABLED 1

/** The maximum number of channels permitted per 1722 Listener stream */

However, with AVB_NUM_MEDIA_OUTPUTS == 0, I always get various errors related to the output buffer. I don't need sample rate changes, so I removed all the code in the I2S restart check and made it so it always returns I2S_NO_RESTART. That takes care of one error. However, there are more issues with the output buffer over in the "media_clock_server.xc" code (see these lines). I'm still learning about AVB/TSN stuff so I'm not sure what's safe to remove (put in an #if/#endif) and what is required for the functionality described above.

QUESTION: Any way I can use the Listener to only derive a media clock and not output an audio stream?

I can obviously put "null" and "0" into the I2S master/slave output parameters, but that doesn't do anything with the Listener buffering up audio data. I don't want any of that functionality in the code at all, if it's not being used. That's just going to burn up MIPS that could be used for something else.

Thanks all!

[1] E. Mann, L. Pearson, A. Elder, C. Hall, C. Hunther, J. Koftinoff, A. Butterworth, D. Underwood, G. Venkatesan, and B. Thomsen, “AVB Software Interfaces and Endpoint Architecture Guidelines,” AVnu Alliance Best Practices, Dec. 2015. Revision 1.3. [Online]. Avaliable: http://avnu.org/wp-content/uploads/2014 ... _Clean.pdf

Who is online

Users browsing this forum: tolikkk and 21 guests