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 <fabiola.kwasowiec@intel.com>
This commit is contained in:
Fabiola Kwasowiec 2023-11-16 11:14:53 +01:00 committed by Kai Vehmanen
parent 7737efadf4
commit 1b81841a0b
1 changed files with 2 additions and 10 deletions

View File

@ -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); Q_CONVERT_FLOAT(1.0 / 10000, 31), 0, 31, 0);
} }
if (!cd->initial_ramp) { cd->vol_min = VOL_MIN;
/* In case when initial ramp time is equal to zero, vol_min and cd->vol_max = VOL_MAX;
* 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->copy_gain = true; cd->copy_gain = true;
} }