English
Language : 

SGTL5000XNAA3 Datasheet, PDF (51/84 Pages) Freescale Semiconductor, Inc – Low Power Stereo Codec with Headphone Amp
DATASHEET
SGTL5000
GEQ volume should be ramped in 0.5 dB steps in order to avoid any pops. The
example assumes that volume is ramped on Band 0. Other bands can be pro-
grammed similiarly.
// Read current volume set on Band 0
usCurrentVol = Read DAP_AUDIO_EQ_BASS_BAND0
// Convert the new volume to hex value
usNewVol = 4*dNewVolDb + 47;
// Calculate the number of steps
usNumSteps = abs(usNewVol - usCurrentVol);
if (usNumSteps == 0) return;
for (int i = 0; i++; usNumSteps )
{
if (usNewVol > usCurrentVol)
++usCurrentVol;
else
--usCurrentVol;
Write DAP_AUDIO_EQ_BASS_BAND0 usCurrentVol;
}
6.3.4.
Tone Control - Bass and Treble Change
This programming example shows how to program the Tone Control Bass and Tre-
ble when end-user changes it on the fly.
Tone Control Bass and Treble volume should be ramped in 0.5 dB steps in order to
avoid any pops. The example assumes that Treble is changed to a new value.
Bass can be programmed similarly.
// Read current Treble value
usCurrentVal = Read DAP_AUDIO_EQ_TREBLE_BAND4
// Convert the new Treble value to hex value
usNewVal = 4*dNewValDb + 47;
// Calculate the number of steps
usNumSteps = abs(usNewVal - usCurrentVal);
if (usNumSteps == 0) return;
for (int i = 0; i++; usNumSteps )
{
if (usNewVal > usCurrentVal)
++usCurrentVal;
else
--usCurrentVal;
Write DAP_AUDIO_EQ_TREBLE_BAND4 usCurrentVal;
}
6.3.5.
SigmaTel Surround On/Off
This programming example shows how to program the Surround when end-user
turns it on/off on his device.
The Surround width should be ramped up to highest value before enabling/disabling
the Surround to avoid any pops.
SGTL5000 EA2 DS-0-3
51