we are trying to setup a XK-AUDIO-316-MC evaluation board to act as a TDM to USB converter.
The configuration it’s a little odd:
- 16 channel on TDM to USB path (2xTDM8)
- 4 channel on USB to TDM path (1xTDM8 where just the first 4 channel are used).
Code: Select all
-DCODEC_MASTER=1 \
-DXUA_SYNCMODE=XUA_SYNCMODE_ASYNC \
-DXUA_PCM_FORMAT=XUA_PCM_FORMAT_TDM \
-DMAX_FREQ=48000 \
-DMIN_FREQ=48000 \
-DI2S_CHANS_ADC=16 \
-DI2S_CHANS_DAC=8 \
-DNUM_USB_CHAN_IN=16 \
-DNUM_USB_CHAN_OUT=4
We use XUA_SYNCMODE=XUA_SYNCMODE_ASYNC define so we did expect the TDM peripheral clock to be the provider of the media clock.
Looking at the code it seems like that, when using ADAT or SPDIF examples with ASYNC mode, the USB media clock is somehow synchronized with the ADAT/SPDIF RX sync clock.
For TDM slave, instead, this doesn't seem to possible, because the usecase is:
- the XMOS provide the mclk to the codec
- the codec that generate a TDM master to the XMOS.
- In this situation, everything is still synchronized by design even if the TDM is slave.
- In our case, where the TDM is generated by a third party device we have this mismatch.