[RTNR] Fix buffer size calculation

The correct frame length should be calculated by
FRAME_LEN = SAMPLING_RATE * PERIODS / 1000000

The macro COMP_PERIOD_FRAMES does the thing.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
This commit is contained in:
Ming Jen Tai 2022-03-15 10:22:29 +08:00 committed by Liam Girdwood
parent 3e6fd30aa6
commit a5fd52ec43
2 changed files with 4 additions and 4 deletions

View File

@ -60,11 +60,11 @@ W_RTNR(0, PIPELINE_FORMAT, 2, DAI_PERIODS, DMIC_PIPELINE_16k_CORE_ID, LIST(` ',
# Capture Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(4,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,
eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
W_BUFFER(1, COMP_BUFFER_SIZE(4,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,
eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
P_GRAPH(pipe-rtnr-capture-PIPELINE_ID, PIPELINE_ID,
LIST(` ',

View File

@ -60,11 +60,11 @@ W_RTNR(0, PIPELINE_FORMAT, 2, DAI_PERIODS, SCHEDULE_CORE, LIST(` ', "DEF_RTNR_B
# Capture Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(4,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,
eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
W_BUFFER(1, COMP_BUFFER_SIZE(4,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS,
eval(PCM_MAX_RATE / SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), PLATFORM_PASS_MEM_CAP)
P_GRAPH(pipe-rtnr-capture-PIPELINE_ID, PIPELINE_ID,
LIST(` ',