Skip to content

Commit

Permalink
audio: volume: add config for peak volume
Browse files Browse the repository at this point in the history
Add config to control peak volume code need build or not.

Signed-off-by: Baofeng Tian <[email protected]>
  • Loading branch information
btian1 committed Oct 13, 2023
1 parent ba03358 commit 3050f29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/audio/volume/volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static inline void volume_ramp(struct processing_module *mod)
}
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];

Expand Down Expand Up @@ -557,8 +557,9 @@ static int volume_process(struct processing_module *mod,
comp_dbg(mod->dev, "volume_process()");

while (avail_frames) {
#if CONFIG_COMP_PEAK_VOL
volume_update_current_vol_ipc4(cd);

#endif
if (cd->ramp_finished || cd->vol_ramp_frames > avail_frames) {
/* without ramping process all at once */
frames = avail_frames;
Expand Down

0 comments on commit 3050f29

Please sign in to comment.