Hi,
I'm new to XMOS. I've recently started using the xk-evk-xu316 board. I've started with the sw_usb_audio project (v8.1.0) and all builds fine out of the box.
What I want to do next is configure the board to receive multichannel audio over USB 2.0 (16 channel in), and then direct each channel to a GPIO pin and into external DACs.
My question is how to configure the board for this. I have tried the build options approach (for example 2AMi10o10xxxxxx), which does build but seems to remain 2in2out. I may be completely missing the point of that sw_usb_audio package.
Help to configure this correctly would be hugely appreciated. Thanks in advance.
Configure xk-evk-xu316 for multichannel
-
- New User
- Posts: 2
- Joined: Sun Aug 18, 2024 5:13 am
-
- Member
- Posts: 8
- Joined: Tue Jul 16, 2024 9:52 am
- Location: Bristol, UK
In your Makefile, you can set NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT to configure the number of USB audio channels. Setting this to something larger than two will still result in your application having just two channels of audio over I2S; you would have to change the I2S_CHANS_ADC/I2S_CHANS_DAC values to alter that.
If that doesn't work for you, please could you share which configuration defines you are setting in your Makefile or xua_conf.h?
If that doesn't work for you, please could you share which configuration defines you are setting in your Makefile or xua_conf.h?
XMOS, Senior Software Engineer
-
- New User
- Posts: 2
- Joined: Sun Aug 18, 2024 5:13 am
Thank you for the reply - legend! I had a mistake in the Makefile (NUM_USB_CHAN_IN instead of DNUM_USB_CHAN_IN). It now build and runs.
Now I have to work out the I2S_channels as I want to out put 16 channels from 16 input over USB.
I'm looking at the app_usb_aud_xk_evk_xu316_extrai2s example to see if it can be reconfigured for 16 outputs but need to work out which ports to use.
Is there any other good examples of demuxing 16 channel audio in over USB to use the GPIO pins for 16 channel out?
Now I have to work out the I2S_channels as I want to out put 16 channels from 16 input over USB.
I'm looking at the app_usb_aud_xk_evk_xu316_extrai2s example to see if it can be reconfigured for 16 outputs but need to work out which ports to use.
Is there any other good examples of demuxing 16 channel audio in over USB to use the GPIO pins for 16 channel out?
-
- Member
- Posts: 8
- Joined: Tue Jul 16, 2024 9:52 am
- Location: Bristol, UK
I'm not aware of any other examples of what you're looking for. Also, app_usb_aud_xk_evk_xu316_extrai2s demonstrates running I2S on pins attached to the non-audio tile for small pin-count devices.
In your case, you should have enough GPIO pins on tile 1 (audio tile) so that you don't need to cross to the other tile. For example, have a look at GPIO header J13.
Once you've selected your GPIO pins, take a look at the audio I/O port declarations.
One side-note on terminology: you said "the board to receive multichannel audio over USB 2.0 (16 channel in)" - the in/out channel counts are relative to the host rather than the device. So if you want to send sixteen channels of audio from your host to the device (and then send these to external DACs), that would be sixteen channels out.
In your case, you should have enough GPIO pins on tile 1 (audio tile) so that you don't need to cross to the other tile. For example, have a look at GPIO header J13.
Once you've selected your GPIO pins, take a look at the audio I/O port declarations.
One side-note on terminology: you said "the board to receive multichannel audio over USB 2.0 (16 channel in)" - the in/out channel counts are relative to the host rather than the device. So if you want to send sixteen channels of audio from your host to the device (and then send these to external DACs), that would be sixteen channels out.
XMOS, Senior Software Engineer