Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 28 of 28

Thread: What is the current state of Audio Library support for the Teensy 4.0?

  1. #26
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    230
    The reference manual for the processor is not helpful...because the missing piece of information is which Teensy pins (which I2S lines) are used by the I2S_quad class. That's the part I can't figure out. That's a question that is entirely within the Teensy universe.

    It is *so* awesome that someone (Paul?) Did all the hard and thankless labor to get it to work! Bit which I2S pins did they end up using?

    Thanks!

    Chip

  2. #27
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,624
    Sorry, I am not much of an Audio guy.

    But a couple of quick searches in source files may give you your answers.
    Example I did a global search in sublime text for i2s_quad

    And with that found the file input_i2s_quad.cpp
    Code:
    void AudioInputI2SQuad::begin(void)
    {
    	...
    #elif defined(__IMXRT1062__)
    	const int pinoffset = 0; // TODO: make this configurable...
    	AudioOutputI2S::config_i2s();
    	I2S1_RCR3 = I2S_RCR3_RCE_2CH << pinoffset;
    	switch (pinoffset) {
    	  case 0:
    		CORE_PIN8_CONFIG = 3;
    		CORE_PIN6_CONFIG = 3;
    		IOMUXC_SAI1_RX_DATA0_SELECT_INPUT = 2; // GPIO_B1_00_ALT3, pg 873
    		IOMUXC_SAI1_RX_DATA1_SELECT_INPUT = 1; // GPIO_B0_10_ALT3, pg 873
    		break;
    	  case 1:
    ...
    So looks like pins 6 and 8 are of interest.

    And in the output_i2s_quad.cpp I see
    Code:
    void AudioOutputI2SQuad::begin(void)
    {
    ...
    #elif defined(__IMXRT1062__)
    	const int pinoffset = 0; // TODO: make this configurable...
    	memset(i2s_tx_buffer, 0, sizeof(i2s_tx_buffer));
    	AudioOutputI2S::config_i2s();
    	I2S1_TCR3 = I2S_TCR3_TCE_2CH << pinoffset;
    	switch (pinoffset) {
    	  case 0:
    		CORE_PIN7_CONFIG  = 3;
    		CORE_PIN32_CONFIG = 3;
    		break;
    	  case 1:
    ...
    Looks like pins 7 and 32 might be of interest...

    But again I am only guessing.

  3. #28
    Junior Member
    Join Date
    Dec 2019
    Location
    Rockledge, Florida or Linn Creek Missouri
    Posts
    1
    Paul,
    Having an issue with a fairly large project (HF/VHF Ionospheric Simulator ~ 2300 lines on a Teensy 4.0) Am using 32 Audio "components" including in and out ports but if I try to add an audio component (I need a couple more) the following happens:
    1) Compiles OK and attempts load.
    2) My startup splash screen activates but then hangs...no other functions work. If I remove the added "component" all is OK.
    3) Not running low on Memory about 7 % program storage and 36 % dynamic memory. Have 100 audio blocks allocated max is something like 30.
    The good news is almost everything is working and the audio components have worked well and the simulator is useful and performs well...its just a couple of "bells and whistles" I wanted to add.
    Any help or pointers would be appreciated. Tom Lafleur is helping me on this project....he did all the PCB layouts etc.
    Thanks....keep up the great work...I just ordered a Teensy 4.1!
    Rick Muething rmuething@cfl.rr.com

Posting Permissions

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