DeNogginizer
New member
I am working on exploring ways to interface the Teensy 3.6 to an interesting audio codec, the ADAU1777 ( https://www.analog.com/en/products/adau1777.html#product-overview ). The ADAU1777 and ADAU1787 are multi-featured CODECS with low-latency capabilities designed for things like ANC. These chips are available on small-ish eval boards (not cheap, but available, so no need to spin any hardware just yet). They have pretty neat ADC, DAC, and serial audio IO capabilities in many formats, as well as a low-latency DSP core. I think they could form the basis for a great Teensy audio shield.
I am envisioning an interface system where TDM is used to transport multichannel audio (perhaps from multiple ADAU1777/ADAU1787) in and out of the Teensy 3.6. The ADAU1777 supports TDM8-24bit-48kHz, TDM4-24bit-96kHz, and TDM2-24bit-192kHz, among many other serial audio formats.
I have successfully got TDM8-48kHz going into the Teensy 3.6 and writing to the Teensy 3.6 onboard uSD card. This was performed by some slight modifications to the WMXZ sound recorder (https://github.com/WMXZ-EU/microSoundRecorder published by a member on this board). Compared to the standard Teensy audio library, the WMXZ TDM code seems more amenable to working at 48kHz and other rates. I have recorded TDM8-48kHz-16bit with the WMXZ code, very slightly modified.
However, I am having trouble getting the higher sample rate variants of TDM working on this setup. I get a garbled mess when trying to record TDM4-96kHz.
I am unsure of whether this is primarily due to running out of throughput for the SD write operations or what, but I can't seem to get it to work in TDM4-96kHz (which should be the same total amount of data as the working TDM8-48kHz). The recording capability of the microSoundRecorder isn't necessary (strictly speaking) for my application but having it has been a useful tool for debug.
I found that the unmodified WMXZ code carries the following statement:
I found that I could add AudioConnection patchCords (up to 8) with no problem, but that I could not compile if I commented out one of the five AudioConnection patchCords (to drop down to 4). I localized the problem to:
I am also interested in reducing the AUDIO_BLOCK_SAMPLES to something lower than 128 to reduce latency across the TDM bus, but haven't gotten anything lower than 128 to work.
Are there any experts on here (WMXZ or anyone else) with an interest in debugging faster sample rates of TDM in and out of Teensy 3.6? If so, I can post some of what I've done in greater detail, along with the recorded results.
Thanks,
I am envisioning an interface system where TDM is used to transport multichannel audio (perhaps from multiple ADAU1777/ADAU1787) in and out of the Teensy 3.6. The ADAU1777 supports TDM8-24bit-48kHz, TDM4-24bit-96kHz, and TDM2-24bit-192kHz, among many other serial audio formats.
I have successfully got TDM8-48kHz going into the Teensy 3.6 and writing to the Teensy 3.6 onboard uSD card. This was performed by some slight modifications to the WMXZ sound recorder (https://github.com/WMXZ-EU/microSoundRecorder published by a member on this board). Compared to the standard Teensy audio library, the WMXZ TDM code seems more amenable to working at 48kHz and other rates. I have recorded TDM8-48kHz-16bit with the WMXZ code, very slightly modified.
However, I am having trouble getting the higher sample rate variants of TDM working on this setup. I get a garbled mess when trying to record TDM4-96kHz.
I am unsure of whether this is primarily due to running out of throughput for the SD write operations or what, but I can't seem to get it to work in TDM4-96kHz (which should be the same total amount of data as the working TDM8-48kHz). The recording capability of the microSoundRecorder isn't necessary (strictly speaking) for my application but having it has been a useful tool for debug.
I found that the unmodified WMXZ code carries the following statement:
Code:
// WMXZ: modified for microSoundRecorder
// hard-coded for 8 TDM channels and 5 data channels
I found that I could add AudioConnection patchCords (up to 8) with no problem, but that I could not compile if I commented out one of the five AudioConnection patchCords (to drop down to 4). I localized the problem to:
Code:
audio_block_t * I2S_TDM::block_incoming[NBL] = { NULL, NULL, NULL, NULL, NULL }; // Use for 5 or more TDM channels
Are there any experts on here (WMXZ or anyone else) with an interest in debugging faster sample rates of TDM in and out of Teensy 3.6? If so, I can post some of what I've done in greater detail, along with the recorded results.
Thanks,