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.

TAS5782M: Questions for TAS5782M PPC3 EQ Gain Calculation

Part Number: TAS5782M


Hi Experts,

We see that there is a EQ Gain function in TAS5782M Biquad PPC3 GUI, but if you input the desired Gain and check the coefficients(b0, b1, b2, a1, a2), there is no data generated, can you share with us what's the formula for this function to get these coefficients? 

Thanks.

  • Hi Jacky,

    Sorry for the delay. As to your questions:

    1. Gain of BQ in EQ of TAS5782 is not reflected in the 5 coefficients but in following gain BQ. Please refer to applicaton note TAS5782 Process Flows for more as well as PPC3 I2C Monitor for more details as bellow:
    2. As to formula for the 5 coefficients, please refer to:
      • Get the b0, b1, b2, a0, a1, a2 parameters from the formula Audio-EQ-cookbook.
      •  Then follwing the file  
        %Step 1: Get the b0, b1, b2, a0, a1, a2 parameters from the formula Audio-EQ-cookbook.
        %Step 2: Normalize the b0, b1, b2, a0, a1, a2 to get the b0_a0, b1_a0, b2_a0, a0_a0, a1_a0, a2_a0, k       
        
        	   b0_a0=(b0/a0);                 %1.31 format
                b1_a0=(b1/a0)/2;             %2.30 format
                b2_a0=(b2/a0);              %1.31 format
        
                k1=max(abs([b0_a0,b1_a0,b2_a0]));        % Divide by the max value to avoid overflow
                if k1>0.99999988079071044921875;
                    k=k1/0.99999988079071044921875;
                    b0_a0=b0_a0/k;
                    b1_a0=b1_a0/k;
                    b2_a0=b2_a0/k;
                else
                    k=1;
                end
        
                a0_a0=(a0/a0);
                a1_a0=(a1/a0)/2;               %2.30 format
                a2_a0=(a2/a0);                   %1.31 format
        
        % Fill b0_a0, b1_a0, b2_a0, a0_a0, a1_a0, a2_a0 in PPC3 for configuration.	
        		
        		
        % if you want to translate the coefficent to Hex vaule rather than
        % using our PPC3, you can use following formulat to get the HEX coefficient
        % and then wirte them to related register
        
        Step 3: Transfer the b0_a0, b1_a0, b2_a0, a1_a0, a2_a0 to 32bit 2's complement
        [B0,B1,B2,A1,A2] = dec2hex(mod(min(round(2^(32-1)*[ b0_a0, b1_a0, b2_a0, a1_a0, a2_a0]),2^(32-1)-1),2^32));
        
        Step 4:  Write the [B0,B1,B2,A1,A2] to the right register address, multiply the value �k� back in the step 2 to the volume register or the b0, b1, b2 of 15th BQ. 
        
         to get your coefficients.

    For more details, please contact me.

    Regards,

    Alix Wan.

  • Hi Alix-san,

    Could you please share the formula "Audio-EQ-cookbook" as the access is restricted if possible ?

    Best regards,
    Kato

  • Kato-san,

    You had better to access following URL instead of it.
    shepazu.github.io/.../audio-eq-cookbook.html

    Best regards,

    Akio Ito

  • Hi Ito-san,

    Thank you for the information.

    I was able to accessed the above URL.

    Best regards,
    Kato