TLV320AIC3204: Consistent Sound Pressure Levels with TLV320AIC3204 During MP3 Playback and Announcements

Part Number: TLV320AIC3204

Tool/software:

I am currently working on a project that involves the TLV320AIC3204 audio codec to play MP3 files and audio announcements through speakers. My requirement is to maintain consistent sound pressure levels across all audio outputs, regardless of the mp3 files inherent volume variations. Can Anyone suggest how to implement this ?

1. Here When I Measure Sound Pressure Level in DB at the speaker, I need to get constant Sound Pressure level.

Thanks in Advance.

  • Hi,

    It sounds like you could benefit from dynamic range compression (DRC), which is a feature on the DAC side of this codec. The codec monitors the DAC output, and if the signal goes above a set threshold it can adjust the volume to reach the threshold again, and if it exceeds the threshold it will be reduced. You can read more about it in section 2.4.4.3 of the application reference guide: https://www.ti.com/lit/ml/slaa557/slaa557.pdf

    Let me know if you have questions.

    Best,
    Mir

  • Thank you Mir,

    Can You Explain with a small example. How to configure DRC in DAC Section of the codec.

  • Hi,

    Let's say you want your signal to stay at around -9dBFS, and the signal normally fluctuates between -3dBFS and -15dBFS. You can set the DRC threshold value to -9dBFS and DRC hysteresis to 3dB, so if the signal starts below -12dB and the DRC is off, it will turn on when the signal peaks above -6dBFS and ramp down the volume to reach the desired -9dBFS. Then, the signal will stay around -9dBFS when the signal is between -6dBFS and -12dBFS, but when it goes below -12dBFS, it will increase the volume to reach the desired levels. The change in digital volume due to the DRC has a recommended default value of 1.9e-4dB per sample of the attack rate (attenuation) and 2.4e-5dB per sample for the decay rate (when the gain is increased).


    w 30 00 00 #Go to Page 0
    w 30 41 00 #0 db digital volume Left DAC (can be changed for the baseline output)
    w 30 42 00 #0 db digital volume Right DAC
    w 30 44 6b #DAC => DRC Enabled for both channels, Threshold = -9 db, Hysteresis = 3 dB
    w 30 45 00 #DRC Hold = 0 ms
    w 30 46 b6 #Attack Rate = 1.9531e-4 dB/Frame, DRC Decay Rate =2.4414e-5 dB/Frame

    Let me know if you have more questions.

    Best,
    Mir