Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Working on interfaces to EVAL-ADAU1777 for Analog Devices ADAU1777 CODEC

  1. #1
    Junior Member
    Join Date
    Mar 2020
    Location
    USA
    Posts
    4

    Working on interfaces to EVAL-ADAU1777 for Analog Devices ADAU1777 CODEC

    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/a...oduct-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:
    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
    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,

  2. #2
    This is way above my head to solve, but could you receive that data and turn it around right back out to codec for output? If that works you at least know that the Teensy is reading the audio data and passing it back successfully.

  3. #3
    Junior Member
    Join Date
    Mar 2020
    Location
    USA
    Posts
    4
    Quote Originally Posted by jkoffman View Post
    This is way above my head to solve, but could you receive that data and turn it around right back out to codec for output? If that works you at least know that the Teensy is reading the audio data and passing it back successfully.
    Those types of experiments are quite useful.

    I have done some things using the Teensy Audio library such as using playMemory directly into a queue, and also out via the TDM, out to the ADAU1777, out the DAC, back to the microphone, back over a TDM bus to the Teensy, and into another queue, to measure end-to-end latency.

  4. #4
    Junior Member
    Join Date
    Mar 2020
    Location
    USA
    Posts
    4
    Current Status: I have 8 channels of 48kHz-24 bit coming in and being recorded as 8 channels of 16 bit.
    For some reason, I cannot get 4 channels of 96kHz TDM to work. It will record four channels of 96kHz audio to the wav file, but the audio is garbled with digital clipping.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •