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.

PCM5122: Some design question to avoid pop noise...

Part Number: PCM5122

Dear Sirs,

May I know,

1. if the volume is 50% and set volume to 0 by I2C, how soon will be done for it?

2. PCM5122 did not support fade in/out function, right?

3. customer wants to add some code for volume fade in/out control by software as below, does the code is ok or not?

==============================

void MyMute(int vol)

{

    while (vol > 0)

    {

        vol -= 10;

        if (vol < 0) vol = 0;

       

        PCM5122_SetVol(vol);    // Use I2C to set PCM5122 volume

        usleep(5000);         // delay 5ms

    }

}

============================== 

  • Hi Peter,

    1. By default, the device ramps up or down volume at 1dB per fS sample period, though that rate is adjustable.

    2. Incorrect.  The PCM5122 supports volume ramping up and down, and has configurable steps:

    See section 8.3.5.4 in the datasheet.

    3.  The code is okay, but probably not necessary unless you would like something slower than the integrated ramp features.