ADAT to I2S/USB

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
User avatar
kenmac
Member++
Posts: 21
Joined: Tue May 13, 2014 9:37 am

ADAT to I2S/USB

Post by kenmac »

Hi All,

I have been looking into integrating ADAT into the MC USB Audio Firmware, or alternatively to create a standlone ADAT to I2S firmware. XMOS seem to have started integrating the ADAT_RX module alongside a ClockGen function which handles clock recovery, although this work looks far from complete. I get the impression that some of you might have explored this avenue.

Another possibility for my project would be to implement a AL1401/402 style transceiver (ADAT to I2S) without integrating into the USB Audio firmware, as described here:

https://www.xmos.com/download/public/AD ... 1.0%29.pdf

From reading the above link I got the impression that the code for such a system exists, but when looking in the ADAT project on github I could only find basic loopback and single-duplex projects with no clock recovery.

I am wondering if anybody knows of any public source code that implements either of the above options, or could advise me on the best approach to begin implementing them (Particularly with respect to clock recovery, as there appears to be very little documentation about this aspect).

Regards,

Kenny


User avatar
Ross
XCore Expert
Posts: 966
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Hi there,

The ADAT input functionality from USB version 5.3 has not been maintained due to concentration on other items/features - so yes currently incomplete I'm afraid. I believe there are plans to address this in the near future.

An ADAT -> I2S bridge should be a fairly trivial project. I should imagine it would have 3 cores running:
  • ADAT Rx
  • I2S
  • Buffering and produced reference to external clock-multiplier
The above assumes you would like to avoid any sample rate conversion in the XMOS device and generate a master clock related to the internal ADAT stream (based on a reference from the XMOS device). In the past we have used a Cirrus part.

I knocked up an AC-3 to I2S system very similar to this some time ago.
User avatar
kenmac
Member++
Posts: 21
Joined: Tue May 13, 2014 9:37 am

Post by kenmac »

Hi Ross,

It is interesting to see that the implementation exists in the audio firmware prior to v5.3. I can use this as a reference.

My initial step will probably be to implement the ADAT to I2S in roughly the way you mentioned. My main issue has been trying to isolate the clock recovery code in order to spec a suitable external clock multiplier. When you said you have used a cirrus part in the past, I assume you meant for the clock divider/PLL. Is that correct?

Regards,

Kenny
User avatar
Ross
XCore Expert
Posts: 966
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

kenmac wrote:When you said you have used a cirrus part in the past, I assume you meant for the clock divider/PLL. Is that correct?
Yes, have used a fractional-n clock multiplier to multiply a reference from the XMOS device (derived from the ADAT input stream) to a quality master clock.

You could toggle an I/O every time the you received a sample from the ADAT core.
User avatar
kenmac
Member++
Posts: 21
Joined: Tue May 13, 2014 9:37 am

Post by kenmac »

Thanks for the clarification!
User avatar
Ross
XCore Expert
Posts: 966
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

This thread popped up again due to a spam/bot post (now deleted) but I thought I would add that ADAT Rx and Tx functionality is now in the codebase.
Post Reply