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!
selecting a processor for USB Audio 2.0, mutliple channels
-
- Member++
- Posts: 16
- Joined: Tue Oct 04, 2016 11:27 pm
-
Verified
- XCore Legend
- Posts: 1163
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Is TDM acceptable over multiple I2S lines?
-
- Member++
- Posts: 16
- Joined: Tue Oct 04, 2016 11:27 pm
Yes, I will probably use TDM over multiple lines for the audio transmission across the board.
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 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):
Resource usage wise, it only needs 7 threads and a fraction of the available memory to run:
..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.
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 =
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
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.
-
- Member++
- Posts: 16
- Joined: Tue Oct 04, 2016 11:27 pm
thank you, infiniteimprobability. This is perfect.
-
- Member++
- Posts: 16
- Joined: Tue Oct 04, 2016 11:27 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!
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!
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
-
- Member++
- Posts: 16
- Joined: Tue Oct 04, 2016 11:27 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?
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?