fix L/R output, enable oversampling

Fork of TLV320 by Daniel Worrall

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Tue Feb 18 00:21:00 2014 +0000
Parent:
1:7e76c6f56169
Commit message:
fix L/R output, enable oversampling

Changed in this revision

TLV320.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TLV320.cpp	Thu Aug 04 15:07:00 2011 +0000
+++ b/TLV320.cpp	Tue Feb 18 00:21:00 2014 +0000
@@ -165,7 +165,7 @@
 ******************************************************/      
 void TLV320::format(char length, bool mode){  
     char modeSet = (1 << 6);   
-    modeSet |= (1 << 5);                        //swap left and right channels
+//    modeSet |= (1 << 5);                        //swap left and right channels
     
     switch (length)                             //input data into instruction byte
     {
@@ -225,8 +225,9 @@
     }
     char clockInChar = (0 << 6);
     char clockModeChar = (1 << 0);
+    char BOSR = (1 << 1);
 
-    cmd[1] = (rate << 2) | clockInChar | clockModeChar;      //input data into instruciton byte
+    cmd[1] = (rate << 2) | clockInChar | BOSR | clockModeChar;      //input data into instruciton byte
     cmd[0] = SAMPLE_RATE_CONTROL;           //set address  
     mI2c_.write(mAddr, cmd, 2);              //send
     return 0;