Thread:CircuitCo talk:Audio Cape RevB/TLV320aic3104 Programming

Sorry if this is an improper place to ask this but as you've done it successfully hopefully you can answer it. What did you do to program the TLV320, I've tried the following:

var i2c = require('i2c-bus'); var async = require('async');

var DSP_ADDR = 0x18;

var bus = i2c.openSync(1);

function writeAndRespond(port, address, value, done) { bus.writeByte(port, address, value, function(error){   if(error){      return done(error);    }    bus.readByte(port, address, function(error, result){ if(error){ return done(error); }     console.dir("0x" + (address).toString(16) + " is 0x" + result.toString(16)); done; }); });

}

async.series([ // Select Page 0  function(cb){    writeAndRespond(DSP_ADDR, 0x00, 0x00, cb);  },  // Software Reset  function(cb){    writeAndRespond(DSP_ADDR, 0x01, 0x01, cb);  },  // Route Line1LP to the Left ADC, Power up the left ADC  function(cb){    writeAndRespond(DSP_ADDR, 0x13, 0x04, cb);  },  // Route Line1RP to the Right ADC, Power up the Right ADC  function(cb){    writeAndRespond(DSP_ADDR, 0x16, 0x04, cb);  },  // Unmute the left PGA, set gain to 0 dB  function(cb){    writeAndRespond(DSP_ADDR, 0x0F, 0x00, cb);  },  // Unmute the right PGA, set gain to 0 dB  function(cb){    writeAndRespond(DSP_ADDR, 0x10, 0x00, cb);  },

function(cb){ writeAndRespond(DSP_ADDR, 0x20, 0x02, cb); } ], function(error){ if(error){ console.log('Got error ' + error.message); } });

This doesn't seem to enable the Mic's correctly even when I enable Mic3R and Mic3L and I have a valid audio signal in lin2L on my board. Everything else on the dsp appears functional as dout (pin 5) appears to have a valid singal when recording. Oh and note the clock is set to 12Mhz and is reading that out when recording with arecord using a fast logic analyzer. Thanks for any help.

Note: I have no audio output on this board just input.