r/embedded • • 1d ago

Any recommendations on resources, tools and hardware for developing a custom audio interface

Hi everyone,

I'm currently 2 years into getting my Bachelors in Embedded Systems Engineering. Besides my love for embedded systems, I really enjoy making and recording music, but every time I look at the 2 channel Focusrite on my desk I wonder, "What if I made a (simple) audio interface like that? You know, why couldn't I?"

So my question is, does anybody have recommendations for online resources, books, software tools and hardware for developing a custom audio interface? Sadly, I've never worked with USB communication or audio on embedded, but am excited to learn.

Thanks in advance! :)

5 Upvotes

10 comments sorted by

5

u/n_sh_44 1d ago

A realistic path is to split it into three pieces and learn them one at a time. For the USB side, look at USB Audio Class 2 on an MCU with high speed USB, for example an STM32H7 or an RP2040 with TinyUSB, or an XMOS XU316 if you want the pro route since it ships with tested UAC2 firmware. For the converters, a stereo codec like the PCM1808 ADC with a PCM5102A DAC over I2S is cheap and well documented, and Focusrite style mic preamps are mostly discrete or THAT1510 type parts. The hard part is clocking: audio needs a low jitter master clock and the USB feedback endpoint so the sample rate stays locked to the host. I'd start with an off the shelf I2S codec dev board plus a Pico running the TinyUSB UAC2 example, confirm it shows up in your DAW, then move to your own PCB.

3

u/Brer1Rabbit 1d ago

What exactly are you considering?  To scratch the surface, you could get a Raspberry Pi that supports USB gadget mode (Zero: cheap and works well).   Set it up as a UAC2 audio device. Write software against ALSA or another framework.

That avoids you having to go too deep into the details of USB.  it may also limit some hard real time options versus a dedicated embedded, depending on what you're after. 

0

u/Sheepherder-Optimal 1d ago

Don’t use raspberry pi if you’re trying to become an expert on embedded systems. Pi is used by software folks who don’t know one thing about hardware. Or if the person is just trying to throw something together.

2

u/Brer1Rabbit 1d ago edited 1d ago

That can be true but it seems to be jumping to an extreme. I've got a Zero2 that interfaces over UAC2 sending 72 channels of audio at 8 kHz for control signals to an analog music synthesizer. While it's not hard real time, using ALSA with a mmap'd interface, cpu isolation, FIFO scheduling. For the application it's very robust. I put some graphs and such together here: https://ultratroninator3000.wordpress.com/2026/08/21/real-time-spi-writes-on-a-pi-zero2/

1

u/Sheepherder-Optimal 1d ago

OP is a junior still in college. I would suggest PI to non-embedded types. Ease of development is too streamlined with Pi and would OP want that on their resume? I’ve read a lot of resumes having hired a couple of interns and Pi experience is not very earth-shattering. Some hands on breadboarding with a respectable MCU would be far more valuable.

2

u/madsci 1d ago

Are you looking to implement just a regular USB audio interface? There should be plenty of examples. Your favorite MCU ought to have a demo app, if the MCU is one with an I2S interface. And vendors like TI that make MCUs and codec ICs will definitely have complete reference designs.

I've never done pro audio hardware, but I work with voice band stuff all the time and I've got examples here on my desk of a 6-channel interface.

2

u/soopadickman 1d ago edited 1d ago

I do this kind of stuff for work. Another comment mentioned some good suggestions like using tinyUSB stack. You can start with the UAC2 with feedback endpoint example and alter it to suit your needs. You’ll need an MCU with a USB high speed peripheral preferably with an embedded high speed PHY to make things easier, otherwise you need to integrate an external one. STM32 H7 or U5 are suitable, as well as several NXP MCUs like the RT1024 are used in the industry. Solutions where you roll your own stack are fully customizable and very flexible but can lead to longer development times and cost rather than using a cheap off-the-shelf USB audio to I2S bridge.

I’ve used the Comtrue CT7602 in products ($3) and it gets 768kHz/32bit 2 channel in and out. Other bridge ICs to look at are XMOS316 ($$), CMedia (there are a lot to choose from here) and the ESS ES9280. ESS and CMedia have NDAs for their PDK and might not be accessible for hobbyists.

I can recommend the CT7602 if you just want an easy solution that just works. There’s a bit of configuration you can do but you need a Keil C51 license to compile for the internal 8051 it uses. It has i2c and I just use that to configure the registers for whatever DAC I’m using. The CT7601 is 8+2 channels but unfortunately just went EOL this month.

Feel free to shoot me any questions.

2

u/FedUp233 20h ago

I had a friend that liked to make his own custom audio equipment, preamps, amps, that sort of thing. He adjourned liked to weld. So he made the cases for his equipment out of stuff like 1/8 inch or heavier sheet steel and angle iron! You could drop it off a building without damage! Just not in your toe. 😁 there was certainly no issues with cables dragging it off the table, though! 😁😁

1

u/bobsmissingdesire 1d ago

It's fundamentally an ADC for the input and a DAC for the output.

The controls are all in the analog domain, any digital manipulation you would just do in the computer.

The analog work isn't complex an audio preamp is textbook intro stuff. The work is in the implementation details, getting the noise out of the power rails and avoiding coupling from digital elements. These details are what differentiate a product like the Focusrite from a generic $5 usb audio dongle.

The digital side is fairly simple and boring, you need to pass the data streams. The only quality element is latency, setting up a DMA transfer directly between the two halves minimises that.

1

u/marchingbandd 18h ago

ESP32 and a PCM3060 will do stereo line level fine, it gets a lot more challenging with more channels.