This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320AIC3254: Applied Gain is not equal to Programmed Gain - enquiry about a previous question and answer

Part Number: TLV320AIC3254


Regarding this previous question I would like to know what the actual answer was that appeared to have resolved the issue this person was having at the time ?

For some reason the answer was never published and I am currently experiencing the same issue on a particular custom PCB using the AIC3254 codec. Could you please assist ?

Essentially after setting the gain using an I2C function 

status += AIC3254_simple_rset(  9, 29);    // Power up LOL & LOR (and HPR & MAR if ...).

Then checking further down the code register 63 to see if it is returning 0x30 :

        i = AIC3254_rread(63);
        i &= 0x30;
} while(i != 0x30);

I'm expecting i=0x30 but getting a reading of i=0x40 so the code is stuck in the loop. Not sure what might have caused this to hang at this point, but if it's hardware related I would need to know ??

Any suggestions as this might have been treated before as per question.

Thanks and regards, MM

  • Hi MM,

    To clarify, Register 63 is the DAC set up register. This isn't related to the flags you mentioned in the title. A reading of 0x40 means that the Right DAC is powered up but not connected to any output path.

    If I'm misunderstanding the problem, please let me know.

    Jeff McPherson

  • Hi Jeff,

    Sorry to be more specific, page 1, reg 63 (6.2.142 Page 1 / Register 63: DAC Analog Gain Control Flag Register) is what I was referring to. The original question was also referring to the same page 1 /register 63, one that would be read to find the status of the various volumes and applied gains etc.

    Assuming that I2C bus read/write problems are not an issue, what is the possible cause that may prevent the "Applied Gain is not equal to Programmed Gain" in any scenario ?

    Thanks, MM

  • Hi Jeff,

    Further to my inquiry it appears I have answered my own question. Having gone through the code with a comb I noticed that the the LOR output was not routed to the LOL input to use both Line Outputs as it was required initially. I guess this must've been inherited from a previous code configuration that did not make use of the Line Outputs the same way.

    After having made this modification, the page 1, reg 63 value shows indeed the correct value of 0x30 as had been the case before.

    So it was not a hardware issue nor an I2C bus issue (did not really think it was a likely possibility) in this case just a simple configuration that was omitted.

    From my experience one of the most difficult tasks of programming the AIC3254 is the configuration of all the various signal chain blocks, and sometimes forgetting one simple thing can block the rest of the configuration :-0

    Thanks and regards, MM