USB Audio for Teensy

D

Deleted User

Guest
The metioned I2S bridge:

As the USB-Audio is more or less of a hassle, I decided to make an I2S-USB bridge board.
This has quite some features, most important:

Adaptive sample rate as I2S master, controlled by host, and adjusted ny data flow, so no sync issues, no click and crackle
Automatic "fake master" with (obviously) empty audio, if host does not send audio, or if not connected to a computer. This is to keep the audio patch running.
Sample rate readable by Teensy via I2C, so can adjust filters to the actual sample rate
Fallback rate programmable by Teensy via I2C, if host does not clock samples, this way host can be synced to Teensy as a clock source.
Supported sample width of 8 up to 32bit, 2 channels in, 2 channels out, controlled by driver/OS
HID feature for volume and media-keys
Mixer feature, for adjusting volume, readable and controllable via I2C and host

This I2S bridge is actually a USB device, so it would need a second port, or can be the only port connected to host for the Teensy project, if no other Teensy USB feature is needed. The connection via a HUB is messy with two cables, so that is where the USB-C board mentioned in the other thread comes handy.

Also this is already designed and working in an other project and need only be adopted to Teensy.

All on a tiny board.

The questions are now:
Would you buy this as a ready-made add-on?

What would you like to invest to gain that feature?

This is to determine whether I make a series of boards to sell.
 
What's the problem that is being solved? I use the T4 and PC->teensy audio over USB works fine. The PC matches rate to the teensy clock, but if for some reason I wanted the teensy to match the PC clock, that is now possible (the teensy audio clock can be tweaked).
 
@jonr call me stupid. I did never get audio over USB to work reliably. And it is 16 bit 44100k only. But hey, people have seen a horse vomit in front of the pharmacy....

Looks like a cool project, but with only 2 channels ADC, not interesting for me personally.

Ok. The existing project is for audiophiles, that is why it is 2-channel each direction, but with superior performace in all aspects. A 32 bit I2S block for audio is in the making, so it is simply usable on Teensy and compatible on all OS.

I could do a similar design für up to 8 channels each direction and feed into Teensy via TDM I2S, but then there will be not more than 16 bits due to bus capacity on the Teensy 4.x, as far as I found out.

So, would you be interested in an 8i8 interface?

With a rewrite of the TDM block, it could then be possible to make something like 4i4 at 32 bits or 8i8 at 16 bits or 2i2 at 32 bits, but then it all crosses the limits of the different OS, or again it would be native 2i8 (2 input, 8 output) at 16 bits only. Apples would be excluded from more than 16 bits with multichannel on the spot. Android no multichannel, Windows needs tweaks or a new driver, only linux has a functional driver in the box already.

Even a greater investment...
 
Last edited:
To the extent it is possible, my opinion is that it's better to fix and add features (clock sync, more channels, more bits, different rates) to the teensy4 USB audio code.
 
Yes, the last post was 09-02-2020, 03:03 AM
I did make some limited effort to identify the missing bits and 'patch' usb.c but as I patched I just kept finding that more and more bits were missing. So, I think I might just back away and re-write the UAC2 stack from scratch using a combination of the open source implementations out there, and try to port it to the IMXRT1062.
And there it ends, because it is not that simple.

Adding a dedicated chip is simple.
And it just works.

F32 OpenAudio_ArduinoLibrary by Chip Audette is working well, so there is no point in reinventing the wheel. It even plays together with Teensy Audio.
What about merging it into Teensy Audio?
 
Well, your answer is not the end of the world, because we are still able to use OpenAudio_ArduinoLibrary as an add-on to or as a replacement of Teensy Audio. It just would have been nicer to have it on board already by default.

Dedicated USB audio interface seems to be of low interest anyway, so that beta on my workbench will be the only Teensy 4.1 with real USB audio.
Who wants to license the design work, nonexclusive, may make a reasonable offer.
unsubscribing this
 
Back
Top