Difference between revisions of "IP audio Gain adjustment"
From Zenitel Wiki
m (1 revision imported) |
|
(No difference)
|
Latest revision as of 13:46, 5 February 2018
(New from DSP SW 01.11 / AMCD 10.31)
Audio levels and gain on AlphaCom IP audio connections may be changed from AlphaPro. Defaults has been set, so that normal usage should work without any changes.
Contents
Background
Normal audio is encoded in AlphaCom internal digital audio format (SigmaDelta) with a fairly low level, compared to the max theoretical amplitude of the audio format. A headroom of factor 10 = 20dB is common.
For IP audio connections between AlphaComs, the SigmaDelta audio is converted to a standard format like G.722 or G.711. The gain is 1 = 0dB, in the sense that max SigmaDelta amplitude corresponds to max amplitude on the external format. The audio level on these connection will therefore be quite low.
In the telecom world, the standard audio level is much higher, headroom as small as 3dB is normal. Therefore AlphaCom audio needs to be amplified when sent to external SIP equipment.
Gain adjustment and limiter
The default behaviour is now:
- Inter-AlphaCom and to IP stations: 0dB gain in and out (ie low audio level)
- Towards SIP: +9dB gain out towards SIP, -6db reduction for incomming audio.
Also there is a limiter function. The limiter reduces the effective gain automatically if the signal after gain amplifier exceeds the limit for the connection.
The default limit is 0dB for both directions. (Was -3dB for outgoing audio, and -9db for audio incomming to backplane for versions 10.31 - 10.45, see BZ 18).
If this works fine, no need to read further.
Values: 0 (zero) means use default values as described above. Non-zero value: the specified value is used for the matching connections.
Gain can be set from -30dB to +30dB.
Limit can be set from 3 to 36dB.
Implementation notes
DSP/RTPd interface
Gain and limit are attributes to the 20xx and 21xx codec resources. The values are added as extra parameters to the "co2" and "con" messages. Examples for a SIP connection:
co2 0100 2000 g711u 3 0 co2 3000 2100 g711u FFFE 0
Limiter principles
For each sample, for every channel, the sample is scaled with the current gain. After scaling, two statistics are collected
- max amplitude (absolute value)
- count number of samples (absolute value) above the limit (clip-count)
Then a gain control job runs every 16 ms:
- if more than one sample above the target limit in last period, reduce gain by 25% = -2.5dB. (This will happen every 16 ms until signal is within limit.)
- otherwise, if gain is reduced, consider to increase gain:
- Max amplitude must be less than 7/8 of limit for at least 3 seconds (stability timer) before starting to increase gain.
- When increasing gain, the gain is raised by 4.5dB per second.
- Current gain is never allowed to become larger than the target-gain.
- When the signal (max-amplitude) has very low value, the 3 second stability timer is frozen (not reset). The assumption is that there is a speech pause. We do not want to increase the gain between every talk spurt of a conversation, only to reduce it again at the next sentence.
- reset max amplitude and clip-count variables