Post Go back to editing

How to sync audio between two master chips?

Category: Software
Product Number: 21565
Software Version: CCES2.10.0

Hi,

I use 21565, however I think this is a common problem as the other processors.

Assume that I have two 21565s connected via SPORTs. Let's call A and B, A send audio datas to B, B receive and send it to external DAC. For some reason, A must be clock _master to B, and B must be clock _master to DAC.

What cause the problem is each 21565 need to use a 24.576MHz crystal independently, as we know the SPORTs clock is from the crystal, so the clock from A to B and B to DAC will be not exactly the same, for example one is 24.575 and the other is 24.577.  Although all the SPORTs is 48K Fs, A and B will be slightly different due to different crystals.

The different Fs will make a situation, when the chips run for a while, one chip will generate two SPORT callback, but the other generate none. So the second callback will use the last time datas which cause the audio sound click. After then it will return normal, and run for a while, the next two callbacks come again, periodicity. The time between two clicks is depend on how much errors between two crytals. I tried to use one crytal, it sounds good without click. It's sad that I must use two crystals.

I want to know if there are some methods to resolve this question.

I know I can use ASRC module, however I use TDM16, there are not enough ASRCs. If I use software ASRC, I think this is not a good idea since the two Fs is 48K, the software can not recognize the differecnce between each other.

So how to sync the two _master SPORTs?