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.

TAS5713: DRC configuration, registers, formats

Part Number: TAS5713

I need to use the DRC in my current project.  Like most TAS5713 registers, the documentation is not only insufficient, but that which exists is self-contradictory.  

  • The DRC section of the datasheet at http://www.ti.com/lit/ds/symlink/tas5713.pdf mentions 3 alpha and omega pairs for the filters, T, and K.  It mentions that the T parameters are 9.23 format, while the others are 3.23, but gives no indication of what units either T or K are in.  It indicates the filter structure without any indication of how it ties into the DRC, if at all.
  • The same section lists registers for 3 each alpha and omega and T, but not K (the slope indicated in the diagram just above it).
  • The register listing also eschews any K setting, but adds a T' which is described as a decay threshold with no further information justifying its existence.  Although the DRC section of the spec lists register locations, they're different from the ones in the register list (DRC/reg sections indicate T=3B/40, ae-oe=3C/3B, aa-ad-wa-wd/attack-release=40/3C.  The GDE seems to follow the register descriptions rather than the DRC section.  However, it's unclear how aa, ad, wa, and wd...presumably 3.23 values...are crammed into the 64-bit register, whichever one it is.  (Rather than four filter coefficients, the
  • The DRC app note at http://www.ti.com/lit/an/sloa148/sloa148.pdf has no indication of any T' parameter, but mentions the K parameter and adds an O parameter for offset.  It specifically states that "The DRC scheme has a single threshold, offset, and slope (all programmable)."  In contrast, the TAS5713 appears to have a double threshold with no offset or slope.
  • Of course, the easiest way to configure it is with the GDE.  Reading the DRC, I try to set the threshold at -3dB...it should generate a number representing (-3 - 24)/-6.02, or about 4.5 (ignoring the sign error in equation 4, which is countered by another sign error in the translation to 9.23).  However, it generates 05A90000, which is closer to 11.32.  It generates no value for the mystical T', so I don't know whether this is an error in the register definition or in the descriptions.  I couldn't test the example in the app note, as it uses a threshold of -64dB, which the GDE doesn't support.
  • Although the DRC section states that all values are 3.23 other than T, the GDE happily spits out larger (and/or negative?) numbers for release.  Attack appears to be limited to 0-0x000A0000.  With no further non-conflicting descriptions, it's difficult to know how to interpret them.
  • Multiple trial and error using the conflicting indications in the register listing, spec DRC description, and app note shows no indication that the DRC has any effect on the gain under any conditions.  (Yes, I wrote a 0x00000001 to 0x46.)  When I change even full scale input by 3dB, the output changes by 3dB, indicating no compression whatsoever.

So I need to know ASAP whether this is one of those blocks that will work, or if it's just one of those prolific bugs that TI never tests for and just redacts the documentation when they find out it doesn't work.  If there's hope that it will work in any of the myriad ways it's described in these various places, it would be great if we could define which one (or which elements of each are used) and decide which registers, units, and rules are involved.

  • Hi Steve,
    TAS5713 has been already very widely used in the market, and we never heard of DRC issue. Adam will help to explain your concern soon later.
    Best regards,
    Shawn Zheng
  • I'm glad to hear that you've been so fortunate.  Does this actually count as a response in the TI system?  Apparently, most of your customers have no need for the DRC, or quickly gave up and found alternate solutions.  I have fewer options, and need to know:

    1. How do I set K and O, or if they're chosen automatically, what are the criteria?
    2. What are the rules and units for setting T?
    3. What is the mysterious T'?  How does it affect operation?
    4. Can I trust the GDE, or should I trust the spec instead?  If I can't trust the GDE, then I need more details about the architecture, operation, and parameter interpretation.
    5. How do I calculate attack/release parameters?  They appear to not be filter coefficients, or even in 3.23 format, if I trust the register defaults and GDE.
    6. Why can I not find any combination of parameters which results in any kind of compression whatsoever?

    Here is the configuration file I've used most recently.  The DRC values in this version are taken from this thread, which another user reported working.  The requirements for this are that anything from full scale to -44dBfs be compressed to the equivalent of a full scale signal, but at this point I'd be happy if I could get any sign that any compression was happening at all.  The gain lineup below clips at -6dBfs, so the 0dB threshold (depending on which datasheet you believe) may or may not kick in, but I've tried setting the threshold from max to near min (from the GDE) and several other settings, and none seems to have any effect at all on the output.  (The DRC section is near the beginning, but the entire file is included for completeness.)

    /* ************************************************************************** */
    /** Header file for TAS5713 initialization-

    @Company
    Otto Engineering

    @File Name
    tas5713_const.h

    @Summary
    Contains the initialization data (generated largely by the
    tas5713 configurator program) to initialize the part. Used
    by drv_tas5713.c to index through the init sequence.

    */
    /* ************************************************************************** */

    #ifndef _TAS5713_CONST_H /* Guard against multiple inclusion */
    #define _TAS5713_CONST_H

    // Uncomment the following define to set the biquads to all-pass.
    //#define NOBQ

    /* ************************************************************************** */
    /* ************************************************************************** */
    /* Section: Included Files */
    /* ************************************************************************** */
    /* ************************************************************************** */

    // Constants
    uint8_t tas5713_init_seq[][21] = {
    {0x1b,0x00}, // Enable factory clock trim or it won't run
    {0x03,0x90}, // PWM high pass enabled, soft unmute on clk err
    {0x04,0x00}, // 16bit Word Length, Right-Justified
    {0x07,0x30}, // Master volume, set below max to start
    {0x08,0x60}, // CH1 volume, set to give 99dB @-15dBfs
    {0x09,0xf8}, // CH2 volume, unused (set to min)
    {0x0a,0xf8}, // CH3 volume, unused (set to min)
    {0x0e,0x93}, // 21ms @ 48KHz
    {0x19,0x30}, // Use all outputs
    {0x25,0x01,0x00,0x22,0x45}, // Outputs A and B to CH1+, C and D to CH1-
    {0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH2 output off
    {0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH1 R input off
    {0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH2 L input off
    {0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH2 R input off
    {0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH2 inline gain off
    {0x75,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // CH2 DRC2 gain off

    // DRC configuration
    {0x46,0x00,0x00,0x00,0x03},
    {0x40,0x08,0x00,0x00,0x00,0x07,0xff,0xff,0xff},
    {0x43,0x08,0x00,0x00,0x00,0x07,0xff,0xff,0xff},
    {0x3b,0x00,0x05,0x1e,0xb8,0x00,0x7a,0xe1,0x48},
    {0x3c,0x00,0x06,0x80,0x00,0xff,0xff,0xa9,0x6b},
    {0x3e,0x00,0x05,0x1e,0xb8,0x00,0x7a,0xe1,0x48},
    {0x3f,0x00,0x06,0x80,0x00,0xff,0xff,0xa9,0x6b},

    {0x73,0x01,0xff,0xff,0xff}, // Input gain set to 4

    // In order to write the biquads in different banks, it's necessary to force
    // the TAS5713 into a particular bank and write the biquads for the frequency
    // that bank supports. Bank 2 is the default for 48KHz, and bank 3 is the
    // default for 8KHz. See TI spec SLOS637A, page 34.
    {0x50,0x0f,0x70,0x80,0x02}, // Set up write to bank 2 (48 KHz) biquads

    // Note to future designers: Each biquad contains 20 bytes for five coeffs:
    // b0, b1, b2, a1, a2 in that order. The a0 is normalized to one by
    // convention. However, this is where TI breaks with convention...the
    // a1 and a2 values are added to the feedback path, rather than being
    // subtracted as normally represented. As such, the signs have to be
    // changed on the a values before converting to hex. The first six bits
    // are unused; the lower 26 are Sxx.xxxx_xxxx_xxxx_xxxx_xxxx_xxx0 binary.

    // Coefficients from ASN using design:
    // ASN Filter Designer Professional v4.0.5
    // Mon, 16 Oct 2017 10:29:20 GMT
    //
    // ** Primary Filter (H1)**
    // Filter Arithmetic = Floating Point (Double Precision)
    // Architecture = IIR
    // Structure = Direct Form II Transposed
    // Response = Bandpass
    // Method = Elliptic
    // Biquad = Yes
    // Stable = Yes
    // Sampling Frequency = 48kHz
    // Filter Order = 7
    //
    // Band# Frequencies (kHz) Att/Ripple (dB)
    // 1 0.000, 0.100 60.000
    // 2 0.150, 12.000 0.001
    // 3 13.000, 24.000 60.000
    //
    // Biquad #1
    // Gain = 0.530547
    // B = [ 1.00000000000, -0.00000000000, -1.00000000000]
    // A = [ 1.00000000000, -1.04003043972, 0.06065452878]
    //
    // Biquad #2
    // Gain = 0.326516
    // B = [ 1.00000000000, 1.69256283610, 1.00000000000]
    // A = [ 1.00000000000, -0.02644272252, 0.16540756538]
    //
    // Biquad #3
    // Gain = 0.468195
    // B = [ 1.00000000000, 1.21209793697, 1.00000000000]
    // A = [ 1.00000000000, 0.15249127459, 0.49691240026]
    //
    // Biquad #4
    // Gain = 0.649475
    // B = [ 1.00000000000, 0.95399135966, 1.00000000000]
    // A = [ 1.00000000000, 0.28825320426, 0.82901018764]
    //
    // Biquad #5
    // Gain = 0.985770
    // B = [ 1.00000000000, -1.99996789944, 1.00000000000]
    // A = [ 1.00000000000, -1.97123679514, 0.97163449156]
    //
    // Biquad #6
    // Gain = 0.993839
    // B = [ 1.00000000000, -1.99990542837, 1.00000000000]
    // A = [ 1.00000000000, -1.98778170076, 0.98809407044]
    //
    // Biquad #7
    // Gain = 0.998236
    // B = [ 1.00000000000, -1.99986347917, 1.00000000000]
    // A = [ 1.00000000000, -1.99655360059, 0.99683371044]
    #ifndef NOBQ
    {0x29,0x00,0x43,0xE8,0xF6,0x00,0x00,0x00,0x00,0x03,0xBC,0x17,0x0A,0x00,0x85,0x1F,0xB7,0x03,0xF8,0x3C,0x79},
    {0x2a,0x00,0x29,0xCB,0x46,0x00,0x46,0xBD,0x32,0x00,0x29,0xCB,0x46,0x00,0x03,0x62,0x79,0x03,0xEA,0xD3,0xED},
    {0x2b,0x00,0x3B,0xED,0xD0,0x00,0x48,0xA3,0xC7,0x00,0x3B,0xED,0xD0,0x03,0xEC,0x7B,0x2B,0x03,0xC0,0x65,0x2D},
    {0x2c,0x00,0x53,0x21,0xFF,0x00,0x4F,0x4E,0xD7,0x00,0x53,0x21,0xFF,0x03,0xDB,0x1A,0x85,0x03,0x95,0xE2,0xFF},
    {0x2d,0x00,0x7E,0x2D,0xB6,0x03,0x03,0xA5,0x9E,0x00,0x7E,0x2D,0xB6,0x00,0xFC,0x51,0x7C,0x03,0x83,0xA1,0x7C},
    {0x2e,0x00,0x7F,0x36,0x1D,0x03,0x01,0x96,0xD9,0x00,0x7F,0x36,0x1D,0x00,0xFE,0x6F,0xA1,0x03,0x81,0x86,0x23},
    {0x2f,0x00,0x7F,0xC6,0x32,0x03,0x00,0x78,0x13,0x00,0x7F,0xC6,0x32,0x00,0xFF,0x8F,0x11,0x03,0x80,0x67,0xC1},
    #else
    {0x29,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2a,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2b,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2c,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2d,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2e,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2f,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    #endif

    {0x50,0x0f,0x70,0x80,0x03}, // Set up write to bank 3 (8 KHz) biquads
    // Coefficients from ASN using design:
    // ASN Filter Designer Professional v4.0.5
    // Tue, 17 Oct 2017 14:35:29 GMT
    //
    // ** Primary Filter (H1)**
    // Filter Arithmetic = Floating Point (Double Precision)
    // Architecture = IIR
    // Structure = Direct Form II Transposed
    // Response = Bandpass
    // Method = Elliptic
    // Biquad = Yes
    // Stable = Yes
    // Sampling Frequency = 8000Hz
    // Filter Order = 7
    //
    // Band# Frequencies (Hz) Att/Ripple (dB)
    // 1 0.000, 100.000 60.000
    // 2 150.000, 3500.000 0.001
    // 3 3750.000, 4000.000 60.000
    //
    // Biquad #1
    // Gain = 0.775846
    // B = [ 1.00000000000, -0.00000000000, -1.00000000000]
    // A = [ 1.00000000000, -0.24327092020, -0.55169105550]
    //
    // Biquad #2
    // Gain = 0.753636
    // B = [ 1.00000000000, 1.98681996264, 1.00000000000]
    // A = [ 1.00000000000, 1.43793968716, 0.56266245893]
    //
    // Biquad #3
    // Gain = 0.871487
    // B = [ 1.00000000000, 1.96144117612, 1.00000000000]
    // A = [ 1.00000000000, 1.67802551648, 0.79002866141]
    //
    // Biquad #4
    // Gain = 0.918848
    // B = [ 1.00000000000, -1.99883799509, 1.00000000000]
    // A = [ 1.00000000000, -1.82802969604, 0.84143647232]
    //
    // Biquad #5
    // Gain = 0.959203
    // B = [ 1.00000000000, -1.99658065214, 1.00000000000]
    // A = [ 1.00000000000, -1.91994588314, 0.93087744141]
    //
    // Biquad #6
    // Gain = 0.951776
    // B = [ 1.00000000000, 1.94459714331, 1.00000000000]
    // A = [ 1.00000000000, 1.83088571356, 0.93956598024]
    //
    // Biquad #7
    // Gain = 0.985143
    // B = [ 1.00000000000, -1.99506783273, 1.00000000000]
    // A = [ 1.00000000000, -1.97120399480, 0.98121792939]
    #ifndef NOBQ
    {0x29,0x00,0x63,0x4E,0xEB,0x00,0x00,0x00,0x00,0x03,0x9C,0xB1,0x15,0x00,0x1F,0x23,0x80,0x00,0x46,0x9D,0xD0},
    {0x2a,0x00,0x60,0x77,0x24,0x00,0xBF,0xA8,0xCE,0x00,0x60,0x77,0x24,0x03,0x47,0xF1,0x98,0x03,0xB7,0xFA,0xAE},
    {0x2b,0x00,0x6F,0x8C,0xE2,0x00,0xDA,0xCC,0xA6,0x00,0x6F,0x8C,0xE2,0x03,0x29,0x36,0x76,0x03,0x9A,0xE0,0x58},
    {0x2c,0x00,0x75,0x9C,0xCF,0x03,0x14,0xE9,0x5E,0x00,0x75,0x9C,0xCF,0x00,0xE9,0xFC,0xE0,0x03,0x94,0x4B,0xD0},
    {0x2d,0x00,0x7A,0xC7,0x29,0x03,0x0A,0xDD,0x26,0x00,0x7A,0xC7,0x29,0x00,0xF5,0xC0,0xC9,0x03,0x88,0xD9,0x03},
    {0x2e,0x00,0x79,0xD3,0xCB,0x00,0xEC,0xE7,0xB2,0x00,0x79,0xD3,0xCB,0x03,0x15,0xA5,0x8A,0x03,0x87,0xBC,0x4E},
    {0x2f,0x00,0x7E,0x19,0x2A,0x03,0x04,0x6C,0xE3,0x00,0x7E,0x19,0x2A,0x00,0xFC,0x50,0x69,0x03,0x82,0x67,0x74},
    #else
    {0x29,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2a,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2b,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2c,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2d,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2e,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    {0x2f,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
    #endif

    {0x50,0x0f,0x70,0x80,0x04}, // Return to bank switching enabled
    {0x05,0x82}, // Hard mute off, Mid-Z ramp enabled
    };

    #endif /* _tas5713_const.h */

    /* *****************************************************************************
    End of File
    */

  • Partial success...it turns out the filter registers at 3b and 3c have to be written to each bank individually (which seems odd, since according to the GDE, they have the same values at any data rate). I now have the DRC working and am trying to fine tune it using trial and error. If I could get some of the above details on the parameters and coefficients, that would improve my rate of progress...it seems K=-1, O=0, and T and T' don't seem to have much effect in any case. If anyone still has access to the design files, or if there's reliable and accurate documentation you can point me to, I'm sure I can get much better performance out of it.
  • Hi Steve,
    Considering that we are communicating with Mark off-line about this issue, could you please help to close this question?
    Best regards,
    Shawn Zheng