From a9fc0c38006964860ab9fab46da5a1329a21a73a Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 18 Jan 2024 04:48:50 -0800 Subject: [PATCH] google_rtc_audio_processing: Specify main buffer size in kb Cleaner API. Also avoids the need to specify cache line padding at the end. Signed-off-by: Andy Ross --- src/audio/google/Kconfig | 4 ++-- src/audio/google/google_rtc_audio_processing.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio/google/Kconfig b/src/audio/google/Kconfig index ac323716a7f8..26f65506959e 100644 --- a/src/audio/google/Kconfig +++ b/src/audio/google/Kconfig @@ -43,10 +43,10 @@ config COMP_GOOGLE_RTC_AUDIO_PROCESSING_CHANNEL_MAX retrieved at runtime, but channels higher than this number are ignored (on input) or cleared (output). -config COMP_GOOGLE_RTC_AUDIO_PROCESSING_MEMORY_BUFFER_SIZE_BYTES +config COMP_GOOGLE_RTC_AUDIO_PROCESSING_MEMORY_BUFFER_SIZE_KB depends on COMP_GOOGLE_RTC_AUDIO_PROCESSING int "Memory buffer size for Google Real Time Communication Audio processing" - default 200000 + default 200 help Sets the size of the memory buffer for the Google real-time communication audio processing. diff --git a/src/audio/google/google_rtc_audio_processing.c b/src/audio/google/google_rtc_audio_processing.c index 0e304e55fba1..58d11439c76b 100644 --- a/src/audio/google/google_rtc_audio_processing.c +++ b/src/audio/google/google_rtc_audio_processing.c @@ -65,7 +65,7 @@ DECLARE_TR_CTX(google_rtc_audio_processing_tr, SOF_UUID(google_rtc_audio_process #endif static __aligned(PLATFORM_DCACHE_ALIGN) -uint8_t aec_mem_blob[CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING_MEMORY_BUFFER_SIZE_BYTES]; +uint8_t aec_mem_blob[CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING_MEMORY_BUFFER_SIZE_KB * 1024]; #define NUM_FRAMES (CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING_SAMPLE_RATE_HZ \ / GOOGLE_RTC_AUDIO_PROCESSING_FREQENCY_TO_PERIOD_FRAMES)