Page 3 of 3

Re: AVB/TSN Talker-only Configuration

Posted: Mon Jul 31, 2017 5:42 pm
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

Re: AVB/TSN Talker-only Configuration

Posted: Wed Aug 02, 2017 8:09 pm
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?

Re: AVB/TSN Talker-only Configuration

Posted: Fri Aug 04, 2017 6:14 pm
by ahogen
-

Re: AVB/TSN Talker-only Configuration

Posted: Fri Aug 04, 2017 6:49 pm
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

Re: AVB/TSN Talker-only Configuration

Posted: Fri Oct 27, 2017 5:35 pm
by akp
I have posted up the talker only code on github https://github.com/akp7/lib_tsn

Re: AVB/TSN Talker-only Configuration

Posted: Thu Aug 12, 2021 5:27 am
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?

Re: AVB/TSN Talker-only Configuration

Posted: Thu Aug 12, 2021 2:45 pm
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.