audio: volume: add config for peak volume

Add config to control peak volume code need build or not.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This commit is contained in:
Baofeng Tian 2023-09-14 16:09:34 +08:00 committed by Kai Vehmanen
parent 8fc405d119
commit 19c26ea9f4
1 changed files with 3 additions and 2 deletions

View File

@ -332,7 +332,7 @@ static inline void volume_ramp(struct processing_module *mod)
} }
cd->volume[i] = new_vol; 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++) for (i = cd->ramp_channel_counter; i < cd->channels; i++)
cd->volume[i] = cd->volume[0]; cd->volume[i] = cd->volume[0];
@ -557,8 +557,9 @@ static int volume_process(struct processing_module *mod,
comp_dbg(mod->dev, "volume_process()"); comp_dbg(mod->dev, "volume_process()");
while (avail_frames) { while (avail_frames) {
#if CONFIG_COMP_PEAK_VOL
volume_update_current_vol_ipc4(cd); volume_update_current_vol_ipc4(cd);
#endif
if (cd->ramp_finished || cd->vol_ramp_frames > avail_frames) { if (cd->ramp_finished || cd->vol_ramp_frames > avail_frames) {
/* without ramping process all at once */ /* without ramping process all at once */
frames = avail_frames; frames = avail_frames;