Tool/software:
Hello TI,
I am integrating the TAS2505 into a new device after an old part went EOL.
I have read through the documentation, and below I have included the boot sequence and a section that is dedicated to switching on and off the dac/speaker.
The TAS250 appears to have an auto mute function that we would like to implement however it does not seem to work as intended. In the code, pauses are included in some audio, and I would expect the chip to auto mute itself during those pauses. Once the chip is turned on, the speaker output remains high with noise until manually turned off, and I was not able to find more information on how the auto mute works. More information on this would be greatly appreciated!
I have included the boot sequence and relevant sequences for turning on and off the dac/spk. I2s and pins BCLK, WCLK, DIN are used.
I have also included screenshots of the oscilloscope readings.
// TAS2505 Init
// ---------------------------------- Page 0
SetRegister(0x00, 0x00); // Select Page 0
SetRegister(0x01, 0x01); // Perform a software reset
5 ms delay
// ---------------------------------- Page 1
SetRegister(0x00, 0x01); // Select Page 1
SetRegister(0x02, 0x01); // Configure LDO output to 1.8V, LDO_SEL high
// ---------------------------------- Page 0
SetRegister(0x00, 0x00); // Select Page 0
SetRegister(0x04,(0b0 << 7)/*clock range*/ | (0b01 << 2)/*PLL IN*/| (0b11) /*CLKIN*/ ); // Set CODEC_CLKIN to PLL, PLL source is BCLK, low pll range
SetRegister(0x05, (0b10000000) | (0b001 << 4)/*P*/| (0b0011) /*R*/ ); // Enable PLL: P=1, R=3
SetRegister(0x06, 0x38); // Set PLL J value = 56
SetRegister(0x07, 0x00); // Set PLL D MSB value = 0
SetRegister(0x08, 0x00); // Set PLL D LSB value = 0
15ms delay
// ---------------------------------- Page 0
SetRegister(0x00, 0x00); // Select Page 0
SetRegister(0x0b, 0x86); // Power up NDAC and set NDAC=6
SetRegister(0x0c, 0x81); // Power up MDAC and set MDAC=1
SetRegister(0x0d, 0x00); // Set DAC OSR MSB to 0
SetRegister(0x0e, 0x20); // Set DAC OSR LSB to 128 (DOSR=128)
SetRegister(0x1b, 0x00); // Set Codec Interface control: 16-bit word length, I2S mode
SetRegister(0x1c, 0x00); // Set data slot offset to 0, using bclk&wclk inputs
SetRegister(0x3c, 0x02); // Set DAC processing block to PRB #2
SetRegister(0x3f, (0b10000000) /*power on*/ | (0b01 << 4)/*Channel*/| (0b00) /*Soft Stepping*/ ); // mix, soft stepping 1 step per 1 dac word clocks
SetRegister(0x41, 0x00); // Set gain to 0db
SetRegister(0x40, 0x04); // dac not muted - auto mute after 800 dc consecutive inputs
// ---------------------------------- Page 1
SetRegister(0x00, 0x01); // Select Page 1
SetRegister(0x0a, 0x00); // Set DAC output common mode to 0.9V (default)
SetRegister(0x30, (0b010 << 4)); // Set SPK driver PGA gain to 6.0dB
Turning on and off dac/spk - these are run before and after an audio clip is to be played
//ON
SetRegister(0x00, 0x00);
SetRegister(0x40, 0x04); // dac on auto mute on
SetRegister(0x00, 0x01); //select page
SetRegister(0x2d, 0x02); // Power up SPK
SetRegister(0x30, (0b010 << 4)); // Set SPK driver PGA gain to 6.0dB
//OFF
SetRegister(0x00, 0x01);// select page
SetRegister(0x2d, 0x00); // Power off SPK
SetRegister(0x00, 0x00);
SetRegister(0x40, 0x08); // dac off
cyan = bclk
purple = wclk
yellow = din
blue = speaker
the audio played is a flat tone - a pause is included ~250ms before and ~400ms after
The start/stop code is run at the beginning and end of the sound file
Thank you
- Duncan