UAC 2 USB to i2s bridge with DSD and i2c DAC configuration

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Ross
XCore Expert
Posts: 968
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Frabriceo is correct, the I2S interface to most DACs will be 32bit, regardless as to if 32bit are actually used.

The 16bit I2S mode was actually added to assist some customers that were using the design with some odd external interfaces - ultrasound or radar sensors or similar.

Replace Frabriceos reference to "devicedefines.h" with "xua_conf_default.h" for later codebases.


User avatar
BritishCat
Member++
Posts: 20
Joined: Tue Oct 24, 2023 11:16 am

Post by BritishCat »

Thank you Ross, i've found it. I have other quaestion. Is it possible to build a dual-mono I2S output on XMOS without an external separator? I haven't found this option in the descriptions.
User avatar
Ross
XCore Expert
Posts: 968
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Im not sure I understand this question...

You want two I2S data lines - each with one channel on, say, the L channel? (the other R channel should have 0 data?)

You could do this if you set I2S_CHANS_DAC to 4

Then provide an implementation of UserBufferManagement() something like:

Code: Select all

void UserBufferManagement(unsigned sampsFromUsbToAudio[], unsigned sampsFromAudioToUsb[])
{
    sampsFromUsbToAudio[0] = sampsFromAudioToUsb[0]; // Send L channel from Host to I2S[0] Left - note don't really need this line since its default behaviour 
    sampsFromUsbToAudio[2] = sampsFromAudioToUsb[1]; // Send R channel from Host to I2S[1] Left
    sampsFromUsbToAudio[1] = 0; // Zero data I2S[0] R channel
    sampsFromUsbToAudio[3] = 0; // Zero data to I2S[1] R channel 
}
(I *think* this works but I haven't tested it)

p.s. In future please start new threads for new questions - it will help future users find solutions