ADAT Tx in MC-Audio Reference Code

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
RitchRock
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

ADAT Tx in MC-Audio Reference Code

Post by RitchRock »

I'm trying to send 8 I2S input chanels from ADC down the ADAT Tx channels. I have my 2 out / 8 in device working fine on USB. Simply enabling ADAT TX sends channels 1 and 2 from computer playback to ADAT channels 1 and 2, but then the next 6 channels are the first 6 channels of my I2S input. This seems strange because as far as I can tell, the ADAT thread only receives the two channels from the host.

1. Why this is the case? I can't seem to figure it out - are the two stored next to each other in memory, perhaps and the pointer just increments to the beginning of the next stored array in memory?
2. Any recommendations on how to easily send the samples from I2S ADC successfully to the ADAT transmit task? I tried this in the DoSampleTransfer() function, but while the device ran OK, I did not get any audio.

Code: Select all

        if(readBuffNo)
             TransferAdatTxSamples(c_adat_out, samplesIn_1, adatSmuxMode, 1);
        else
             TransferAdatTxSamples(c_adat_out, samplesIn_0, adatSmuxMode, 1);


RitchRock
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

Did not think ADAT_TX_USE_SHARED_BUFF was defined since it was greyed out in audio(), however it is defined in the makefile: -DADAT_TX_USE_SHARED_BUFF=1. All makes sense now....
Post Reply