Post Go back to editing

Understanding adi_spdif_Rx_EnableAutoAudioRestart

Thread Summary

The user asks if the adi_spdif_Rx_EnableAutoAudioRestart() function in CCES 3.0.2 handles PLL re-lock after stream interruptions. The final answer clarifies that this function only restarts the audio data path and does not reset the NCO; an ISR must be implemented to toggle SPDIF_RX_CTL.RST for reliable PLL re-lock. The accompanying answer suggests monitoring SPDIF_RX_STAT.LOCKLOSS and SPDIF_RX_STAT.LOCK bits to detect reconnection and ensure proper lock.
AI Generated Content
Category: Software
Product Number: ADSP21565

The hardware reference manual on p. 1257 states the following:

Interrupted Data Streams on the Receiver
When using the S/PDIF receiver with data streams that are likely to be interrupted, (in other words unplugged and
reconnected), it is necessary to take some extra steps to ensure that the S/PDIF receiver’s digital PLL will relock to
the stream. The steps to accomplish this are described below.
1. Set up interrupts within the DAI so that the S/PDIF receiver can generate an interrupt when the stream is
reconnected.
2. Within the interrupt service routine (ISR), stop and restart the NCO. This is accomplished by setting and then
clearing the SPDIF_RX_CTL.RST bit.
3. Return from the ISR and continue normal operation.
This method of resetting the NCO has been shown to provide extremely reliable performance when the S/PDIF
inputs are interrupted or unplugged momentarily

I'm using the SPDIF Rx driver provided in CCES 3.0.2, which includes the following function: adi_spdif_Rx_EnableAutoAudioRestart.

My question is, does that function perform the steps mentioned in the reference manual, or do I still need to manually implement the ISR myself?