AVB-DC: Can I run a variable sampling rate Listener?

If you have a simple question and just want an answer.
TomRSI
New User
Posts: 3
Joined: Thu Jun 25, 2015 4:13 pm

AVB-DC: Can I run a variable sampling rate Listener?

Post by TomRSI »

Hello,

I am developing a 4CH listener and 4CH talker application that will run any sampling frequency from 32kHz up to, at least, 96kHz. As an audio interface I use a TDM protocol, which is based on the I2S example. The Audio interface is working quite well with my TDM interface (i know there is a new TDM interface on the XMOS repository but that came up after I had mine working).
Now I am trying to get a Listener only (simlifying the problem) which run at any sampling frequency the master (talker) runs at. For this purpose I am using a AVB-DC kit (where my listener is not using an audio pll board but has a custom board with a CS2300). I am using last software release of this application.
I have seen that the low frequency clock recovered from the network (media clock) goes from 960Hz to 1.92kHz when the default_sample_rate in the application_task (main.xc) goes from 48000 to 96000. Reading in the documentation, I have noticed that the media clock is given by a master which is chosen by a clock quality criteria.
My question would be: The PTP server (which generates the media clock which ends in the PLL_SYNC signal that allows the PLL to generate the MCLK and correct my if I am wrong) can run always as a slave? In that case, can it generate a clock derived from the sampling rate in the Master? and last one, why there is a default_sample_rate on the main code that configures the media clock, shoould that no purely derived from the media clock in the AVB tile?

thanks in advance,

Tomás.

TomRSI
New User
Posts: 3
Joined: Thu Jun 25, 2015 4:13 pm

Post by TomRSI »

Update: Reading more in deep in the documentation I guessed that the problem relies on how the media clock is initialized in the example code. I think I would need to wait for a stream to connect then get the rate from 1722 packets info and then initialize the Media clock with this information. The pll is already adapting itself to the different wordclock or media clock rates.