Author Topic: USB host IC for audio device class  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

Offline davegravyTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: ca
USB host IC for audio device class
« on: June 15, 2022, 06:44:48 pm »
I have a USB audio device and want to access its data stream with a MCU via SPI. Is there an IC well suited to this?

I know MAX3421E is popular for interfacing MCUs with USB devices but I can't find any projects that have done this for the audio device class.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17761
  • Country: fr
Re: USB host IC for audio device class
« Reply #1 on: June 15, 2022, 07:17:49 pm »
You'll need a MCU with USB host support, which is becoming rather common these days. Look for USB "OTG". (Also define if you need USB HS or just FS, that will narrow your options of MCUs.)
With such a MCU, as long as it has an embedded USB PHY (again a lot of choice these days, a bit less for USB HS though), you won't need any extra IC.

The "hard" part will be to implement the USB audio class as host. While most MCUs having USB OTG come with a few examples for USB host, those examples usually deal with the simple HID (keyboard, mouse, ...) classes, or the mass storage class. I've never seen vendor-provided libraries/examples implementing the audio class for USB host. That may exist, but specifically look for this.

You could alternatively use TinyUSB if the MCU is supported, but I'm not sure TinyUSB supports the audio class for USB host. That'd need to be checked.

To sum it up, finding a MCU with USB OTG, either FS or HS depending on your needs, will be easy. The hard part is probably going to be the firmware side.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 8056
  • Country: pl
Re: USB host IC for audio device class
« Reply #2 on: June 15, 2022, 09:30:44 pm »
There is this in the "Demos" directory of the LUFA library for USB capable AVRs.
Code: [Select]
*  Audio Input host demonstration application. This gives a simple reference
 *  application for implementing a USB Audio host, for USB Audio devices using
 *  the USB Audio 1.0 class profile.
 *
 *  Incoming audio will output in 8-bit PWM onto the timer 3 output compare
 *  channel A, and will also be indicated on the board LEDs. Decouple the PWM
 *  output with a capacitor and attach to a speaker to hear the audio.

It should run on AT90USBxxx series micros with OTG support, there are a few of those, but they aren't very cheap unfortunately.
Dunno if Full Speed and Audio Class 1.0 satisfies you.

edit
MAX3421E looks like a fairly universal IC that may be able to handle many USB devices, but 64 byte endpoint buffers will be limiting for audio. UAC (USB Audio Class) device sends/receives a data packet per USB frame (1ms) which packet needs to fit in the endpoint buffer and contain whole 1ms worth of audio samples. With only 64B endpoint buffer you could do no more than 32kHz stereo in 8 bits or mono in 16 bits or up to 64kHz mono in 8 bits.

Whether you look for an MCU or an addon chip like the Maxim device, look for endpoint buffers sufficient for the quality you need. Another requirement is support for isochronous transfers.
« Last Edit: June 15, 2022, 09:45:26 pm by magic »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf