AVB/TSN Talker-only Configuration

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

I am using tdm, not i2s, so it's not exactly comparable. But I changed the buffer_manager_to_tdm to swap buffers after I receive the correct number of audio inputs per https://www.xcore.com/viewtopic.php?f=37&t=5850&p=29613
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

One more note... I am getting gaps in audio with talker only function, but I think only when I use "INPUT_STREAM_DERIVED" media clock, not "LOCAL_CLOCK". I wonder if in "INPUT_STREAM_DERIVED" there needs to be an incoming audio stream to lock to? I also saw some artifacts when running LOCAL_CLOCK so I need to see if that was something with my build. I am thinking to force the clock to LOCAL_CLOCK in talker only mode... perhaps some XMOS types know something about this??

EDIT: I have confirmed that the media clock wordlength doesn't get updated by Mac System Clock unless AVB_NUM_MEDIA_OUTPUTS != 0 due to gptp_media_clock_server() not calling manage_buffer()

Is there any way to get ptp to generate the media clock even when AVB_NUM_MEDIA_OUTPUTS == 0?
ahogen
Member++
Posts: 26
Joined: Fri Mar 31, 2017 5:16 pm

Post by ahogen »

-
Last edited by ahogen on Mon Jul 29, 2019 6:23 pm, edited 2 times in total.
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

I have made enough changes in my code so that AVB_NUM_MEDIA_OUTPUTS can be set to 0. My audio artifacts have gone away, I think (hope) I had some build weirdness caused by not rebuilding all, but not sure.

Have you been able to force the clock to DEVICE_MEDIA_CLOCK_LOCAL_CLOCK? It seems with the descriptors I can't figure a way to disable the DEVICE_MEDIA_CLOCK_INPUT_STREAM_DERIVED as one of the options presented to the peer as I mentioned in https://www.xcore.com/viewtopic.php?f=47&t=5986
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

I have posted up the talker only code on github https://github.com/akp7/lib_tsn
cccuser
Junior Member
Posts: 7
Joined: Wed Aug 11, 2021 7:28 pm

Post by cccuser »

i'm trying to get multiple listeners and followed these instructions. my question is it compiles and i can see the check for chanends appears correct. the question is now that i have two sinks, do i need a second instantiation of the buffer_to_tdm running? such that the receive and send functions case statements need [j] operator?
User avatar
akp
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

You shouldn't need a second instantiation of the buffer_to_tdm running so long as your media clock can synchronize to the input stream. Now, with multiple input streams, I am not 100% sure how to do this unless they themselves are synchronized. It's not a feature I use.