I'm having strange troubles with an external S/PDIF transmitter on a custom ADAU1442 PCB that works fine in all other regards. The board has an expansion header for an external I2S input and output with their own clock and data pins. The DSP is clocked by a 12.288MHz oscillator and its CLKOUT is used as MCK for these devices at 12.288MHz and fs fixed to 48kHz.
A board with a DAC and ADC chip works fine without problems including an analog loopback mode.
Another board i.e. using the same I2S connections and DSP project has a TI SRC4392 for external DIR & SRC functionality and an AK4103A as S/PDIF transmitter. The receiver is audio clock master to the DSP and the transmitter clock slave. Both's MCK is set similarly to the DAC/ADC's earlier.
The receiver works perfectly in all circumstances, including when driven from the DSP's internal S/PDIF transmitter.
The transmitter however behaves strangely. Regardless of its source or sink (source including a tonegen inside the DSP and sink including a direct 10mm TTL link to the receiver chip next to it), the recovered audio signal has periodic audio spikes. These spikes are not breaks, but just distortions of much larger amplitude than the source signal. They occur in sets of two, 250ms apart and these sets being about 3.56s apart. The spike itself is very short, in the us range but clearly audible and measurable. The spike level scales with both the frequency and amplitude of the source signal. Due to the long time events it's not possible to accurately time it, but it's definitely periodic. The long periods make it difficult to identify the audio samples at the event but this may be a next step to use an oscilloscope to trigger a logic analyzer at the event.
The natural expectation would be that something is wrong with the PCM interface between the DSP and DIT, but it works fine with a DAC on the same pins and DSP project.
In further experimentation, I tried several things without any change in behaviour:
- changing the MCK from the Buffered Oscillator to 512x fs_normal to double the DIT MCK to 24.576MHz
- setting the DIT to be LRCK & BCK master to the DSP
- changing the DIT from AK4103A to DIT4192
- selecting a different DSP SDATA_OUTx pin
- minimizing DSP program, increasing pin drive strengths etc, no change (I2S signals look fine on an oscilloscope anyway)
- driving the source from either external DSP input or internal DSP tone generator
The only experiment that DID work was to just disconnect the DIT SDATA line from the DSP and tie it direct to the SDATA_OUT pin of an ADC that is also fed from the same DSP-generated clocks: this worked fine without any problem.
This does not make sense as an S/PDIF transmitter is not complex and the same signals give no problem on a DAC. The extreme long length between these periodic distortions is much more than the DSP memory, but if the DSP is the tone generator there is very little that can go wrong, and the same DSP circuit works fine with very good SNR with other I2S and TDM I/O's.
Any input or suggested tests would be appreciated.