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.

TAS2557: Digital gain can't find matching register write to documentation.

Part Number: TAS2557
Other Parts Discussed in Thread: TAS2559,

Tool/software:

What I would like to do is change the digital gain. 

This is what I found in the forum and documentation.

I have found the "Digital Volume Control – TAS2557/TAS2559" document but can't make it match the old code i have.

There is also a excel sheet:

-6 33634105,9 201373A
-5 37738087,51 23FD668
-4 42342830,62 28619AF
-3 47509437,36 2D4EFBD
-2 53306465,48 32D6461
-1 59810838 390A416
0 67108864 4000000

This is our current configuration:

static const CfgRegValue_t volumeHighRegValues[] =
{
/* 0 db */
{0x00, 0x00}, /* Page 0 */
{0x7f, 0x00}, /* Book 0 */
{0x00, 0x32}, /* Page 50 */
{CFG_META_BURST, 5}, /* 5 byte data burst */
{0x0c, 0x80}, /* Digital gain value */
{0x00, 0x00}, /* Digital gain value */
{0x00, 0x00} /* Digital gain value */
};

static const CfgRegValue_t volumeMediumRegValues[] =
{
/* -3 db */
{0x00, 0x00}, /* Page 0 */
{0x7f, 0x00}, /* Book 0 */
{0x00, 0x32}, /* Page 50 */
{CFG_META_BURST, 5}, /* 5 byte data burst */
{0x0c, 0x5a}, /* Digital gain value */
{0x9d, 0xf7}, /* Digital gain value */
{0xac, 0x00} /* Digital gain value */
};

static CfgRegValue_t volumeLowRegValues[] =
{
/* -6 db */
{0x00, 0x00}, /* Page 0 */
{0x7f, 0x00}, /* Book 0 */
{0x00, 0x32}, /* Page 50 */
{CFG_META_BURST, 5}, /* 5 byte data burst */
{0x0c, 0x40}, /* Digital gain value */
{0x26, 0xe7}, /* Digital gain value */
{0x3c, 0x00} /* Digital gain value */
};

static const CfgRegValue_t muteRegValues[] =
{
/* -110 db */
{0x00, 0x00}, /* Page 0 */
{0x7f, 0x00}, /* Book 0 */
{0x00, 0x32}, /* Page 50 */
{CFG_META_BURST, 5}, /* 5 byte data burst */
{0x0c, 0x00}, /* Digital gain value */
{0x00, 0x1a}, /* Digital gain value */
{0x87, 0x00} /* Digital gain value */
};

But I cannot find out how they match. 
I tried the calculated formula and looked at the excel but no luck. 
The settings work to adjust the volume.

  • Hi Viktor, 

    thank you, we have your question and someone on our team will get back to you shortly. should be within 24 Hrs. 

    Regards,
    Arthur

  • Hi Viktor, 

    Greatly sorry for the delay here. 

    So i just checked the formula from the datasheet as well as the corresponding excel data set you shared. those seem to be matching. 

    from what i can tell the value sin the code snippet you shared are 2x the values calculated from the excel sheet. I am not sure where this factor is coming from. 

    If i understand correctly you are saying the code implementation is working but you are unsure why? 

    Regards,
    Arthur

  • Hi no problem.
    At least I know how it relates. I talked to one of them who work with this. I as he remember they looked at the i2c bus on a dev kit while adjusting on the volume. Maybe there was a bug in that sw or a patch to handle the devkit to explain the double value. 
    Now have a way forward.
    Thank you.