Library to control and transfer data from NXP SGTL5000. As used on the Teensy Audio Shield. It uses DMA to transfer I2S FIFO data.

The Library now supports dual codecs. Allowing all 4 channels of the Teensy I2S interface to RX and TX data to separate SGTL5000 devices.

The ISR routines that handles pointer swaps for double buffering has been fully coded in assembler to reduce overhead and now takes < 800nS per FIFO transfer when using all 4 channels.

Support added for all typical sample rates and system Clock speeds of 96Mhz or 120Mhz.

Pause and Resume functions added to allow quick and simple suppression of IRQs and stream halting and restart. This required software triggered IRQ, in order to ensure accurate word sync control.

Revision:
5:664802e89661
Parent:
4:91354c908416
Child:
6:4ab5aaeaa064
--- a/sgtl5000.cpp	Fri Jun 30 09:33:42 2017 +0000
+++ b/sgtl5000.cpp	Fri Jun 30 09:46:54 2017 +0000
@@ -838,9 +838,9 @@
 
 uint32_t SGTL5000::read_debug(uint32_t index)
 {
-    SGTL5000::debug[0] = packed_RX;
-    SGTL5000::debug[1] = packed_TX;
-    SGTL5000::debug[2] = SGTL5000::I2S_RX_Buffer[0];
+    //SGTL5000::debug[0] = packed_RX;
+    //SGTL5000::debug[1] = packed_TX;
+    //SGTL5000::debug[2] = SGTL5000::I2S_RX_Buffer[0];
     return SGTL5000::debug[index];
 };
 }
\ No newline at end of file