From 1b81841a0b7882b6d3c00bad56cf8ac7a4e7cf63 Mon Sep 17 00:00:00 2001 From: Fabiola Kwasowiec Date: Thu, 16 Nov 2023 11:14:53 +0100 Subject: [PATCH] peakvol: set the correct vol_min and vol_max values The current values result in incorrect signal amplitudes at the peakvol module output. Signed-off-by: Fabiola Kwasowiec --- src/audio/volume/volume_ipc4.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/audio/volume/volume_ipc4.c b/src/audio/volume/volume_ipc4.c index f5826501f256..9a9951169ce3 100644 --- a/src/audio/volume/volume_ipc4.c +++ b/src/audio/volume/volume_ipc4.c @@ -94,16 +94,8 @@ static void init_ramp(struct vol_data *cd, uint32_t curve_duration, uint32_t tar Q_CONVERT_FLOAT(1.0 / 10000, 31), 0, 31, 0); } - if (!cd->initial_ramp) { - /* In case when initial ramp time is equal to zero, vol_min and - * vol_max variables should be set to target_volume value - */ - cd->vol_min = target_volume; - cd->vol_max = target_volume; - } else { - cd->vol_min = VOL_MIN; - cd->vol_max = VOL_MAX; - } + cd->vol_min = VOL_MIN; + cd->vol_max = VOL_MAX; cd->copy_gain = true; }