Skip to content

Commit

Permalink
peakvol: set the correct vol_min and vol_max values
Browse files Browse the repository at this point in the history
The current values result in incorrect signal
amplitudes at the peakvol module output.

Signed-off-by: Fabiola Kwasowiec <[email protected]>
  • Loading branch information
fkwasowi authored and kv2019i committed Nov 20, 2023
1 parent 7737efa commit 1b81841
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/audio/volume/volume_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1b81841

Please sign in to comment.