|
|
|
@ -18,21 +18,20 @@ |
|
|
|
|
|
|
|
|
|
// define audio classes and connections
|
|
|
|
|
AudioControlTLV320AIC3206 tlv320aic3206_1; |
|
|
|
|
AudioInputI2S audioInput;
|
|
|
|
|
AudioOutputI2S audioOutput;
|
|
|
|
|
AudioConnection patchCord1(audioInput, 0, audioOutput, 0); |
|
|
|
|
AudioConnection patchCord2(audioInput, 1, audioOutput, 1); |
|
|
|
|
AudioInputI2S audioInput;
|
|
|
|
|
AudioOutputI2S audioOutput;
|
|
|
|
|
AudioConnection patchCord1(audioInput, 0, audioOutput, 0); |
|
|
|
|
AudioConnection patchCord2(audioInput, 1, audioOutput, 1); |
|
|
|
|
|
|
|
|
|
// define the setup
|
|
|
|
|
void setup(void) |
|
|
|
|
{ |
|
|
|
|
//allocate the audio memory first
|
|
|
|
|
AudioMemory(160); //big number to accomodate the delay effect
|
|
|
|
|
AudioMemory(10); //big number to accomodate the delay effect
|
|
|
|
|
|
|
|
|
|
//begin the serial comms
|
|
|
|
|
Serial.begin(115200); |
|
|
|
|
delay(500); |
|
|
|
|
Serial.println("Tympan_TLV320AIC: starting..."); |
|
|
|
|
Serial.begin(115200); delay(500); |
|
|
|
|
Serial.println("Tympan_TLV320AIC3206: starting..."); |
|
|
|
|
|
|
|
|
|
// Setup the TLV320
|
|
|
|
|
tlv320aic3206_1.enable(); // activate AIC
|
|
|
|
@ -51,8 +50,8 @@ void setup(void) |
|
|
|
|
// tlv320aic3206_1.setMicBias(TYMPAN_MIC_BIAS_VSUPPLY); // set mic bias to supply voltage
|
|
|
|
|
|
|
|
|
|
// VOLUMES
|
|
|
|
|
tlv320aic3206_1.volume(10); // -63.6 to +24 dB in 0.5dB steps. uses float
|
|
|
|
|
tlv320aic3206_1.micGain(10); // set MICPGA volume, 0-47.5dB in 0.5dB setps
|
|
|
|
|
tlv320aic3206_1.volume_dB(10); // -63.6 to +24 dB in 0.5dB steps. uses float
|
|
|
|
|
tlv320aic3206_1.setInputGain_dB(10); // set MICPGA volume, 0-47.5dB in 0.5dB setps
|
|
|
|
|
|
|
|
|
|
Serial.println("Done"); |
|
|
|
|
} |