sw_usb_audio adat + usb summing / mixer

Discussions about USB Audio on XMOS devices
dtns
Member++
Posts: 20
Joined: Sun Sep 01, 2024 6:05 pm

sw_usb_audio adat + usb summing / mixer

Post by dtns »

Hello,

I am working on a multichannel DAC which has ADAT input for audio and USB input for audio (each 8ch).
How can I make sw_usb_audio / lib_xua mix CH1 from ADAT with CH1 from USB and so on till channel 8?

In the beginning I wanted to implement switching between ADAT and USB mode to change the source, but it seems
like a big endeavor, so now I wanted to go the mixer way.

ADAT CH1 - CHx -> I2S Outputs 1-x
USB CH1 - CHx -> I2S Outputs - 1-x

Kind regards
User avatar
Ross
Verified
XCore Legend
Posts: 1163
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Maybe I have your use case incorrect, but I would consider a dual boot system if there's a physical switch between two mode, for example.
Technical Director @ XMOS. Opinions expressed are my own
dtns
Member++
Posts: 20
Joined: Sun Sep 01, 2024 6:05 pm

Post by dtns »

Ross wrote: Mon Mar 10, 2025 4:32 pm Maybe I have your use case incorrect, but I would consider a dual boot system if there's a physical switch between two mode, for example.
We are actually upgrading existing hardware, which was based on the CoolAudio V1402 ADAT Decoder to use XMOS. The device has USB for
power supply and ADAT input. We have already a stock of enclosures, so we were hoping to upgrade without any physical modifications (such as adding a switch for dual booting).
dtns
Member++
Posts: 20
Joined: Sun Sep 01, 2024 6:05 pm

Post by dtns »

Maybe my post was not completely clear. I was thinking this should be fairly easy with the sw_usb_audio example / minor lib_xua modifications (changing defaults)

What I am essentially trying to do:
* I've modified the sw_usb_audio example CMakeLists.txt for ev xu316 to -DI2S_CHANS_ADC=2 -DI2S_CHANS_DAC=8 -DMIXER=1 -DMAX_MIX_COUNT=8 -DXUA_ADAT_RX_EN=1

Now I would like to try the following with the mixer, but somehow when I use the host control app to set all channels in the matrix to 0.0dbFS, i cannot hear any sound from the inputs.
* Loopback Mode (Analog Audio Ins I2S -> Analog Audio Outs I2S)
* USB Audio (MC) + ADAT Audio (MC) 8 ch -> Mix Down to Analog Outs (I2S)
User avatar
Ross
Verified
XCore Legend
Posts: 1163
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Okay, understand the requirements now I think.

You need to setup the routing into and out of the mixer as well as the mixer weights

In fact for simple routing you don't need to use the actual mixing, just the routing functionality

Take a look at section 7.6 of https://github.com/xmos/lib_xua/release ... v5.0.0.pdf
Technical Director @ XMOS. Opinions expressed are my own