Figure 30. soft ramp behavior, Cs4244 – Cirrus Logic CS4244 User Manual

Page 40

Advertising
background image

DS900F1

40

CS4244

noise is avoided. In this mode the soft ramp algorithm linearly interpolates the volume between the volume
changes. There is a lag of one volume change sample since two samples are required to calculate the
first ramp rate.

See

Figure 30

for the soft ramp diagram. On the first volume sample received, the CS4244 only detects

the possible beginning of a volume envelope sequence and resets an envelope counter. The volume
starts ramping to the new volume setting at a constant rate controlled by the

MUTE DELAY[1:0]

setting.

If the envelope counter times out before a new volume sample is received, the next received sample is
treated in the same way as the previous sample and the ramp rate is kept constant. In this way, as long
as the volume samples are distant from each other by more than the envelope counter time out, the rate
is kept constant resulting in the soft-ramp behavior described in the button-press example.

However if the next volume sample is received before the envelope counter times out, then it is assumed
to be part of a volume envelope sequence. The envelope counter is reset and as long as new samples
are received in succession before a time out occurs, the sequence is continued. Starting at the second
volume sample of an envelope sequence, the ramp rate is adjusted using the equation shown in

Figure 30

.

Two control parameters allow the user to limit the ramp-rate range to achieve optimum effect. The

MIN

DELAY[2:0]

setting limits the maximum ramp rate; higher values will introduce more lag in the envelope

tracking while providing a smoother ramp. The

MAX DELAY[2:0]

setting limits the minimum ramp rate;

lower values will permit closer tracking of the envelope but may re-introduce zipper noise. The default val-
ues of these registers are recommended as a starting point. It is possible to disable the volume envelope

USER: Change

Volume or Mute

Register

Wait State

Envelope Counter

Running

Envelope

Counter

Timed Out?

Yes

No

Reset Envelope

Counter

Limit Ramp Rate

Reset Envelope

Counter

Ramp Rate =

MUTE_DELAY

Changes

Volume

Between

Time

Setting

Volume

Current

-

Setting

Volume

New

Rate

Ramp

MIN_DELAY

MAX_DELAY

Figure 30. Soft Ramp Behavior

Advertising