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

Thread: Feasibility of i2s project

  1. #1

    Feasibility of i2s project

    I'm hoping to get a "it'll never work" or a "yes continue your research" from someone on here way smarter than me.

    I have a need to interface some equipment that has 1 analog out and one analog in. (telephone quality, mono for both in and out)
    I was looking at some of these I2S codec chips and it seems they would work well
    I saw the teensy has the I2S audio library and read some of the threads on the 8 channel monster
    I saw the teensy can also interface to the WIZ850IO ethernet adapter.

    I'm curious if there is enough horsepower to do the following:
    Pump the local input audio back out the local output while also sending it out the ethernet port (will probably be some custom UDP broadcast type of packets, not sure yet)
    Monitor ethernet port for streams from other like devices. When one (or more) of interest is detected, mix them with or without the local input and put it out the local output.

    Those are the main functions.. then I have some "now you're pushing it" needs:

    Detect and identify continuous tones in the local input audio.
    Generate tones and mix with the signal.

    I was looking for information on digitally combining two (or more) i2s streams but couldn't really find anything useful.

    Other goals is not to use something complex like a Raspberry Pi. Want something reliable that isn't running off an SD card and can run for months or years without reboot. And if it gets rebooted, there's no doubt it will actually boot.

    Any thoughts on the feasibility would be greatly appreciated.

  2. #2
    So I found the Audio System Designer. Absolutely mindblowing work. That long 45 minute tutorial was awesome.

    I came up with this. I think it has everything I need. All that is left to do is try soon as my Teensy and audio boards get here. I'm a little concerned about the queue not being big enough to make up for TCP/IP jitter but I don't know enough about it to guess. The network will only typically 1-2 streams on it, and up to maybe 4 at certain times over extremely short distances, so I don't think it will be a huge deal. I think this may actually work.

    Click image for larger version. 

Name:	Capture.jpg 
Views:	11 
Size:	29.6 KB 
ID:	19279

    How fast can/do the tone detects work?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012

  4. #4
    Very interesting! I had not seen that. Thank you!

  5. #5
    Senior Member
    Join Date
    Aug 2016
    FYI, the version I have posted works well on Teensyduino 1.49 but I can't guarantee perfect operation under later releases - particularly with the, T4 as Paul and a few others have been very busy with releasing new features.

    As for enough horsepower: a T3.5 can simultaneously send and receive two channels of audio, generate a couple of sine waves and only hit peak 25% processor power (usually a lot less).

    BTW: At the moment I've hit a bug (most likely in my code) where I can't get I2S (SGTL5000 Audio Shield) and the WIZ5500 SPI both working together on a T3 - so if you encounter that in the posted version, I hope to have it fixed shortly.

    One thing not in the DOCX in my repo is that you need to have plenty of audio memory assigned. At least 4 buffers for each pair of channels.

Posting Permissions

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