Using Teensy with Audio Adapter as audio interface for a Pi Zero

Status
Not open for further replies.

slexer

Member
I am wondering if anyone has any experience with using a Teensy with Audio Adapter as an audio interface with a Pi Zero. Would the Teensy work as a class compliant USB audio card, or are there options to use i2s for this?

Edit: sorry guys, I had overlooked the lengthy and unresolved thread about Teensys working with Pi2 and/or Pi3, I assume it's pointless to ask about the Pi Zero then.
 
Last edited:
I am wondering if anyone has any experience with using a Teensy with Audio Adapter as an audio interface with a Pi Zero. Would the Teensy work as a class compliant USB audio card, or are there options to use i2s for this?

Edit: sorry guys, I had overlooked the lengthy and unresolved thread about Teensys working with Pi2 and/or Pi3, I assume it's pointless to ask about the Pi Zero then.

The normal issue is programming the Teensy from the Raspberry Pi. If you can program the Teensy on a normal PC/Mac, and then move it over to the Pi zero, it makes it a lot easier.

USB audio is outside my skill set, so I wouldn't be able to answer your original question. But you might want to explain in detail how you would like to use the Teensy. Do you want to provide audio input to the Pi or would the Pi take audio output, and then do something with the output? The Teensy has some i2s support, but I recall there were limits to the support.

IIRC, the Pi-zero also has some challenges in that you would probably need to add a USB hub if you wanted to use USB audio, and it doesn't have analog audio output.
 
Thanks for your reply. I have a couple of Teensy setups with the pjrc audio adapters (I also have one using the TDM chick CS42448) to prototype various ideas for standalone audio processors.

One of these, using the audio adapter, is working perfectly as my audio cord for an iPad, using two line ins and line outs and interfacing with the iPad via the usb audio i/o from the Audio library. This all works perfectly.

I would like my teensy based audio interface to work with Raspberry Pi, in particularly the Pi Zero, but since reading there are some potential problems around the sample rate issue (teensy runs with 44117), I thought I'd see what others have experienced.
 
Alternatively I would like to know if anyone had connected Tennsy and Raspberry via i2s for audio transmission. I would definitely need inputs as well as outputs.
 
This little 17Hz deviation in the sample frequency shouldn't be a problem (as your iPad proves). We had one poster here who complained about issues with a RasPi, but IMNSHFO, it was a problem of its audio driver and/or setup, not the hardware itself.
 
hi,

i try an teensy3.6 stacked with an sgtl5000 audioadapter board as usb soundcard on different arm based singe board computers. PI2, PI3 and an Odroid C1. and i do not get it working without cracle after a while of data transmission. dependent to buffersize settings it start cracle audio after ~10 seconds(lowest possible buffersize) up to ~8 minutes with highest possible latency. so my current experience say clearly NO. in moment there is no way to use it as usb audio device CRACLE FREE under Linux and arm based single chip boards. there are many cheap I2S audio boards for rpi available. for example this https://www.hifiberry.com/shop/boards/hifiberry-dac-zero/ . or if you want to deal as plugin host with instrument input and output, maybe this one https://blokas.io/ . at the moment i hope that paul dive into the usb audio driver problem. to get the current using isochronous data transfer working... or maybe switch over to asynchronous mode.

whatever in moment i use an pi3 with my old alesis iO2/cheap usb audio card (from last decade) with an roundtrip latency at 2,8ms as audio plugin host. pi3 can run mod-host + mod-ui(web interface ui for mod-host) connected to onboard wifi chip in hostmode(hostap) without any problems at the usb host controller(on PI3 they share the same data bus). there are many projects outside which use the rpi as audio plugin host and/or synthesizer with extremely small audio and midi latency. also there are some web based ui's to control audio on the rpi. some people also try to deal audio over ethernet which also is reported as working. need an realtime kernel. https://autostatic.com/2017/06/27/rpi-3-and-the-real-time-kernel/

i hope that paul or some one with good usb audio transmission knowledge can fix the problem on teensy usb_audio. IMO it would be really cool if people can build DIY soundcards for example to create interesting sound tools, instruments and control surfaces in combination with single chip computer based DIY audio projects.

/g
wolke
ps: my post where i report the usb audio cracle problem with teensy3 as usb_audio card connected to an PI. https://forum.pjrc.com/threads/4747...-audio-interface-connected-to-an-raspberry-pi
 
Last edited:
Since there are no problems when using the Teensy with audio board as an USB audio device with an iPad which is basically a ARM device running Unix, too, like the RasPi, I think that there is rather a problem with faulty audio drivers in the Linux distributions for the RasPi, and not a Teensy problem.
 
hi Theremingenieur,
this discussion is imo of topic in this tread.
unix is not linux, core audio is not alsa, jackd is not a audio driver, and so on...

the real facts are, teensy3 with sgtl5000 audioadapter do not work properly as usb audio card with ALSA kernel module snd_usb_audio under linux.
and a god starting point is, that ALSA and teensy core libraries are open source. so IMO it is possible to find the problem.
and it is not important if ALSA cause the problem or teensy core libs cause the problem, if at least the problem can solved.

the chance that alsa kernel module snd_usb_audio caused the problem is probably low.
Advanced Linux Sound Architecture (ALSA) is an really solid sound architecture for linux. its a part of linux kernel since 2002 . i think millions of people use class compliant usb sound devices on linux systems without problems.
also i think there are thousands of people which use corresponding usb soundcards on linux-arch_arm based single chip computers too. if there is a general problem with the ALSA kernel module snd_usb_audio, dozens of people will do bug reporting on alsa project org, or discuss this maybe on "linux audio user" or "linux audio developer" mailing list. we talk about USB AUDIO Device Class 1 Specifications release 1.0 from 1998 http://www.usb.org/developers/docs/devclass_docs/audio10.pdf from http://www.usb.org.

maybe you also consider the possibility that teensy3 core library usb_audio need some improvements. this is, how open source projects work. people report bugs or problems, try to find out how others can reproduce the problem and talk about them. than people can together solve bugs or issues. github tools like the issue tracker are mostly designed for collaboration. and at least Paul the head from www.pjrc.com participates from such systems and get many free community testers which love DIY-arduino-education-art-politically-and-hack-a-day-upcycle projects. this people spend their time for debugging, reporting bugs and so on without any commercial expectations. at least they spend their money to buy pauls products!!!
Maybe it's a good idea to hear them!

the question from slexter was simple and clear
I am wondering if anyone has any experience with using a Teensy with Audio Adapter as an audio interface with a Pi Zero. Would the Teensy work as a class compliant USB audio card,.....

pi zero do not run an ios kernel and do not use core audio driver! it is the small brother from raspberry pi 2/3 running a linux (GNU) kernel and ALSA (if sound modules are used).

i use alsa and GNU Linux Kernel on an RPI and i try to share my problems with this combination in this tread from slexter and a week earlier in my tread. i spend many hours to encircle the problem.. and you know for sure that this is all wrong.
that's a bit of a strain. above all things when you compare apples(ios) with pears(linux).

/g
wolke
 
hi Theremingenieur,
this discussion is imo of topic in this tread.
unix is not linux, core audio is not alsa, jackd is not a audio driver, and so on...

the real facts are, teensy3 with sgtl5000 audioadapter do not work properly as usb audio card with ALSA kernel module snd_usb_audio under linux.
and a god starting point is, that ALSA and teensy core libraries are open source. so IMO it is possible to find the problem.
and it is not important if ALSA cause the problem or teensy core libs cause the problem, if at least the problem can solved.

the chance that alsa kernel module snd_usb_audio caused the problem is probably low.
Advanced Linux Sound Architecture (ALSA) is an really solid sound architecture for linux. its a part of linux kernel since 2002 . i think millions of people use class compliant usb sound devices on linux systems without problems.
also i think there are thousands of people which use corresponding usb soundcards on linux-arch_arm based single chip computers too. if there is a general problem with the ALSA kernel module snd_usb_audio, dozens of people will do bug reporting on alsa project org, or discuss this maybe on "linux audio user" or "linux audio developer" mailing list. we talk about USB AUDIO Device Class 1 Specifications release 1.0 from 1998 http://www.usb.org/developers/docs/devclass_docs/audio10.pdf from http://www.usb.org.

maybe you also consider the possibility that teensy3 core library usb_audio need some improvements. this is, how open source projects work. people report bugs or problems, try to find out how others can reproduce the problem and talk about them. than people can together solve bugs or issues. github tools like the issue tracker are mostly designed for collaboration. and at least Paul the head from www.pjrc.com participates from such systems and get many free community testers which love DIY-arduino-education-art-politically-and-hack-a-day-upcycle projects. this people spend their time for debugging, reporting bugs and so on without any commercial expectations. at least they spend their money to buy pauls products!!!
Maybe it's a good idea to hear them!

the question from slexter was simple and clear


pi zero do not run an ios kernel and do not use core audio driver! it is the small brother from raspberry pi 2/3 running a linux (GNU) kernel and ALSA (if sound modules are used).

i use alsa and GNU Linux Kernel on an RPI and i try to share my problems with this combination in this tread from slexter and a week earlier in my tread. i spend many hours to encircle the problem.. and you know for sure that this is all wrong.
that's a bit of a strain. above all things when you compare apples(ios) with pears(linux).

/g
wolke

i can use that way. tks you
 
Thanks for all the detailed answers, wolke, you have clearly investigated this in detail over some time. I'd hope that it'll be sorted, unfortunately the problems involved are way beyond my skills, so all I can do is wait and see.
 
Status
Not open for further replies.
Back
Top