From edb074f4385cd6f3161750c67f1fb9b2407733d5 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 16 Mar 2026 14:40:16 -0700 Subject: [PATCH 1/2] spa: aec: Fix log topic name --- spa/plugins/aec/aec-webrtc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/aec/aec-webrtc.cpp b/spa/plugins/aec/aec-webrtc.cpp index 7b8cafcde..08697288b 100644 --- a/spa/plugins/aec/aec-webrtc.cpp +++ b/spa/plugins/aec/aec-webrtc.cpp @@ -39,7 +39,7 @@ struct impl_data { std::unique_ptr play_buffer, rec_buffer, out_buffer; }; -SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.eac.webrtc"); +SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.aec.webrtc"); #undef SPA_LOG_TOPIC_DEFAULT #define SPA_LOG_TOPIC_DEFAULT &log_topic From 36740e010029da084640250d09e352f829665585 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 16 Mar 2026 14:43:04 -0700 Subject: [PATCH 2/2] spa: aec: Add some channel config validation This is checked in AudioProcessing, but will fail at processing time rather than in initialisation. --- spa/plugins/aec/aec-webrtc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spa/plugins/aec/aec-webrtc.cpp b/spa/plugins/aec/aec-webrtc.cpp index 08697288b..2e451d851 100644 --- a/spa/plugins/aec/aec-webrtc.cpp +++ b/spa/plugins/aec/aec-webrtc.cpp @@ -221,6 +221,11 @@ static int webrtc_init2(void *object, const struct spa_dict *args, }}; #endif + if (out_info->channels != 1 && rec_info->channels != out_info->channels) { + spa_log_error(impl->log, "Source channels must be equal to capture channels or 1"); + return -EINVAL; + } + #if defined(HAVE_WEBRTC) auto apm = std::unique_ptr(webrtc::AudioProcessing::Create(config)); #elif defined(HAVE_WEBRTC1)