audio: volume: Fix compilation error when COMP_PEAK_VOL is not selected

CONFIG_PEAK_METER_UPDATE_PERIOD depends on CONFIG_COMP_PEAK_VOL

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2023-08-12 18:59:21 -07:00 committed by Daniel Baluta
parent 5674c31c8f
commit 6bb1ed4b01
1 changed files with 2 additions and 1 deletions

View File

@ -1294,10 +1294,11 @@ static int volume_prepare(struct processing_module *mod,
#if CONFIG_IPC_MAJOR_4
cd->peak_cnt = 0;
#if CONFIG_COMP_PEAK_VOL
cd->peak_report_cnt = CONFIG_PEAK_METER_UPDATE_PERIOD * 1000 / mod->dev->period;
if (cd->peak_report_cnt == 0)
cd->peak_report_cnt = 1;
#endif
ret = volume_params(mod);
if (ret < 0)
return ret;