selecting a processor for USB Audio 2.0, mutliple channels

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
redfart
Member++
Posts: 16
Joined: Tue Oct 04, 2016 11:27 pm

selecting a processor for USB Audio 2.0, mutliple channels

Postby redfart » Tue Oct 04, 2016 11:41 pm

I'm new to the USB game, and need help selecting an appropriate processor for a project. I'll be recording and playing back 32 channels of live audio at 48kHz (only). Audio samples can be up to 32 bits long. PCM (I2S) format, no DSP required, no ADC or DAC required, just bare-bones digital audio in-and-out the USB port. All clocking will be external to the USB processor.

(32 channels) x (32 bits/sample) x (48000 samples/sec) = 49.152 Mbits/sec (6.144 MB/sec)

I'm not sure how to go shopping for a chip. What other concerns do I have? What is the cheapest/smallest XMOS solution I can get by with?

Thanks!
User avatar
Ross
XCore Expert
Posts: 768
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Wed Oct 05, 2016 11:13 am

Is TDM acceptable over multiple I2S lines?
redfart
Member++
Posts: 16
Joined: Tue Oct 04, 2016 11:27 pm

Postby redfart » Wed Oct 05, 2016 5:08 pm

Yes, I will probably use TDM over multiple lines for the audio transmission across the board.
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Fri Oct 07, 2016 10:51 am

You're in luck!

There's already a config in the xk-audio-216-mc app which is close to what you want (although you could delete SPDIFTX):

Code: Select all

# Audio Class 2, Input, Output, No MIDI, SPDIF, TDM (32in/32out)
XCC_FLAGS_2i32o32xsxxx_tdm8 = $(BUILD_FLAGS) -DSPDIF_TX=1 -DI2S_MODE_TDM=1 -DI2S_CHANS_ADC=32 -DMAX_FREQ=48000 -DI2S_CHANS_DAC=32 -DNUM_USB_CHAN_OUT=32 -DNUM_USB_CHAN_IN=32
INCLUDE_ONLY_IN_2i32o32xsxxx_tdm8  =
Resource usage wise, it only needs 7 threads and a fraction of the available memory to run:

Code: Select all

Creating app_usb_aud_xk_216_mc_2i32o32xsxxx_tdm8.xe
Constraint check for tile[0]:
  Cores available:            8,   used:          3 .  OKAY
  Timers available:          10,   used:          3 .  OKAY
  Chanends available:        32,   used:          8 .  OKAY
  Memory available:       262144,   used:      29360 .  OKAY
    (Stack: 1676, Code: 21688, Data: 5996)
Constraints checks PASSED.
Constraint check for tile[1]:
  Cores available:            8,   used:          4 .  OKAY
  Timers available:          10,   used:          6 .  OKAY
  Chanends available:        32,   used:         19 .  OKAY
  Memory available:       262144,   used:      44784 .  OKAY
    (Stack: 2844, Code: 22772, Data: 19168)
Constraints checks PASSED.
Build Complete
..however you need a fair bit of I/O. That's 8 x 1b ports for data lines plus 3 x clock lines (MCLK, FRAMECLK, BCLK) so that's already 11. You only get 9 available 1b ports on the USB tile, so you will need a two tile device to get the IO you need.

Cheapest part that will fit the bill is the XU210-256-TQ128-C20 or XUF210-256-TQ128-C20 if you want embedded flash.

It will be pin compatible with the part on the multichannel board https://www.xmos.com/support/boards?product=18334 so you can follow closely that design.
redfart
Member++
Posts: 16
Joined: Tue Oct 04, 2016 11:27 pm

Postby redfart » Fri Oct 07, 2016 6:14 pm

thank you, infiniteimprobability. This is perfect.
redfart
Member++
Posts: 16
Joined: Tue Oct 04, 2016 11:27 pm

Postby redfart » Tue Nov 08, 2016 7:26 pm

Hey, infiniteimprobability... Could you point me to the app you referenced? (xk-audio-216-mc app)
I see that the app note AN00128 for audio class does not actually exist, so I'm a little at a loss as to where to begin. Thanks!
User avatar
infiniteimprobability
XCore Legend
Posts: 1124
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Wed Nov 09, 2016 10:07 am

Sure - the audio reference design can be found here:

https://www.xmos.com/support/software/uac2
redfart
Member++
Posts: 16
Joined: Tue Oct 04, 2016 11:27 pm

Postby redfart » Wed Dec 28, 2016 8:51 pm

Hey, infiniteimprobability - can you tell me how you calculated the resources needed? Was I correct when I used this: (32 channels) x (32 bits/sample) x (48000 samples/sec) = 49.152 Mbits/sec (6.144 MB/sec)?

I'm considering doubling the bitrate so I can do 96kHz instead of 48K, and I want to make sure I'm considering everything. What is the parameter you compared the calculation to when you suggested the XU210-256-TQ128-C20? MIPS?

Who is online

Users browsing this forum: No registered users and 1 guest