0
\$\begingroup\$

I'm designing my own mic/line preamp (the analog portions) and would like to have it interface with a computer in a send-return fashion as well (like any typical audio interface).

I've noticed that Texas Instruments and other manufacturers sell A/D/A converter chips for dirt cheap. However, the missing link would be the driver code to actually have the computer read and interpret the sent bits, as well as send bits back to the device via USB (having the correct USB topology would also be important). I know a bit of C programming, and I've heard that is the language audio drivers are typically created in.

Here are my questions: are there pre-programmed microcontrollers that include all the necessary I/O and driver code for audio-to-computer interfacing? Or can generic driver code be found on a site like GitHub? If not, where do I begin with programming such software? i.e. what to research, what to focus on, etc.

Thanks a lot for your help!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I may be misunderstanding what you're doing here, but why not just use a cheap USB sound card? \$\endgroup\$
    – Hearth
    Commented Apr 30, 2019 at 16:18
  • \$\begingroup\$ I guess I could do something like that. I wanted to have it all be integrated within the device, though. Would you have any recommendations on a circuit board that might have everything pre-packaged? \$\endgroup\$ Commented Apr 30, 2019 at 16:40
  • 2
    \$\begingroup\$ Asking for recommendations is an automatic close on here; we specifically do not recommend any specific products. \$\endgroup\$
    – Hearth
    Commented Apr 30, 2019 at 16:41

1 Answer 1

1
\$\begingroup\$

I've noticed that Texas Instruments and other manufacturers sell A/D/A converter chips for dirt cheap. However, the missing link would be the driver code to actually have the computer read and interpret the sent bits, as well as send bits back to the device via USB (having the correct USB topology would also be important).

Um, that's not true. TI, for example, sells several audio DACs/ADCs that out of the box do USB.

You don't have to write any drivers: "sound card" is a specified USB profile, and thus, if the chip doesn't do anything special, all OSes will just out of the box support your device as generic sound card.

are there pre-programmed microcontrollers that include all the necessary I/O and driver code for audio-to-computer interfacing?

Although you don't need that, as explained above, yes, hundreds of such microcontrollers exist. Basically, every sufficiently fast microcontroller that has a USB interface can do that; look for the standard ARM Cortex-M0 or -M4 cores that get sold by ST (STM32F…), NXP, SiLabs, cypress, basically every medium sized to large silicon manufacturer out there. You're looking for a microcontroller that has an integrated USB2 PHY, and something like an I2S port, or sufficient DAC and ADC itself.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you for your response. The problem I’m seeing is that a lot of these interface IC’s cap out at 16 bits and 48kHz sampling rate. I’d much prefer an IC that does 24 or 32 bits with a sampling rate of 96kHz, but I’m not seeing such a chip. Do you have any suggestions there? \$\endgroup\$ Commented May 2, 2019 at 13:11
  • \$\begingroup\$ yes, I do. Do the math – you very, very likely don't need more than 48 kHz, and at room temperature you'll never need 32 bit. Especially, because the analog circuitry that you'll be able to build and tune around it wouldn't even be able to make full use of 16 bit. Everything above that is pure esoteric. youtube.com/watch?v=cIQ9IXSUzuM \$\endgroup\$ Commented May 2, 2019 at 13:52
  • \$\begingroup\$ Ok, well I ended up finding an option from Cirrus Logic that does 32 bit and 384kHz or something crazy like that. Typically when masters are sent out, they’re expected to have a 92kHz version of the recording so that it can be downsampled for other versions. It’s dumb, but it’s the standard right now. Thank you for your help, and that’s a great video from Xiph! \$\endgroup\$ Commented May 2, 2019 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.