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:
13:83c2aaf4a338
Parent:
12:9ce7f3828c6a
Child:
14:9043626add45
--- a/sgtl5000.h	Wed Sep 27 10:59:09 2017 +0000
+++ b/sgtl5000.h	Wed Sep 27 11:20:43 2017 +0000
@@ -221,7 +221,7 @@
 
     /*!
     @brief Stop TX channel and flag as detached.
-                        During running stream, the callback based function can not be changed. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
+                        During running stream, the callback based function can not be changed. It must therefore be deteched first. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
     */
     int32_t detach_TX(void);
 
@@ -292,7 +292,7 @@
 
     /*!
     @brief Stop RX channel and flag as detached.
-           During running stream, the callback based function can not be changed. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
+           During running stream, the callback based function can not be changed. It must therefore be deteched first. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
     */
     int32_t detach_RX(void);
 
@@ -365,7 +365,7 @@
 
     /*!
     @brief Stop both TX & RX channels and flag as detached.
-                        During running stream, the callback based function can not be changed. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
+                        During running stream, the callback based function can not be changed. It must therefore be deteched first. However changes to the NB IRQ based attachment can have the vector changed on-the-fly
     */
     int32_t detach_SYNC(void);