diff core/I2c_Codec.cpp @ 171:e63563507edd

Added command-line options for the PGA
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 28 Dec 2015 03:53:36 +0100
parents 94751ad27fd6
children 5f4408705eed
line wrap: on
line diff
--- a/core/I2c_Codec.cpp	Mon Dec 28 03:19:59 2015 +0100
+++ b/core/I2c_Codec.cpp	Mon Dec 28 03:53:36 2015 +0100
@@ -90,10 +90,11 @@
 		return 1;
 	if(writeRegister(0x0E, 0x00))	// Headset / button press register B: disabled
 		return 1;
-	if(setPga(16, 0))   // Left ADC PGA gain control: not muted; 16dB
-		return 1;
-	if(setPga(16, 1))	// Right ADC PGA gain control: not muted; 16dB
-		return 1;
+	//TODO: why are the next four lines, if uncommented, executed AFTER this method has returned?
+//	if(setPga(16, 0))   // Left ADC PGA gain control: not muted; 16dB
+//		return 1;
+//	if(setPga(16, 1))	// Right ADC PGA gain control: not muted; 16dB
+//		return 1;
 //	if(writeRegister(0x0F, 0b01000000))	// Left ADC PGA gain control: not muted; 0x20 = 16dB
 //		return 1;
 //	if(writeRegister(0x10, 0b0))	// Right ADC PGA gain control: not muted; 0x20 = 16dB