From 5aa7c35267ea7c48f7e43df8b466fde6de040cc3 Mon Sep 17 00:00:00 2001 From: Baofeng Tian Date: Mon, 30 Oct 2023 15:03:08 +0800 Subject: [PATCH] Topology2: fix obs size for src converter from 48k From 48k input, the obs for 11025/22050/44100/88200/176400 setting need take care, previous implementation left 5 words redundancy for output, this change removed redundancy, since actual output buffer size always use double obs size. Signed-off-by: Baofeng Tian --- .../include/components/src_format_s32_convert_from_48k.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology2/include/components/src_format_s32_convert_from_48k.conf b/tools/topology/topology2/include/components/src_format_s32_convert_from_48k.conf index a1b25d5fbc5b..5cd13dae1492 100644 --- a/tools/topology/topology2/include/components/src_format_s32_convert_from_48k.conf +++ b/tools/topology/topology2/include/components/src_format_s32_convert_from_48k.conf @@ -27,7 +27,8 @@ ] out_bit_depth [ 32 ] out_valid_bit_depth [ 32 ] - obs "$[($out_channels * (($[($out_rate + 999)] / 1000) + 4)) * ($out_bit_depth / 8)]" + # actual buffer size in sof is obs * 2, so here simply set to its period size + obs "$[$out_channels * ($out_bit_depth / 8) * (($out_rate / 1000)) * ($period / 1000)]" } ]