diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index 7c888212c0f3..5bd7c851a5ec 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -322,19 +322,25 @@ static inline void volume_ramp(struct processing_module *mod) if (volume < tvolume) { /* ramp up, check if ramp completed */ - if (new_vol < tvolume) + if (new_vol < tvolume) { cd->ramp_finished = false; - else + } else { new_vol = tvolume; + cd->ramp_coef[i] = 0; + } + } else { /* ramp down */ - if (new_vol > tvolume) + if (new_vol > tvolume) { cd->ramp_finished = false; - else + } else { new_vol = tvolume; + cd->ramp_coef[i] = 0; + } } cd->volume[i] = new_vol; } + /* assign other channel volume as the first calculated volume with same volume case */ for (i = cd->ramp_channel_counter; i < cd->channels; i++) cd->volume[i] = cd->volume[0];