From e9442e04c67eb9227f54d0768ee5a464d0dc4d9e Mon Sep 17 00:00:00 2001 From: CY Kuei Date: Fri, 10 Jun 2022 17:39:21 +0800 Subject: [PATCH] module_adpater: change the buffer size of waves_codec Change the buffer size of waves_codec from 2ms to SCHEDULE_PERIOD Signed-off-by: CY Kuei --- src/audio/module_adapter/module/waves.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/module_adapter/module/waves.c b/src/audio/module_adapter/module/waves.c index 46d504ce8..991834f7f 100644 --- a/src/audio/module_adapter/module/waves.c +++ b/src/audio/module_adapter/module/waves.c @@ -342,8 +342,8 @@ static int waves_effect_init(struct processing_module *mod) waves_codec->o_format = waves_codec->i_format; waves_codec->sample_size_in_bytes = sample_bytes; - waves_codec->buffer_samples = (src_fmt->rate * 2) / 1000; /* 2 ms io buffers */ - waves_codec->buffer_bytes = waves_codec->buffer_samples * src_fmt->channels * + waves_codec->buffer_bytes = mod->period_bytes; + waves_codec->buffer_samples = waves_codec->buffer_bytes / src_fmt->channels / waves_codec->sample_size_in_bytes; // trace allows printing only up-to 4 words at a time