From c39ebaf8f78dd14fd4af482cd446d84b2cfaa630 Mon Sep 17 00:00:00 2001 From: Eddy Hsu Date: Thu, 13 Aug 2026 16:40:34 +0000 Subject: [PATCH 1/4] dax: make instance lifecycle operations safe and idempotent Ensure destroy_instance, establish_instance, dax_register_user, and dax_unregister_user return 0 when an instance is already in the requested state, preventing spurious errors during pipeline stop, reset, and prepare re-entries. Signed-off-by: Eddy Hsu --- .../module/dolby/dax_instance_manager.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/audio/module_adapter/module/dolby/dax_instance_manager.c b/src/audio/module_adapter/module/dolby/dax_instance_manager.c index 36ef4f052757..2bce3ea7bf1e 100644 --- a/src/audio/module_adapter/module/dolby/dax_instance_manager.c +++ b/src/audio/module_adapter/module/dolby/dax_instance_manager.c @@ -75,10 +75,14 @@ static void update_alloc_state_l(struct processing_module *mod) static int destroy_instance(struct processing_module *mod) { struct dax_adapter_data *adapter_data = module_get_private_data(mod); - struct sof_dax *dax_ctx = &adapter_data->dax_ctx; + struct sof_dax *dax_ctx; + + if (!adapter_data) + return 0; + dax_ctx = &adapter_data->dax_ctx; if (!dax_ctx->p_dax) - return -EFAULT; + return 0; /* free internal dax instance data and set dax_ctx->p_dax to NULL */ dax_free(dax_ctx); @@ -99,7 +103,7 @@ static int establish_instance(struct processing_module *mod) uint32_t scratch_sz; if (dax_ctx->p_dax && dax_ctx->persist_buffer.addr && dax_ctx->scratch_buffer.addr) - return -EEXIST; + return 0; if (dax_ctx->persist_buffer.addr || dax_ctx->scratch_buffer.addr) destroy_instance(mod); @@ -188,7 +192,7 @@ int dax_register_user(struct processing_module *mod) if (inst_mgr.users[i].id == adapter_data->comp_id) { k_spin_unlock(&inst_mgr.lock, key); - return -EEXIST; + return 0; } } @@ -238,7 +242,7 @@ int dax_unregister_user(struct processing_module *mod) if (!user) { k_spin_unlock(&inst_mgr.lock, key); - return -EINVAL; + return 0; } k_spin_unlock(&inst_mgr.lock, key); From 2c132a4e88834fa0b61956251d726ffdc2b3e052 Mon Sep 17 00:00:00 2001 From: Eddy Hsu Date: Thu, 13 Aug 2026 16:40:38 +0000 Subject: [PATCH 2/4] audio: ctc: add Google CTC audio processing component wrapper Integrate Google Crosstalk Cancellation (CTC) audio processing component into SOF audio processing pipeline. Key improvements: - Add Google CTC wrapper in src/audio/google/ with support for S16, S24, and S32 audio stream processing and runtime configuration blobs. - Add safe float-to-integer conversion functions with clamping and NaN guards to prevent hardware FPU integer overflow exceptions. - Add circular buffer handling and pending sample tracking across audio periods. - Update module adapter IPC4 payload sizing handler to support small CTC configuration blobs. - Enable Google CTC in PTL dts and dax overlays with appropriate stack and heap sizing. Signed-off-by: Eddy Hsu --- app/overlays/ptl/dax_overlay.conf | 13 +- app/overlays/ptl/dts_overlay.conf | 3 + src/audio/google/CMakeLists.txt | 10 +- .../google/google_ctc_audio_processing.c | 280 ++++++++++++------ .../google/google_ctc_audio_processing.h | 1 + .../module_adapter/module_adapter_ipc4.c | 10 +- 6 files changed, 209 insertions(+), 108 deletions(-) diff --git a/app/overlays/ptl/dax_overlay.conf b/app/overlays/ptl/dax_overlay.conf index 7dcdf749dbe1..b6e9d5576e9b 100644 --- a/app/overlays/ptl/dax_overlay.conf +++ b/app/overlays/ptl/dax_overlay.conf @@ -1,12 +1,19 @@ CONFIG_COMP_MODULE_ADAPTER=y CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING=y CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK=n +CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING=y +CONFIG_COMP_STFT_PROCESS=n +CONFIG_COMP_TEMPLATE=n +CONFIG_COMP_KPB=n +CONFIG_MINIMAL_LIBC=n +CONFIG_PICOLIBC=y CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n -CONFIG_SOF_STACK_SIZE=8192 -CONFIG_IDC_TIMEOUT_US=50000 +CONFIG_SOF_STACK_SIZE=16384 +CONFIG_HEAP_MEM_POOL_SIZE=65536 +CONFIG_ADSP_IMR_CONTEXT_SAVE=y # LLEXT -CONFIG_LLEXT_HEAP_SIZE=32 +CONFIG_LLEXT_HEAP_SIZE=64 # Log settings CONFIG_LOG_BUFFER_SIZE=8192 diff --git a/app/overlays/ptl/dts_overlay.conf b/app/overlays/ptl/dts_overlay.conf index 793559ad5de7..00c0dc49250a 100644 --- a/app/overlays/ptl/dts_overlay.conf +++ b/app/overlays/ptl/dts_overlay.conf @@ -1,6 +1,9 @@ CONFIG_COMP_IIR=m CONFIG_COMP_MODULE_ADAPTER=y CONFIG_DTS_CODEC=y +CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING=y +CONFIG_MINIMAL_LIBC=n +CONFIG_PICOLIBC=y CONFIG_LLEXT_HEAP_SIZE=64 CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n CONFIG_SOF_STACK_SIZE=8192 diff --git a/src/audio/google/CMakeLists.txt b/src/audio/google/CMakeLists.txt index fa55c9f39a2e..b37db1bf58e4 100644 --- a/src/audio/google/CMakeLists.txt +++ b/src/audio/google/CMakeLists.txt @@ -3,7 +3,7 @@ is_zephyr(zephyr) if(zephyr) ### Zephyr ### - set(THIRD_PARTY ${SOF_ROOT_SOURCE_DIRECTORY}/third_party) + set(THIRD_PARTY ${sof_top_dir}/third_party) if(CONFIG_IPC_MAJOR_3) set(ipc_suffix ipc3) elseif(CONFIG_IPC_MAJOR_4) @@ -29,8 +29,8 @@ if(zephyr) ### Zephyr ### zephyr_include_directories(${THIRD_PARTY}/include) target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib) target_link_libraries(SOF INTERFACE google_rtc_audio_processing) - target_link_libraries(SOF INTERFACE c++) - target_link_libraries(SOF INTERFACE c++abi) + target_link_libraries(SOF INTERFACE stdc++) + target_link_libraries(SOF INTERFACE supc++) target_link_libraries(SOF INTERFACE m) target_link_libraries(SOF INTERFACE c) target_link_libraries(SOF INTERFACE gcc) @@ -54,8 +54,8 @@ if(zephyr) ### Zephyr ### zephyr_include_directories(${THIRD_PARTY}/include) target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib) target_link_libraries(SOF INTERFACE google_ctc_audio_processing) - target_link_libraries(SOF INTERFACE c++) - target_link_libraries(SOF INTERFACE c++abi) + target_link_libraries(SOF INTERFACE stdc++) + target_link_libraries(SOF INTERFACE supc++) target_link_libraries(SOF INTERFACE m) target_link_libraries(SOF INTERFACE c) target_link_libraries(SOF INTERFACE gcc) diff --git a/src/audio/google/google_ctc_audio_processing.c b/src/audio/google/google_ctc_audio_processing.c index 0ee37abd24d5..330b58d35e8b 100644 --- a/src/audio/google/google_ctc_audio_processing.c +++ b/src/audio/google/google_ctc_audio_processing.c @@ -22,42 +22,69 @@ LOG_MODULE_REGISTER(google_ctc_audio_processing, CONFIG_SOF_LOG_LEVEL); SOF_DEFINE_REG_UUID(google_ctc_audio_processing); -// TODO(eddyhsu): Share these utils function with RTC. -static inline float clamp_rescale(float max_val, float x) -{ - float min = -1.0f; - float max = 1.0f - 1.0f / max_val; - - return max_val * (x < min ? min : (x > max ? max : x)); -} - +/** + * \brief Converts a float sample to signed 16-bit integer with clamping and NaN guard. + * \param[in] data Float sample in range [-1.0, 1.0]. + * \return Signed 16-bit integer sample. + */ static inline int16_t convert_float_to_int16(float data) { - return (int16_t)clamp_rescale(-(float)SHRT_MIN, data); + if (data >= 0.9999f) + return SHRT_MAX; + if (data <= -0.9999f) + return SHRT_MIN; + if (data != data) + return 0; + return (int16_t)(data * 32767.0f); } +/** + * \brief Converts a signed 16-bit integer sample to float. + * \param[in] data Signed 16-bit integer sample. + * \return Float sample in range [-1.0, 1.0]. + */ static inline float convert_int16_to_float(int16_t data) { - float scale = -(float)SHRT_MIN; - - return (1.0f / scale) * data; + return (float)data * (1.0f / 32768.0f); } +/** + * \brief Converts a float sample to signed 32-bit integer with clamping and NaN guard. + * \param[in] data Float sample in range [-1.0, 1.0]. + * \return Signed 32-bit integer sample. + */ static inline int32_t convert_float_to_int32(float data) { - return (int32_t)clamp_rescale(-(float)INT_MIN, data); + if (data >= 0.999999f) + return INT_MAX; + if (data <= -0.999999f) + return INT_MIN; + if (data != data) + return 0; + return (int32_t)(data * 2147483647.0f); } +/** + * \brief Converts a signed 32-bit integer sample to float. + * \param[in] data Signed 32-bit integer sample. + * \return Float sample in range [-1.0, 1.0]. + */ static inline float convert_int32_to_float(int32_t data) { - float scale = -(float)INT_MIN; - - return (1.0f / scale) * data; + return (float)data * (1.0f / 2147483648.0f); } static const int kChunkFrames = 48; static const int kMaxChannels = 2; +/** + * \brief Passthrough fallback when CTC processing is disabled. + * \param[in] source Audio source stream. + * \param[in,out] sink Audio sink stream. + * \param[in,out] input_buffers Input stream buffers. + * \param[in,out] output_buffers Output stream buffers. + * \param[in] frames Number of audio frames to copy. + */ static void ctc_passthrough(const struct audio_stream *source, struct audio_stream *sink, struct input_stream_buffer *input_buffers, @@ -82,47 +109,60 @@ static void ctc_s16_default(struct google_ctc_audio_processing_comp_data *cd, int n_ch = audio_stream_get_channels(source); int samples = frames * n_ch; - int16_t *src = audio_stream_get_rptr(source); - int16_t *dest = audio_stream_get_wptr(sink); - - int samples_to_process = MIN(samples, audio_stream_samples_without_wrap_s16(source, src)); - int samples_to_written = MIN(samples, audio_stream_samples_without_wrap_s16(sink, dest)); - int written_samples = 0; - if (!cd->enabled) { ctc_passthrough(source, sink, input_buffers, output_buffers, frames); return; } - // writes previous processed samples to the output. + int16_t *src = audio_stream_get_rptr(source); + int16_t *dest = audio_stream_get_wptr(sink); + int free_samples = audio_stream_get_free_samples(sink); + int total_consumed = 0; + int total_produced = 0; + + /* 1. Drain any leftover outputs produced in prior passes */ while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int16(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s16(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int16(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } - for (int i = 0; i < samples_to_process; ++i) { - cd->input[cd->input_samples++] = convert_int16_to_float(src[i]); + + /* 2. Process new input blocks only if we have room and no pending outputs */ + while (cd->next_avail_output_samples == cd->chunk_frames * n_ch && + total_consumed < samples) { + int needed = cd->chunk_frames * n_ch - cd->input_samples; + int to_read = MIN(samples - total_consumed, needed); + to_read = MIN(to_read, audio_stream_samples_without_wrap_s16(source, src)); + for (int i = 0; i < to_read; i++) + cd->input[cd->input_samples++] = convert_int16_to_float(src[i]); + src = audio_stream_wrap(source, src + to_read); + total_consumed += to_read; + if (cd->input_samples == cd->chunk_frames * n_ch) { GoogleCtcAudioProcessingProcess(cd->state, cd->input, cd->output, cd->chunk_frames, n_ch); cd->input_samples = 0; cd->next_avail_output_samples = 0; - // writes processed samples to the output. while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int16(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s16(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int16(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } } } - if (written_samples > 0) { - dest = audio_stream_wrap(sink, dest + written_samples); - output_buffers->size += audio_stream_frame_bytes(sink) * written_samples / n_ch; - } - src = audio_stream_wrap(source, src + samples_to_process); - input_buffers->consumed += audio_stream_frame_bytes(source) * samples_to_process / n_ch; + + input_buffers->consumed = audio_stream_frame_bytes(source) * total_consumed / n_ch; + output_buffers->size = audio_stream_frame_bytes(sink) * total_produced / n_ch; } #endif @@ -137,47 +177,60 @@ static void ctc_s24_default(struct google_ctc_audio_processing_comp_data *cd, int n_ch = audio_stream_get_channels(source); int samples = frames * n_ch; - int32_t *src = audio_stream_get_rptr(source); - int32_t *dest = audio_stream_get_wptr(sink); - - int samples_to_process = MIN(samples, audio_stream_samples_without_wrap_s24(source, src)); - int samples_to_written = MIN(samples, audio_stream_samples_without_wrap_s24(sink, dest)); - int written_samples = 0; - if (!cd->enabled) { ctc_passthrough(source, sink, input_buffers, output_buffers, frames); return; } - // writes previous processed samples to the output. + int32_t *src = audio_stream_get_rptr(source); + int32_t *dest = audio_stream_get_wptr(sink); + int free_samples = audio_stream_get_free_samples(sink); + int total_consumed = 0; + int total_produced = 0; + + /* 1. Drain any leftover outputs produced in prior passes */ while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int32(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s24(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int32(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } - for (int i = 0; i < samples_to_process; ++i) { - cd->input[cd->input_samples++] = convert_int32_to_float(src[i]); + + /* 2. Process new input blocks only if we have room and no pending outputs */ + while (cd->next_avail_output_samples == cd->chunk_frames * n_ch && + total_consumed < samples) { + int needed = cd->chunk_frames * n_ch - cd->input_samples; + int to_read = MIN(samples - total_consumed, needed); + to_read = MIN(to_read, audio_stream_samples_without_wrap_s24(source, src)); + for (int i = 0; i < to_read; i++) + cd->input[cd->input_samples++] = convert_int32_to_float(src[i]); + src = audio_stream_wrap(source, src + to_read); + total_consumed += to_read; + if (cd->input_samples == cd->chunk_frames * n_ch) { GoogleCtcAudioProcessingProcess(cd->state, cd->input, cd->output, cd->chunk_frames, n_ch); cd->input_samples = 0; cd->next_avail_output_samples = 0; - // writes processed samples to the output. while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int32(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s24(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int32(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } } } - if (written_samples > 0) { - dest = audio_stream_wrap(sink, dest + written_samples); - output_buffers->size += audio_stream_frame_bytes(sink) * written_samples / n_ch; - } - src = audio_stream_wrap(source, src + samples_to_process); - input_buffers->consumed += audio_stream_frame_bytes(source) * samples_to_process / n_ch; + + input_buffers->consumed = audio_stream_frame_bytes(source) * total_consumed / n_ch; + output_buffers->size = audio_stream_frame_bytes(sink) * total_produced / n_ch; } #endif @@ -192,47 +245,60 @@ static void ctc_s32_default(struct google_ctc_audio_processing_comp_data *cd, int n_ch = audio_stream_get_channels(source); int samples = frames * n_ch; - int32_t *src = audio_stream_get_rptr(source); - int32_t *dest = audio_stream_get_wptr(sink); - - int samples_to_process = MIN(samples, audio_stream_samples_without_wrap_s32(source, src)); - int samples_to_written = MIN(samples, audio_stream_samples_without_wrap_s32(sink, dest)); - int written_samples = 0; - if (!cd->enabled) { ctc_passthrough(source, sink, input_buffers, output_buffers, frames); return; } - // writes previous processed samples to the output. + int32_t *src = audio_stream_get_rptr(source); + int32_t *dest = audio_stream_get_wptr(sink); + int free_samples = audio_stream_get_free_samples(sink); + int total_consumed = 0; + int total_produced = 0; + + /* 1. Drain any leftover outputs produced in prior passes */ while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int32(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s32(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int32(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } - for (int i = 0; i < samples_to_process; ++i) { - cd->input[cd->input_samples++] = convert_int32_to_float(src[i]); + + /* 2. Process new input blocks only if we have room and no pending outputs */ + while (cd->next_avail_output_samples == cd->chunk_frames * n_ch && + total_consumed < samples) { + int needed = cd->chunk_frames * n_ch - cd->input_samples; + int to_read = MIN(samples - total_consumed, needed); + to_read = MIN(to_read, audio_stream_samples_without_wrap_s32(source, src)); + for (int i = 0; i < to_read; i++) + cd->input[cd->input_samples++] = convert_int32_to_float(src[i]); + src = audio_stream_wrap(source, src + to_read); + total_consumed += to_read; + if (cd->input_samples == cd->chunk_frames * n_ch) { GoogleCtcAudioProcessingProcess(cd->state, cd->input, cd->output, cd->chunk_frames, n_ch); cd->input_samples = 0; cd->next_avail_output_samples = 0; - // writes processed samples to the output. while (cd->next_avail_output_samples < cd->chunk_frames * n_ch && - written_samples < samples_to_written) { - dest[written_samples++] = - convert_float_to_int32(cd->output[cd->next_avail_output_samples]); - cd->next_avail_output_samples++; + total_produced < free_samples) { + int to_write = MIN(cd->chunk_frames * n_ch - cd->next_avail_output_samples, + free_samples - total_produced); + to_write = MIN(to_write, audio_stream_samples_without_wrap_s32(sink, dest)); + for (int i = 0; i < to_write; i++) + dest[i] = convert_float_to_int32(cd->output[cd->next_avail_output_samples++]); + dest = audio_stream_wrap(sink, dest + to_write); + total_produced += to_write; } } } - if (written_samples > 0) { - dest = audio_stream_wrap(sink, dest + written_samples); - output_buffers->size += audio_stream_frame_bytes(sink) * written_samples / n_ch; - } - src = audio_stream_wrap(source, src + samples_to_process); - input_buffers->consumed += audio_stream_frame_bytes(source) * samples_to_process / n_ch; + + input_buffers->consumed = audio_stream_frame_bytes(source) * total_consumed / n_ch; + output_buffers->size = audio_stream_frame_bytes(sink) * total_produced / n_ch; } #endif @@ -245,7 +311,10 @@ static int ctc_free(struct processing_module *mod) if (cd) { mod_free(mod, cd->input); mod_free(mod, cd->output); - GoogleCtcAudioProcessingFree(cd->state); + if (cd->state) { + GoogleCtcAudioProcessingFree(cd->state); + cd->state = NULL; + } mod_data_blob_handler_free(mod, cd->tuning_handler); mod_free(mod, cd); module_set_private_data(mod, NULL); @@ -336,6 +405,7 @@ static int google_ctc_audio_processing_reconfigure(struct processing_module *mod ret); return ret; } + return 0; } @@ -384,6 +454,7 @@ static int ctc_prepare(struct processing_module *mod, comp_err(mod->dev, "invalid number of channels"); return -EINVAL; } + cd->input_samples = 0; cd->next_avail_output_samples = cd->chunk_frames * num_channels; config = comp_get_data_blob(cd->tuning_handler, &config_size, NULL); @@ -408,17 +479,25 @@ static int ctc_prepare(struct processing_module *mod, static int ctc_reset(struct processing_module *mod) { struct google_ctc_audio_processing_comp_data *cd = module_get_private_data(mod); - size_t buf_size = cd->chunk_frames * sizeof(cd->input[0]) * kMaxChannels; comp_info(mod->dev, "entry"); - GoogleCtcAudioProcessingFree(cd->state); - cd->state = NULL; + if (!cd) + return 0; + + size_t buf_size = cd->chunk_frames * sizeof(cd->input[0]) * kMaxChannels; + + if (cd->state) { + GoogleCtcAudioProcessingFree(cd->state); + cd->state = NULL; + } cd->ctc_func = NULL; cd->input_samples = 0; cd->next_avail_output_samples = 0; - memset(cd->input, 0, buf_size); - memset(cd->output, 0, buf_size); + if (cd->input) + memset(cd->input, 0, buf_size); + if (cd->output) + memset(cd->output, 0, buf_size); return 0; } @@ -443,6 +522,11 @@ static int ctc_process(struct processing_module *mod, return ret; } + if (!cd->enabled) { + ctc_passthrough(source, sink, &input_buffers[0], &output_buffers[0], frames); + return 0; + } + cd->ctc_func(cd, source, sink, &input_buffers[0], &output_buffers[0], frames); return 0; } diff --git a/src/audio/google/google_ctc_audio_processing.h b/src/audio/google/google_ctc_audio_processing.h index df537c3dc51e..6e2e52ba84c8 100644 --- a/src/audio/google/google_ctc_audio_processing.h +++ b/src/audio/google/google_ctc_audio_processing.h @@ -39,6 +39,7 @@ struct google_ctc_audio_processing_comp_data { struct comp_data_blob_handler *tuning_handler; bool enabled; bool reconfigure; + bool config_loaded; ctc_func ctc_func; }; diff --git a/src/audio/module_adapter/module_adapter_ipc4.c b/src/audio/module_adapter/module_adapter_ipc4.c index cdf535b1661e..266af61ff263 100644 --- a/src/audio/module_adapter/module_adapter_ipc4.c +++ b/src/audio/module_adapter/module_adapter_ipc4.c @@ -132,8 +132,14 @@ int module_adapter_init_data(struct comp_dev *dev, if (cfg == NULL) return -EINVAL; - if (cfgsz < sizeof(cfg->base_cfg)) - return -EINVAL; + if (cfgsz < sizeof(cfg->base_cfg)) { + memset(&dst->base_cfg, 0, sizeof(dst->base_cfg)); + if (cfgsz > 0 && cfg) + memcpy(&dst->base_cfg, cfg, cfgsz); + dst->size = cfgsz; + dst->avail = true; + return 0; + } dst->base_cfg = cfg->base_cfg; dst->size = cfgsz; From 2dd5d05b79fdd2bb2349cd61cfc296d04e2f0359 Mon Sep 17 00:00:00 2001 From: Eddy Hsu Date: Thu, 13 Aug 2026 16:40:42 +0000 Subject: [PATCH 3/4] topology2: sdw-dmic: add 16-bit capture format support Add 16-bit audio format support (S16_LE) to host-gateway-capture in sdw-dmic-generic.conf so that 16-bit microphone capture requests initialize properly without copier initialization errors. Signed-off-by: Eddy Hsu --- .../platform/intel/sdw-dmic-generic.conf | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf index f8fc51303966..07939406c761 100644 --- a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf @@ -121,6 +121,52 @@ IncludeByKey.SDW_DMIC_ENHANCED_CAPTURE { Object.Widget.host-copier.1 { stream_name "sdw dmic" pcm_id 4 + IncludeByKey.PCM_FORMAT_ALL { + "true" { + num_output_audio_formats 5 + Object.Base.output_audio_format [ + { + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + { + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_sample_type $SAMPLE_TYPE_FLOAT + } + { + out_bit_depth 8 + out_valid_bit_depth 8 + out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER + } + ] + } + "false" { + num_output_audio_formats 3 + Object.Base.output_audio_format [ + { + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } } } ] From 20e3fbfbdbed6568652ef614b92ffc26a08af2d5 Mon Sep 17 00:00:00 2001 From: Eddy Hsu Date: Thu, 13 Aug 2026 16:40:49 +0000 Subject: [PATCH 4/4] topology2: add Google CTC pipelines and targets for PTL Add Google Crosstalk Cancellation (CTC) component support to PTL topologies: - Add mixout-gain-dax-ctc-alh-dai-copier-playback pipeline for DAX speaker paths on Lapis (sof-ptl-cs42l43-agg-l3-cs35l56-l2-dax). - Add mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback pipeline for generic SDCA speaker paths on Moonstone (sof-sdca-1amp-id2). - Update sdw-amp-dax.conf, sdw-amp-generic.conf, and cavs-sdw.conf to route through CTC when SDW_SPK_CTC is true. - Enable SDW_SPK_CTC in tplg-targets-ace3.cmake and tplg-targets-sdca-generic.cmake. Signed-off-by: Eddy Hsu --- tools/topology/topology2/cavs-sdw.conf | 3 + ...-gain-dax-ctc-alh-dai-copier-playback.conf | 141 +++++++++++ ...eqfir-drc-ctc-alh-dai-copier-playback.conf | 66 +++++ .../topology2/platform/intel/sdw-amp-dax.conf | 231 +++++++++++++----- .../platform/intel/sdw-amp-generic.conf | 116 +++++++-- .../production/tplg-targets-ace3.cmake | 4 +- .../tplg-targets-sdca-generic.cmake | 10 +- 7 files changed, 484 insertions(+), 87 deletions(-) create mode 100644 tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-ctc-alh-dai-copier-playback.conf create mode 100644 tools/topology/topology2/include/pipelines/cavs/mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback.conf diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index d0e426e1e143..dc709cc100e6 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -14,10 +14,12 @@ + + @@ -106,6 +108,7 @@ Define { SDW_LINK_VALID_BITS 24 # Used when NUM_SDW_AMP_LINKS is 1 or more SDW_SPK_ENHANCED_PLAYBACK true + SDW_SPK_CTC false # Used when SDW_DMIC is 1 SDW_DMIC_ENHANCED_CAPTURE true EFX_SPK_IIR_PARAMS "highpass_100hz_0db_48khz" diff --git a/tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-ctc-alh-dai-copier-playback.conf b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-ctc-alh-dai-copier-playback.conf new file mode 100644 index 000000000000..00b0be44aab9 --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-dax-ctc-alh-dai-copier-playback.conf @@ -0,0 +1,141 @@ +# +# BE playback pipeline: mixout-gain-dax-ctc-alh-dai-copier. +# + + + + + + + + +Class.Pipeline."mixout-gain-dax-ctc-alh-dai-copier-playback" { + + + + attributes { + !constructor [ + "index" + ] + + !immutable [ + "direction" + ] + + unique "instance" + } + + Object.Widget { + mixout."1" {} + alh-copier."1" { + type dai_in + num_input_audio_formats 1 + num_output_audio_formats 1 + num_input_pins 1 + + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_sample_type $SAMPLE_TYPE_MSB_INTEGER + in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] + } + gain."1" { + num_input_audio_formats 1 + num_output_audio_formats 1 + preload_count 4 + + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + dolby-dax."1" { + num_input_audio_formats 1 + num_output_audio_formats 1 + preload_count 4 + Object.Base.input_audio_format [ + { + in_rate 48000 + in_bit_depth 32 + in_valid_bit_depth 32 + ibs "$[(1024 * ($[($in_bit_depth / 8)])) * ($in_channels)]" + } + ] + Object.Base.output_audio_format [ + { + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + obs "$[(1024 * ($[($out_bit_depth / 8)])) * ($out_channels)]" + } + ] + } + + ctc."1" { + num_input_audio_formats 1 + num_output_audio_formats 1 + preload_count 4 + + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + ibs "$[(1024 * ($[($in_bit_depth / 8)])) * ($in_channels)]" + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + obs "$[(1024 * ($[($out_bit_depth / 8)])) * ($out_channels)]" + } + ] + } + + pipeline."1" { + priority 0 + lp_mode 0 + preload_count 4 + } + } + + Object.Base { + !route [ + { + source gain.$index.1 + sink dolby-dax.$index.1 + } + { + source mixout.$index.1 + sink gain.$index.1 + } + { + source dolby-dax.$index.1 + sink ctc.$index.1 + } + ] + } + + direction "playback" + dynamic_pipeline 1 + time_domain "timer" +} diff --git a/tools/topology/topology2/include/pipelines/cavs/mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback.conf b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback.conf new file mode 100644 index 000000000000..7d8ff8bf8d23 --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback.conf @@ -0,0 +1,66 @@ +# +# BE playback pipeline: mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier. +# + + + + +Class.Pipeline."mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback" { + + SubTreeCopy.baseclass { + source "Class.Pipeline.mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback" + + tree { + Object.Widget { + ctc."1" { + num_input_audio_formats 1 + num_output_audio_formats 1 + + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + + Object.Control { + mixer."1" { + name 'CTC Switch' + } + bytes."1" { + name 'CTC.0' + max 4160 + } + } + } + } + + Object.Base { + !route [ + { + source gain.$index.1 + sink eqiir.$index.1 + } + { + source eqiir.$index.1 + sink eqfir.$index.1 + } + { + source eqfir.$index.1 + sink drc.$index.1 + } + { + source drc.$index.1 + sink ctc.$index.1 + } + ] + } + } + } +} diff --git a/tools/topology/topology2/platform/intel/sdw-amp-dax.conf b/tools/topology/topology2/platform/intel/sdw-amp-dax.conf index f1d93d01e100..1adf84e05daf 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-dax.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-dax.conf @@ -55,16 +55,19 @@ Object.Widget.module-copier."22" { num_output_pins 2 num_input_audio_formats 1 num_output_audio_formats 1 + preload_count 4 Object.Base.input_audio_format [ { in_bit_depth 32 in_valid_bit_depth 32 + ibs "$[(1024 * ($[($in_bit_depth / 8)])) * ($in_channels)]" } ] Object.Base.output_audio_format [ { out_bit_depth 32 out_valid_bit_depth 32 + obs "$[(1024 * ($[($out_bit_depth / 8)])) * ($out_channels)]" } ] } @@ -132,72 +135,155 @@ Object.Pipeline { } ] - mixout-gain-dax-alh-dai-copier-playback [ - { - index 21 - - Object.Widget.alh-copier.1 { - stream_name $SDW_SPK_STREAM - node_type $ALH_LINK_OUTPUT_CLASS - num_input_audio_formats 3 - Object.Base.input_audio_format [ - { - in_bit_depth 16 - in_valid_bit_depth 16 + IncludeByKey.SDW_SPK_CTC { + "true" { + mixout-gain-dax-ctc-alh-dai-copier-playback [ + { + index 21 + + Object.Widget.alh-copier.1 { + stream_name $SDW_SPK_STREAM + node_type $ALH_LINK_OUTPUT_CLASS + num_input_audio_formats 3 + Object.Base.input_audio_format [ + { + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth $SDW_LINK_VALID_BITS + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] } - { - in_bit_depth 32 - in_valid_bit_depth 24 + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Post Mixer $AMP_PLAYBACK_NAME Volume' + } } - { - in_bit_depth 32 - in_valid_bit_depth 32 + Object.Widget.dolby-dax.1 { + core_id $DOLBY_DAX_CORE_ID + Object.Control { + mixer."1" { + name 'DAX Speaker Switch' + } + mixer."2" { + name 'DAX Speaker Switch CP' + } + mixer."3" { + name 'DAX Speaker Switch CTC' + } + mixer."4" { + name 'DAX Speaker Volume' + } + enum."1" { + name 'DAX Speaker Profile' + } + enum."2" { + name 'DAX Speaker Device' + } + bytes."1" { + name 'DAX Speaker Tuning' + max 8192 + } + } } - ] - num_output_audio_formats 1 - Object.Base.output_audio_format [ - { - out_bit_depth 32 - out_valid_bit_depth $SDW_LINK_VALID_BITS - out_sample_type $SAMPLE_TYPE_MSB_INTEGER - out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + Object.Widget.ctc.1 { + Object.Control { + mixer."1" { + name 'CTC Switch' + } + bytes."1" { + name 'CTC.0' + max 4160 + } + } } - ] - } - Object.Widget.gain.1 { - Object.Control.mixer.1 { - name 'Post Mixer $AMP_PLAYBACK_NAME Volume' } - } - Object.Widget.dolby-dax.1 { - core_id $DOLBY_DAX_CORE_ID - Object.Control { - mixer."1" { - name 'DAX Speaker Switch' - } - mixer."2" { - name 'DAX Speaker Switch CP' - } - mixer."3" { - name 'DAX Speaker Switch CTC' - } - mixer."4" { - name 'DAX Speaker Volume' - } - enum."1" { - name 'DAX Speaker Profile' + ] + } + "false" { + mixout-gain-dax-alh-dai-copier-playback [ + { + index 21 + + Object.Widget.alh-copier.1 { + stream_name $SDW_SPK_STREAM + node_type $ALH_LINK_OUTPUT_CLASS + num_input_audio_formats 3 + Object.Base.input_audio_format [ + { + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth $SDW_LINK_VALID_BITS + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] } - enum."2" { - name 'DAX Speaker Device' + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Post Mixer $AMP_PLAYBACK_NAME Volume' + } } - bytes."1" { - name 'DAX Speaker Tuning' - max 8192 + Object.Widget.dolby-dax.1 { + core_id $DOLBY_DAX_CORE_ID + Object.Control { + mixer."1" { + name 'DAX Speaker Switch' + } + mixer."2" { + name 'DAX Speaker Switch CP' + } + mixer."3" { + name 'DAX Speaker Switch CTC' + } + mixer."4" { + name 'DAX Speaker Volume' + } + enum."1" { + name 'DAX Speaker Profile' + } + enum."2" { + name 'DAX Speaker Device' + } + bytes."1" { + name 'DAX Speaker Tuning' + max 8192 + } + } } } - } + ] } - ] + } } IncludeByKey.NUM_SDW_AMP_LINKS { @@ -512,15 +598,34 @@ Object.PCM.pcm [ } ] -Object.Base.route [ - { - source "dolby-dax.21.1" - sink "module-copier.21.22" +IncludeByKey.SDW_SPK_CTC { + "true" { + Object.Base.route [ + { + source "ctc.21.1" + sink "module-copier.21.22" + } + { + source "module-copier.21.22" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] } - { - source "module-copier.21.22" - sink "alh-copier.$SDW_SPK_STREAM.0" + "false" { + Object.Base.route [ + { + source "dolby-dax.21.1" + sink "module-copier.21.22" + } + { + source "module-copier.21.22" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] } +} + +Object.Base.route [ { source 'mixin.20.1' sink 'mixout.21.1' diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index d4913ca7dd4f..c3dac3569455 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -138,9 +138,9 @@ IncludeByKey.PASSTHROUGH { } ] - IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { - "true" { - mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [ + IncludeByKey.SDW_SPK_CTC { + "true" { + mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback [ { index 21 @@ -198,9 +198,74 @@ IncludeByKey.PASSTHROUGH { } } } + Object.Widget.ctc.1 {} } ] - } + } + "false" { + IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { + "true" { + mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [ + { + index 21 + + Object.Widget.alh-copier.1 { + stream_name $SDW_SPK_STREAM + node_type $ALH_LINK_OUTPUT_CLASS + num_input_audio_formats 3 + Object.Base.input_audio_format [ + { + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_bit_depth 32 + in_valid_bit_depth 24 + } + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth $SDW_LINK_VALID_BITS + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] + } + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name 'Post Mixer $AMP_PLAYBACK_NAME Volume' + } + } + + Object.Widget.eqiir.1 { + Object.Control.bytes."1" { + name 'Post Mixer $AMP_PLAYBACK_NAME IIR Eq bytes' + } + } + Object.Widget.eqfir.1 { + Object.Control.bytes."1" { + name 'Post Mixer $AMP_PLAYBACK_NAME FIR Eq bytes' + } + } + Object.Widget.drc.1 { + Object.Control { + bytes."1" { + name 'Post Mixer $AMP_PLAYBACK_NAME DRC bytes' + } + mixer."1" { + name 'Post Mixer $AMP_PLAYBACK_NAME DRC switch' + } + } + } + } + ] + } "false" { mixout-gain-alh-dai-copier-playback [ { @@ -242,10 +307,10 @@ IncludeByKey.PASSTHROUGH { } ] } - } - - } + } } +} +} "true" { Object.Pipeline.host-gateway-playback [ { @@ -658,6 +723,7 @@ IncludeByKey.NUM_SDW_AMP_LINKS { ] } } +} Object.PCM.pcm [ { @@ -684,11 +750,11 @@ Object.PCM.pcm [ IncludeByKey.PASSTHROUGH { "false" { - IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { + IncludeByKey.SDW_SPK_CTC { "true" { Object.Base.route [ { - source "drc.21.1" + source "ctc.21.1" sink "module-copier.21.22" } { @@ -698,16 +764,32 @@ IncludeByKey.PASSTHROUGH { ] } "false" { - Object.Base.route [ - { - source "gain.21.1" - sink "module-copier.21.22" + IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { + "true" { + Object.Base.route [ + { + source "drc.21.1" + sink "module-copier.21.22" + } + { + source "module-copier.21.22" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] } - { - source "module-copier.21.22" - sink "alh-copier.$SDW_SPK_STREAM.0" + "false" { + Object.Base.route [ + { + source "gain.21.1" + sink "module-copier.21.22" + } + { + source "module-copier.21.22" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] } - ] + } } } Object.Base.route [ diff --git a/tools/topology/topology2/production/tplg-targets-ace3.cmake b/tools/topology/topology2/production/tplg-targets-ace3.cmake index 6b48b533c28c..dcbae31905e8 100644 --- a/tools/topology/topology2/production/tplg-targets-ace3.cmake +++ b/tools/topology/topology2/production/tplg-targets-ace3.cmake @@ -37,7 +37,7 @@ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture- SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt721-4ch.bin,DMIC0_ENHANCED_CAPTURE=true,\ EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\ -DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true" +DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_CTC=true" # RT721 eval board with PCH-DMIC, sof_sdw_quirk_table with SOC_SDW_PCH_DMIC, DMIC1 with 96kHz "cavs-sdw\;sof-ptl-rt721-4ch-dmic1-96k\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\ @@ -172,7 +172,7 @@ SDW_SPK_ENHANCED_PLAYBACK=false" SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\ DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\ -SDW_AMP_PIPELINE_SRC=dax,SDW_JACK_PIPELINE_SRC=dax,DOLBY_DAX_CORE_ID=0" +SDW_AMP_PIPELINE_SRC=dax,SDW_JACK_PIPELINE_SRC=dax,DOLBY_DAX_CORE_ID=0,SDW_SPK_CTC=true" "cavs-sdw\;sof-ptl-cs42l43-agg-l3-cs35l56-l2-4ch\;PLATFORM=ptl,NUM_SDW_AMP_LINKS=2,NUM_DMICS=4,\ PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\ diff --git a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake index c7d5b5d8af1b..a7c736f46b2b 100644 --- a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake +++ b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake @@ -5,7 +5,7 @@ list(APPEND TPLGS "cavs-sdw\;sof-sdw-generic\;SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\ -SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack" +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,SDW_SPK_CTC=false" # Split topologies "cavs-sdw\;sof-sdca-jack-id0\;SDW_JACK_OUT_STREAM=Playback-SimpleJack,\ @@ -13,19 +13,19 @@ SDW_JACK_IN_STREAM=Capture-SimpleJack,NUM_HDMIS=0" "cavs-sdw\;sof-sdca-1amp-id2\;NUM_SDW_AMP_LINKS=1,SDW_JACK=false,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ -DEEP_BUF_SPK=true" +DEEP_BUF_SPK=true,SDW_SPK_CTC=true" "cavs-sdw\;sof-sdca-2amp-id2\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ -DEEP_BUF_SPK=true" +DEEP_BUF_SPK=true,SDW_SPK_CTC=false" "cavs-sdw\;sof-sdca-3amp-id2\;NUM_SDW_AMP_LINKS=3,SDW_JACK=false,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ -DEEP_BUF_SPK=true" +DEEP_BUF_SPK=true,SDW_SPK_CTC=false" "cavs-sdw\;sof-sdca-4amp-id2\;NUM_SDW_AMP_LINKS=4,SDW_JACK=false,\ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ -DEEP_BUF_SPK=true" +DEEP_BUF_SPK=true,SDW_SPK_CTC=false" "cavs-sdw\;sof-sdca-mic-id4\;SDW_JACK=false,SDW_DMIC=1,NUM_HDMIS=0,\ SDW_DMIC_STREAM=Capture-SmartMic"