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.

TPA2028D1 gain control

Other Parts Discussed in Thread: TPA2028D1

Hello,

We faced with problem of audio amplifier, and realy need help and feedback related the case.

ON: TPA2028D1

You can repeat this bug follow these steps exactly as written:
Set 3 dB volume and play audio
Set 30 dB volume and play audio
The second audio volume with AGC off will be like 3 dB. Next time you play it will sound like 30 dB.
This is problem. We must play audio with different gain. And when we start playing second (high fixed gain) audio after the first one (low fixed gain) we unable to get appropriate sound level from amplifier.
Register settings are:
0xC3 
0x01 - Attack time
0x01 - Release time
0x01 - Hold time
0x03 - Fixed gain 3 dB, Fixed gain 30 dB - 0x1E
0x60 - Noise gate threshold
0xC0 - Compression ratio 1:1

Problem was mentioned in e2e community. 
http://e2e.ti.com/support/amplifiers/audio_amplifiers/f/6/p/253229/891982
https://e2e.ti.com/support/amplifiers/audio_amplifiers/f/6/t/438676
Do you have solution for it?

Best Regards

Martin

  • Hello Martin

    I'm going to work in this matter and I'll come back to you as soon as possible with more information.

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • Hi Martin,

    Welcome to E2E, thank you for your interest in our products.
    I was reviewing your configuration setting. I have noticed that limiter level is enabled and the level is very low, even though you set the fixed gain much more high, the signal will be almost the same because It can't vary it due to the limiter level range is very low.
    The Limiter level should be disabled, you can disable in the AGC control register.
    You could try with the next register setting:
    0xC3
    0x01 - Attack time
    0x01 - Release time
    0x01 - Hold time
    0x03 - Fixed gain 3 dB, Fixed gain 30 dB - 0x1E
    0xE0 - Noise gate threshold, Disables the limiter level
    0xC0 - Compression ratio 1:1

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team

  • The settings are the same as you specified. May be we have problem because of different files?

    www.icloud.com/.../

  • Hi Dmitrij

    What do you mean with different files?

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • Look at file in iCloud. I put settings as you specified, but problem still exist. We have one longer audio file which we play with 3 dB, and the other - short one, we play 30 dB. May be AGC still functioning?

  • Dmitrij,

    I can't download the file of ICloud, Could you write the settings to check them in an EVM?

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • We have those two files. One play with 30 dB, the other with 3 dB.

  • Dmitrij,

    I have reviewed the configuration again and that works fine in the EVM. The limiter level should be disabled so that the device works properly.
    When you change the gain, Do you set the shutdown mode or turn the device off?

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • Yes, when we finish to play file we make this. Set volume to 0 and disable amplifier an SW SDN.
    void Audio_AmplifierSetVolume(uint16_t volume)
    {
        uint8_t transfer_data[] = {0x01, 0xC3, 0x01, 0x01, 0x01, 0x06, 0xE0, 0xC0};
    //    uint8_t transfer_data[] = {0x01, 0xC2, 0x02, 0x0A, 0x00, 0x06, 0x5f, 0xC2};
        uint8_t receive_data[5] = {0};
        I2C_M_SETUP_Type TransferCfg;

        //transfer config;
        TransferCfg.sl_addr7bit = (0xB0 >> 1);          /**< Slave address in 7bit mode */
        TransferCfg.tx_data = transfer_data;            /**< Pointer to Transmit data - NULL if data transmit is not used */
        TransferCfg.tx_length = sizeof(transfer_data);  /**< Transmit data length - 0 if data transmit is not used*/
        TransferCfg.tx_count = 0;                       /**< Current Transmit data counter */
        TransferCfg.rx_data = receive_data;             /**< Pointer to Receive data - NULL if data receive is not used */
        TransferCfg.rx_length = 0;                      /**< Receive data length - 0 if data receive is not used */
        TransferCfg.rx_count = 0;                       /**< Current Receive data counter */
        TransferCfg.retransmissions_max = 1;            /**< Max Re-Transmission value */
        TransferCfg.retransmissions_count = 0;          /**< Current Re-Transmission counter */
        TransferCfg.status = 0;                         /**< Current status of I2C activity */
    //    TransferCfg.callback = (void *)0;             /**< Pointer to Call back function when transmission complete used in interrupt transfer mode */

        if(volume > 0)
        {
            transfer_data[1] |= (1 << 6);   //  Enable amplifier
            transfer_data[1] &=~(1 << 5);   //  Software shut down off
            transfer_data[5] = (uint8_t)(volume/6);//settings_to_write.sound_vol/100 * 3;
        }
        else
        {
            transfer_data[1] &=~(1 << 6);   //  Disable amplifier
            transfer_data[1] |= (1 << 5);   //  Software shut down on
            transfer_data[5] = 36;  //minimum gain: -28dB;
        }

        I2C_Init(LPC_I2C1, 400000);
        I2C_Cmd(LPC_I2C1, ENABLE);
        I2C_MasterTransferData(LPC_I2C1, &TransferCfg, I2C_TRANSFER_POLLING);
        I2C_DeInit(LPC_I2C1);
    }

  • Dmitrij,

    Have you already disabled the limiter level? so that you can check if that resolve your issue.

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • Yes. All register settings are given in
    uint8_t transfer_data[] = {0x01, 0xC3, 0x01, 0x01, 0x01, 0x06, 0xE0, 0xC0

    0xE0 - Disable limiter level and sets threshold to 20 mVrms
  • Dmitrij,

    As I mentioned you, that configuration works fine in the EVM. I think that this problem could be caused for another reason, Have you reviewed the code of your application? if so, Is that working properly?

    Best Regards
    Jose Luis Figueroa
    Audio Applications Engineer | A-Team
  • Yes, code is working properly. On monday I will start to check amplifier. We got new PCBs. More information will be soon.