Just some background:
Specs: Teensy 4.1, Teensyduino 1.62.0
Tools: PlatformIO (teensy platform, teensy41 board, arduino framework)
Add-ons: teensy-4-usb-audio (https://github.com/alex6679/teensy-4-usbAudio) [Adds usb serial inputs and outputs to teensyduino audio library]
My issue is a bit of a complex one. My teensy 4.1 has 4 channels and a playMemory as I2S/memory inputs going to an 8-channel usb output, as well as 2 channels of usb input going to the 2nd I2S bus as output. The teensy also serves the function of collecting EEG data from an AFE with SPI and to send out the EEG over serial. It was originally sent in JSON packets using ArduinoJSON, and with this setup, there were no issues with any audio channels. I changed the EEG data format to be binary c struct packets without any padding to speed up the sending process, but after making the change, the audio broke down. When I take a recording now, channels 1-3 are muffled, almost sounding filtered as well. At first glance, channel 4 stopped functioning completely, but it actually receives a very small constant value. Channel 5 functions fine, but that is to be expected as it comes from memory rather than I2S.
One thing I have tried is increasing my AudioMemory value, but even with pretty big overhead this did not fix the issue. I have also tried changing my patchcording around, which produced some interesting results. I shifted the patchcord destination values up 1 (01234 to 12345), and channel 1 started functioning properly, but channels 2-4 were showing the same muffled/filtered effect from before. After this, I tried shifting the patchcord destinations to the top end of the bus (ch 4-8), and there was a similar combination of semi-functional and dysfunctional channels. I had a sneaking suspicion it had something to do with overloading the serial bus, so I tried commenting out the I2S2 section, but this did not fix the issue.
I have attached my teensy code file below. Thank you guys in advance for the help!
Specs: Teensy 4.1, Teensyduino 1.62.0
Tools: PlatformIO (teensy platform, teensy41 board, arduino framework)
Add-ons: teensy-4-usb-audio (https://github.com/alex6679/teensy-4-usbAudio) [Adds usb serial inputs and outputs to teensyduino audio library]
My issue is a bit of a complex one. My teensy 4.1 has 4 channels and a playMemory as I2S/memory inputs going to an 8-channel usb output, as well as 2 channels of usb input going to the 2nd I2S bus as output. The teensy also serves the function of collecting EEG data from an AFE with SPI and to send out the EEG over serial. It was originally sent in JSON packets using ArduinoJSON, and with this setup, there were no issues with any audio channels. I changed the EEG data format to be binary c struct packets without any padding to speed up the sending process, but after making the change, the audio broke down. When I take a recording now, channels 1-3 are muffled, almost sounding filtered as well. At first glance, channel 4 stopped functioning completely, but it actually receives a very small constant value. Channel 5 functions fine, but that is to be expected as it comes from memory rather than I2S.
One thing I have tried is increasing my AudioMemory value, but even with pretty big overhead this did not fix the issue. I have also tried changing my patchcording around, which produced some interesting results. I shifted the patchcord destination values up 1 (01234 to 12345), and channel 1 started functioning properly, but channels 2-4 were showing the same muffled/filtered effect from before. After this, I tried shifting the patchcord destinations to the top end of the bus (ch 4-8), and there was a similar combination of semi-functional and dysfunctional channels. I had a sneaking suspicion it had something to do with overloading the serial bus, so I tried commenting out the I2S2 section, but this did not fix the issue.
I have attached my teensy code file below. Thank you guys in advance for the help!