diff --git a/lmdk/cmake/build.cmake b/lmdk/cmake/build.cmake index e3182f596b06..15369cb41dbe 100644 --- a/lmdk/cmake/build.cmake +++ b/lmdk/cmake/build.cmake @@ -13,7 +13,8 @@ foreach(MODULE ${MODULES_LIST}) add_executable(${MODULE}) add_subdirectory(${LMDK_BASE}/modules/${MODULE} ${MODULE}_module) -### set_target_properties(${MODULE} PROPERTIES OUTPUT_NAME ${MODULE}.mod) + # uncomment line below to compile module with debug information + #target_compile_options(${MODULE} PUBLIC "-g3") target_include_directories(${MODULE} PRIVATE "${LMDK_BASE}/include" @@ -35,9 +36,9 @@ foreach(MODULE ${MODULES_LIST}) ) target_link_options(${MODULE} PRIVATE - "-nostdlib" "-nodefaultlibs" + "-nostartfiles" "-Wl,--no-undefined" "-Wl,--unresolved-symbols=report-all" "-Wl,--error-unresolved-symbols" - #"-Wl,--gc-sections" # may remove .bss and that will result in rimage error, do not use for now + "-Wl,--gc-sections" "-Wl,-Map,$.map" # optional: just for debug "-T" "${MODULE}_ldscripts/elf32xtensa.x" ) @@ -55,13 +56,26 @@ cmake_path(APPEND SOF_BASE "../build-rimage" OUTPUT_VARIABLE RIMAGE_SOF_INSTALL_ cmake_path(NORMAL_PATH RIMAGE_SOF_INSTALL_DIR) cmake_path(ABSOLUTE_PATH SIGNING_KEY BASE_DIRECTORY ${CMAKE_SOURCE_DIR} NORMALIZE) +foreach(MOD_NAME IN LISTS MODULES_LIST) + list(APPEND RIMAGE_MODULES_LIST ${MOD_NAME}.mod) + + # Change .module section flags to tell rimage to not include it in a final image + add_custom_target(${MOD_NAME}.mod + COMMENT "Preparing .mod(ule) files for rimage" + DEPENDS ${MOD_NAME} + COMMAND ${CMAKE_OBJCOPY} + --set-section-flags .module=noload,readonly + ${MOD_NAME} ${MOD_NAME}.mod +) +endforeach() + find_program(RIMAGE_COMMAND NAMES rimage PATHS "${RIMAGE_INSTALL_DIR}" HINTS "${RIMAGE_SOF_INSTALL_DIR}" REQUIRED) add_custom_target(${PROJECT_NAME}_target ALL - DEPENDS ${MODULES_LIST} - COMMAND ${RIMAGE_COMMAND} -k ${SIGNING_KEY} -f 2.0.0 -b 1 -o ${RIMAGE_OUTPUT_FILE} -c ${TOML} -e ${MODULES_LIST} + DEPENDS ${RIMAGE_MODULES_LIST} + COMMAND ${RIMAGE_COMMAND} -k ${SIGNING_KEY} -f 2.0.0 -b 1 -o ${RIMAGE_OUTPUT_FILE} -c ${TOML} -e ${RIMAGE_MODULES_LIST} COMMAND ${CMAKE_COMMAND} -E cat ${RIMAGE_OUTPUT_FILE}.xman ${RIMAGE_OUTPUT_FILE} > ${OUTPUT_FILE} ) diff --git a/lmdk/cmake/config.cmake b/lmdk/cmake/config.cmake index 5c7305c05133..6edc79541a89 100644 --- a/lmdk/cmake/config.cmake +++ b/lmdk/cmake/config.cmake @@ -14,5 +14,5 @@ cmake_path(ABSOLUTE_PATH LMDK_BASE NORMALIZE) set(SOF_BASE ${LMDK_BASE}/..) cmake_path(ABSOLUTE_PATH SOF_BASE NORMALIZE) -set(RIMAGE_INCLUDE_DIR ${SOF_BASE}/rimage/src/include) +set(RIMAGE_INCLUDE_DIR ${SOF_BASE}/tools/rimage/src/include) cmake_path(ABSOLUTE_PATH RIMAGE_INCLUDE_DIR NORMALIZE) diff --git a/lmdk/cmake/ldscripts/bss_linker_script.txt b/lmdk/cmake/ldscripts/bss_linker_script.txt index c214d4662978..4d76356f8630 100644 --- a/lmdk/cmake/ldscripts/bss_linker_script.txt +++ b/lmdk/cmake/ldscripts/bss_linker_script.txt @@ -16,5 +16,18 @@ SECTIONS { _next_end = ABSOLUTE(.); *(.bss) *(.bss.*) + + /* Heap memory */ + . = ALIGN(4); + __stack = .; + _end = .; + KEEP(*(.heap_mem)) + + /* Use the unused rest of the memory page as a heap */ + . = ALIGN(4096); + + /* The sbrk function implementation by xtensa incorrectly checks whether the allocated + memory block fits in the heap, so we have to add 1 to the end of the heap marker. */ + _heap_sentry = . + 1; } >HPSRAM_seg : bss_phdr } diff --git a/lmdk/cmake/ldscripts/data_linker_script.txt b/lmdk/cmake/ldscripts/data_linker_script.txt index 08b75bbf5b53..cbdf8001c0be 100644 --- a/lmdk/cmake/ldscripts/data_linker_script.txt +++ b/lmdk/cmake/ldscripts/data_linker_script.txt @@ -11,10 +11,11 @@ SECTIONS { _data_start = ABSOLUTE(.); *(.data) *(.data.*) + *(.*.data) _data_end = ABSOLUTE(.); } >HPSRAM_seg : data_phdr - .rodata : ALIGN(4096) { + .rodata : { _rodata_start = ABSOLUTE(.); *(.gnu.linkonce.r.*) *(.rodata) @@ -24,7 +25,7 @@ SECTIONS { } >HPSRAM_seg : rodata_phdr /* Module manifest is here */ - .module : ALIGN(4096) { + .module 0 : { KEEP(*(.module)) - } >HPSRAM_seg : rodata_phdr + } } diff --git a/lmdk/cmake/ldscripts/text_linker_script.txt b/lmdk/cmake/ldscripts/text_linker_script.txt index cd4412efccae..d1d3e1fa0d5e 100644 --- a/lmdk/cmake/ldscripts/text_linker_script.txt +++ b/lmdk/cmake/ldscripts/text_linker_script.txt @@ -11,7 +11,7 @@ PHDRS { SECTIONS { .text : ALIGN(4096) { _text_start = ABSOLUTE(.); - *(.buildinfo) + KEEP(*(.buildinfo)) *(.gnu.linkonce.literal.*) *(.gnu.linkonce.lit4) *(.literal) diff --git a/lmdk/cmake/xtensa-toolchain.cmake b/lmdk/cmake/xtensa-toolchain.cmake index c5058b331ad4..50601a612a43 100644 --- a/lmdk/cmake/xtensa-toolchain.cmake +++ b/lmdk/cmake/xtensa-toolchain.cmake @@ -18,11 +18,11 @@ cmake_path(APPEND XTENSA_TOOLCHAIN_PATH "XtensaTools" OUTPUT_VARIABLE TOOLCHAIN_ set(CROSS_COMPILE xt-) # clang or xcc -find_program(CMAKE_C_COMPILER NAMES ${CROSS_COMPILE}xcc +find_program(CMAKE_C_COMPILER NAMES ${CROSS_COMPILE}clang PATHS ${TOOLCHAIN_BASE} PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH ) # clang++ or xc++ -find_program(CMAKE_CXX_COMPILER NAMES ${CROSS_COMPILE}xc++ +find_program(CMAKE_CXX_COMPILER NAMES ${CROSS_COMPILE}clang++ PATHS ${TOOLCHAIN_BASE} PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH ) find_program(CMAKE_LD NAMES ${CROSS_COMPILE}ld diff --git a/scripts/cmake/misc.cmake b/scripts/cmake/misc.cmake index ac68b7627447..ee794780cd09 100644 --- a/scripts/cmake/misc.cmake +++ b/scripts/cmake/misc.cmake @@ -40,6 +40,15 @@ function(get_optimization_flag OUT_VAR) endif() endfunction() +# Zephyr duplicate in sof/zephyr/CMakeLists.txt; keep in sync +macro(is_zephyr ret) + if(CONFIG_ZEPHYR_SOF_MODULE) + set(${ret} TRUE) + else() + set(${ret} FALSE) + endif() +endmacro() + # Adds sources to target like target_sources, but assumes that # paths are relative to subdirectory. # Works like: diff --git a/scripts/rebuild-testbench.sh b/scripts/rebuild-testbench.sh index bc70456f90ad..1e5fe7e4666c 100755 --- a/scripts/rebuild-testbench.sh +++ b/scripts/rebuild-testbench.sh @@ -57,6 +57,7 @@ setup_xtensa_tools_build() BUILD_TYPE=xt BUILD_TARGET= BUILD_DIR_NAME=build_xt_testbench + COMPILER="xt-xcc" # check needed environment variables test -n "${XTENSA_TOOLS_ROOT}" || die "XTENSA_TOOLS_ROOT need to be set.\n" @@ -72,11 +73,10 @@ setup_xtensa_tools_build() test -n "${XTENSA_CORE}" || die "Illegal platform $BUILD_PLATFORM, no XTENSA_CORE found.\n" - compiler="xt-xcc" install_bin=install/tools/$XTENSA_TOOLS_VERSION/XtensaTools/bin tools_bin=$XTENSA_TOOLS_ROOT/$install_bin testbench_sections="-Wl,--sections-placement $BUILD_TESTBENCH_DIR/testbench_xcc_sections.txt" - export CC=$tools_bin/$compiler + export CC=$tools_bin/$COMPILER export LD=$tools_bin/xt-ld export OBJDUMP=$tools_bin/xt-objdump export LDFLAGS="-mlsp=sim $testbench_sections" diff --git a/scripts/set_xtensa_params.sh b/scripts/set_xtensa_params.sh index 1dbd7018c0d2..169e9c15ab5f 100644 --- a/scripts/set_xtensa_params.sh +++ b/scripts/set_xtensa_params.sh @@ -81,4 +81,10 @@ case "$platform" in HOST="xtensa-mt8195-elf" XTENSA_TOOLS_VERSION="RI-2019.1-linux" ;; + mtl) + PLATFORM="mtl" + XTENSA_CORE="ace10_LX7HiFi4_2022_10" + XTENSA_TOOLS_VERSION="RI-2022.10-linux" + COMPILER="xt-clang" + ;; esac diff --git a/src/audio/copier/copier.c b/src/audio/copier/copier.c index 46a36d61fad0..adeeae8c3dc4 100644 --- a/src/audio/copier/copier.c +++ b/src/audio/copier/copier.c @@ -84,7 +84,9 @@ static int copier_init(struct processing_module *mod) for (i = 0; i < IPC4_COPIER_MODULE_OUTPUT_PINS_COUNT; i++) cd->out_fmt[i] = cd->config.out_fmt; - ipc_pipe = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, config->pipeline_id); + ipc_pipe = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, + config->pipeline_id, + IPC_COMP_IGNORE_REMOTE); if (!ipc_pipe) { comp_err(dev, "pipeline %d is not existed", config->pipeline_id); ret = -EPIPE; diff --git a/src/audio/google/google_rtc_audio_processing.c b/src/audio/google/google_rtc_audio_processing.c index 544e94dd7476..effdef6d0f25 100644 --- a/src/audio/google/google_rtc_audio_processing.c +++ b/src/audio/google/google_rtc_audio_processing.c @@ -40,6 +40,7 @@ #include #define GOOGLE_RTC_AUDIO_PROCESSING_FREQENCY_TO_PERIOD_FRAMES 100 +#define GOOGLE_RTC_NUM_INPUT_PINS 2 LOG_MODULE_REGISTER(google_rtc_audio_processing, CONFIG_SOF_LOG_LEVEL); @@ -85,6 +86,7 @@ void GoogleRtcFree(void *ptr) #if CONFIG_IPC_MAJOR_4 static void google_rtc_audio_processing_params(struct processing_module *mod) { + struct google_rtc_audio_processing_comp_data *cd = module_get_private_data(mod); struct sof_ipc_stream_params *params = mod->stream_params; struct comp_buffer *sinkb, *sourceb; struct list_item *source_list; @@ -95,7 +97,10 @@ static void google_rtc_audio_processing_params(struct processing_module *mod) list_for_item(source_list, &dev->bsource_list) { sourceb = container_of(source_list, struct comp_buffer, sink_list); - ipc4_update_buffer_format(sourceb, &mod->priv.cfg.base_cfg.audio_fmt); + if (IPC4_SINK_QUEUE_ID(source->id) == SOF_AEC_FEEDBACK_QUEUE_ID) + ipc4_update_buffer_format(sourceb, &cd->config.reference_fmt); + else + ipc4_update_buffer_format(sourceb, &mod->priv.cfg.base_cfg.audio_fmt); } sinkb = list_first_item(&dev->bsink_list, struct comp_buffer, source_list); @@ -385,9 +390,20 @@ static int google_rtc_audio_processing_init(struct processing_module *mod) md->private = cd; #if CONFIG_IPC_MAJOR_4 - struct module_config *cfg = &md->cfg; + const struct ipc4_base_module_extended_cfg *base_cfg = md->cfg.init_data; + struct ipc4_input_pin_format reference_fmt, output_fmt; + const size_t size = sizeof(struct ipc4_input_pin_format); + + cd->config.base_cfg = base_cfg->base_cfg; + + /* Copy the reference format from input pin 1 format */ + memcpy_s(&reference_fmt, size, + &base_cfg->base_cfg_ext.pin_formats[size], size); + memcpy_s(&output_fmt, size, + &base_cfg->base_cfg_ext.pin_formats[size * GOOGLE_RTC_NUM_INPUT_PINS], size); - cd->config = *(const struct sof_ipc4_aec_config *)cfg->init_data; + cd->config.reference_fmt = reference_fmt.audio_fmt; + cd->config.output_fmt = output_fmt.audio_fmt; #endif cd->tuning_handler = comp_data_blob_handler_new(dev); diff --git a/src/idc/idc.c b/src/idc/idc.c index 860f427a551d..a2c19f577bdc 100644 --- a/src/idc/idc.c +++ b/src/idc/idc.c @@ -315,6 +315,25 @@ static int idc_reset(uint32_t comp_id) return ret; } +/** + * \brief Executes IDC component reset message. + * \param[in] comp_id Component id to be reset. + * \return Error code. + */ +static int idc_comp_free(uint32_t comp_id) +{ + struct ipc *ipc = ipc_get(); + struct ipc_comp_dev *icd; + int ret; + + icd = ipc_get_comp_by_id(ipc, comp_id); + if (!icd) + return -ENODEV; + + ret = ipc_comp_free(ipc, comp_id); + return ret; +} + /** * \brief Executes IDC pipeline set state message. * \param[in] ppl_id Pipeline id to be triggered. @@ -329,7 +348,7 @@ static int idc_ppl_state(uint32_t ppl_id, uint32_t phase) struct ipc_comp_dev *ppl_icd; uint32_t cmd = *(uint32_t *)payload; - ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, ppl_id); + ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, ppl_id, IPC_COMP_IGNORE_REMOTE); if (!ppl_icd) { tr_err(&idc_tr, "idc: comp %d not found", ppl_id); return IPC4_INVALID_RESOURCE_ID; @@ -429,6 +448,9 @@ void idc_cmd(struct idc_msg *msg) case iTS(IDC_MSG_GET_ATTRIBUTE): ret = idc_get_attribute(msg->extension); break; + case iTS(IDC_MSG_FREE): + ret = idc_comp_free(msg->extension); + break; #endif case iTS(IDC_MSG_PARAMS): ret = idc_params(msg->extension); diff --git a/src/include/sof/ipc/topology.h b/src/include/sof/ipc/topology.h index 34748379dbc2..f4caf828d7a2 100644 --- a/src/include/sof/ipc/topology.h +++ b/src/include/sof/ipc/topology.h @@ -76,6 +76,9 @@ struct ipc_msg; #define COMP_TYPE_BUFFER 2 #define COMP_TYPE_PIPELINE 3 +#define IPC_COMP_ALL 0 +#define IPC_COMP_IGNORE_REMOTE 1 + /* IPC generic component device */ struct ipc_comp_dev { uint16_t type; /* COMP_TYPE_ */ @@ -179,10 +182,11 @@ struct ipc_comp_dev *ipc_get_comp_dev(struct ipc *ipc, uint16_t type, uint32_t i * @param ipc The global IPC context. * @param type The component type. * @param ppl_id The pipeline ID. + * @param ignore_remote Omit component from different core if set to IPC_COMP_IGNORE_REMOTE * @return component device or NULL. */ struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, - uint32_t ppl_id); + uint32_t ppl_id, uint32_t ignore_remote); /** * \brief Get buffer device from pipeline ID. * @param ipc The global IPC context. diff --git a/src/init/CMakeLists.txt b/src/init/CMakeLists.txt index 91c8bb5d9a61..efa155793621 100644 --- a/src/init/CMakeLists.txt +++ b/src/init/CMakeLists.txt @@ -1,5 +1,18 @@ # SPDX-License-Identifier: BSD-3-Clause +is_zephyr(it_is) +if(it_is) ### Zephyr ### + + +zephyr_library_sources( + init.c + ext_manifest.c +) + + +else() ### Not Zephyr ### + + add_local_sources(sof init.c) add_library(ext_manifest STATIC "") @@ -21,3 +34,6 @@ sof_append_relative_path_definitions(ext_manifest) target_link_libraries(ext_manifest sof_options) target_link_libraries(sof_static_libraries INTERFACE ext_manifest) + + +endif() # Zephyr diff --git a/src/ipc/CMakeLists.txt b/src/ipc/CMakeLists.txt index 1b2a7efc804a..1859baa7a3ee 100644 --- a/src/ipc/CMakeLists.txt +++ b/src/ipc/CMakeLists.txt @@ -6,11 +6,33 @@ elseif (CONFIG_IPC_MAJOR_4) add_subdirectory(ipc4) endif() -add_local_sources(sof +set(base_files ipc-common.c ipc-helper.c ) +is_zephyr(it_is) +if(it_is) ### Zephyr ### + +zephyr_library_sources( + ${base_files} + dma-copy.c +) + +if (CONFIG_SOC_SERIES_INTEL_CAVS_V25 OR CONFIG_SOC_SERIES_INTEL_ACE) + zephyr_library_sources( + ipc-zephyr.c + ) +endif() + + +else() ### Not Zephyr ### + + +add_local_sources(sof + ${base_files} +) + if (CONFIG_TRACE) add_local_sources(sof dma-copy.c) @@ -19,3 +41,6 @@ endif() if (CONFIG_LIBRARY) return() endif() + + +endif() # Zephyr diff --git a/src/ipc/ipc3/CMakeLists.txt b/src/ipc/ipc3/CMakeLists.txt index 52d3280a14b4..eb791d1836a6 100644 --- a/src/ipc/ipc3/CMakeLists.txt +++ b/src/ipc/ipc3/CMakeLists.txt @@ -1,12 +1,28 @@ # SPDX-License-Identifier: BSD-3-Clause -add_local_sources(sof +set(common_files handler.c helper.c dai.c ) +is_zephyr(it_is) +if(it_is) ### Zephyr ### + +zephyr_library_sources( + ${common_files} + host-page-table.c +) + +else() ### Not Zephyr ### + +add_local_sources(sof + ${common_files} +) + if (CONFIG_HOST_PTABLE) add_local_sources(sof host-page-table.c) -endif() \ No newline at end of file +endif() + +endif() # Zephyr diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index f7b731ffde90..8646d80f0319 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -292,7 +292,9 @@ static int comp_specific_builder(struct sof_ipc_comp *comp, return 0; } -struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, uint32_t ppl_id) +struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, + uint16_t type, uint32_t ppl_id, + uint32_t ignore_remote) { struct ipc_comp_dev *icd; struct list_item *clist; @@ -301,7 +303,7 @@ struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, uint icd = container_of(clist, struct ipc_comp_dev, list); if (icd->type != type) continue; - if (!cpu_is_me(icd->core)) + if ((!cpu_is_me(icd->core)) && ignore_remote) continue; if (ipc_comp_pipe_id(icd) == ppl_id) return icd; diff --git a/src/ipc/ipc4/CMakeLists.txt b/src/ipc/ipc4/CMakeLists.txt index 2e162e702672..c977d498619a 100644 --- a/src/ipc/ipc4/CMakeLists.txt +++ b/src/ipc/ipc4/CMakeLists.txt @@ -1,12 +1,36 @@ # SPDX-License-Identifier: BSD-3-Clause -add_local_sources(sof +set(common_files dai.c handler.c helper.c logging.c notification.c +) + + +is_zephyr(it_is) +if(it_is) ### Zephyr ### + + +zephyr_library_sources( + ${common_files} +) + +zephyr_library_sources_ifdef(CONFIG_AMS + ams_helpers.c +) + + +else() ### Not Zephyr #### + + +add_local_sources(sof + ${common_files} ams_helpers.c ) target_include_directories(sof_options INTERFACE ${RIMAGE_TOP}/src/include) + + +endif() # Zephyr diff --git a/src/ipc/ipc4/handler.c b/src/ipc/ipc4/handler.c index 9dc499c78a47..1d92879b32d6 100644 --- a/src/ipc/ipc4/handler.c +++ b/src/ipc/ipc4/handler.c @@ -553,7 +553,8 @@ static int ipc4_set_pipeline_state(struct ipc4_message_request *ipc4) } for (i = 0; i < ppl_count; i++) { - ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, ppl_id[i]); + ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, + ppl_id[i], IPC_COMP_IGNORE_REMOTE); if (!ppl_icd) { tr_err(&ipc_tr, "ipc: comp %d not found", ppl_id[i]); return IPC4_INVALID_RESOURCE_ID; @@ -569,7 +570,8 @@ static int ipc4_set_pipeline_state(struct ipc4_message_request *ipc4) /* Run the prepare phase on the pipelines */ for (i = 0; i < ppl_count; i++) { - ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, ppl_id[i]); + ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, + ppl_id[i], IPC_COMP_IGNORE_REMOTE); if (!ppl_icd) { ipc_cmd_err(&ipc_tr, "ipc: comp %d not found", ppl_id[i]); return IPC4_INVALID_RESOURCE_ID; @@ -602,7 +604,8 @@ static int ipc4_set_pipeline_state(struct ipc4_message_request *ipc4) for (i = 0; i < ppl_count; i++) { bool delayed = false; - ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, ppl_id[i]); + ppl_icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_PIPELINE, + ppl_id[i], IPC_COMP_IGNORE_REMOTE); if (!ppl_icd) { ipc_cmd_err(&ipc_tr, "ipc: comp %d not found", ppl_id[i]); return IPC4_INVALID_RESOURCE_ID; diff --git a/src/ipc/ipc4/helper.c b/src/ipc/ipc4/helper.c index a9c657e21fdb..02fe108480ca 100644 --- a/src/ipc/ipc4/helper.c +++ b/src/ipc/ipc4/helper.c @@ -157,7 +157,9 @@ struct comp_dev *comp_new_ipc4(struct ipc4_module_init_instance *module_init) return dev; } -struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, uint32_t ppl_id) +struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, + uint32_t ppl_id, + uint32_t ignore_remote) { struct ipc_comp_dev *icd; struct list_item *clist; @@ -174,7 +176,7 @@ struct ipc_comp_dev *ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, uint if (icd->id == ppl_id) return icd; } else { - if (!cpu_is_me(icd->core)) + if ((!cpu_is_me(icd->core)) && ignore_remote) continue; if (ipc_comp_pipe_id(icd) == ppl_id) return icd; @@ -245,13 +247,21 @@ int ipc_pipeline_new(struct ipc *ipc, ipc_pipe_new *_pipe_desc) return ipc4_create_pipeline(pipe_desc); } +static inline int ipc_comp_free_remote(struct comp_dev *dev) +{ + struct idc_msg msg = { IDC_MSG_FREE, IDC_MSG_FREE_EXT(dev->ipc_config.id), + dev->ipc_config.core,}; + + return idc_send_msg(&msg, IDC_BLOCKING); +} + static int ipc_pipeline_module_free(uint32_t pipeline_id) { struct ipc *ipc = ipc_get(); struct ipc_comp_dev *icd; int ret; - icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_COMPONENT, pipeline_id); + icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_COMPONENT, pipeline_id, IPC_COMP_ALL); while (icd) { struct list_item *list, *_list; struct comp_buffer *buffer; @@ -282,11 +292,15 @@ static int ipc_pipeline_module_free(uint32_t pipeline_id) buffer_free(buffer); } - ret = ipc_comp_free(ipc, icd->id); + if (!cpu_is_me(icd->core)) + ret = ipc_comp_free_remote(icd->cd); + else + ret = ipc_comp_free(ipc, icd->id); + if (ret) return IPC4_INVALID_RESOURCE_STATE; - icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_COMPONENT, pipeline_id); + icd = ipc_get_comp_by_ppl_id(ipc, COMP_TYPE_COMPONENT, pipeline_id, IPC_COMP_ALL); } return IPC4_SUCCESS; diff --git a/src/platform/intel/cavs/platform.c b/src/platform/intel/cavs/platform.c index e9ef09900295..2f4602b4c222 100644 --- a/src/platform/intel/cavs/platform.c +++ b/src/platform/intel/cavs/platform.c @@ -102,6 +102,10 @@ int platform_boot_complete(uint32_t boot_message) return 0; } +static struct pm_notifier pm_state_notifier = { + .state_exit = cpu_notify_state_exit, +}; + /* Runs on the primary core only */ int platform_init(struct sof *sof) { @@ -150,6 +154,9 @@ int platform_init(struct sof *sof) if (ret < 0) return ret; + /* register power states exit notifiers */ + pm_notifier_register(&pm_state_notifier); + /* initialize the host IPC mechanisms */ trace_point(TRACE_BOOT_PLATFORM_IPC); ipc_init(sof); diff --git a/src/schedule/zephyr_ll.c b/src/schedule/zephyr_ll.c index 06608d188873..a91a6c24f5e4 100644 --- a/src/schedule/zephyr_ll.c +++ b/src/schedule/zephyr_ll.c @@ -57,6 +57,8 @@ static void zephyr_ll_assert_core(const struct zephyr_ll *sch) static void zephyr_ll_task_done(struct zephyr_ll *sch, struct task *task) { + struct zephyr_ll_pdata *pdata = task->priv_data; + list_item_del(&task->list); if (!sch->n_tasks) { @@ -66,6 +68,13 @@ static void zephyr_ll_task_done(struct zephyr_ll *sch, task->state = SOF_TASK_STATE_FREE; + if (pdata->freeing) + /* + * zephyr_ll_task_free() is trying to free this task. Complete + * it and signal the semaphore to let the function proceed + */ + k_sem_give(&pdata->sem); + tr_info(&ll_tr, "task complete %p %pU", task, task->uid); tr_info(&ll_tr, "num_tasks %d total_num_tasks %ld", sch->n_tasks, atomic_read(&sch->ll_domain->total_num_tasks)); @@ -212,15 +221,7 @@ static void zephyr_ll_run(void *data) zephyr_ll_lock(sch, &flags); - if (pdata->freeing) { - /* - * zephyr_ll_task_free() is trying to free this task. - * complete it and signal the semaphore to let the - * function proceed - */ - zephyr_ll_task_done(sch, task); - k_sem_give(&pdata->sem); - } else if (state == SOF_TASK_STATE_COMPLETED) { + if (pdata->freeing || state == SOF_TASK_STATE_COMPLETED) { zephyr_ll_task_done(sch, task); } else { /* diff --git a/test/cmocka/src/common_mocks.c b/test/cmocka/src/common_mocks.c index 630bdd0a0d13..524e267182fe 100644 --- a/test/cmocka/src/common_mocks.c +++ b/test/cmocka/src/common_mocks.c @@ -311,11 +311,12 @@ struct ipc_comp_dev *WEAK ipc_get_comp_dev(struct ipc *ipc, uint16_t type, uint3 } struct ipc_comp_dev *WEAK ipc_get_comp_by_ppl_id(struct ipc *ipc, uint16_t type, - uint32_t ppl_id) + uint32_t ppl_id, uint32_t ignore_remote) { (void)ipc; (void)type; (void)ppl_id; + (void)ignore_remote; return NULL; } diff --git a/tools/rimage/src/manifest.c b/tools/rimage/src/manifest.c index 19b73ee38e35..84176418df22 100644 --- a/tools/rimage/src/manifest.c +++ b/tools/rimage/src/manifest.c @@ -396,7 +396,7 @@ static int man_module_create(struct image *image, struct manifest_module *module fprintf(stdout, "info: ignore .bss section for bootloader module\n"); } else { err = elf_section_header_get_by_name(&module->file.elf, ".bss", &bss); - if (err) + if (err && !image->loadable_module) fprintf(stderr, "warning: can't find '.bss' section in module %s.\n", module->file.elf.filename); diff --git a/tools/test/topology/test-all.m4 b/tools/test/topology/test-all.m4 index e30df5d5fe40..6ddbe1f304ce 100644 --- a/tools/test/topology/test-all.m4 +++ b/tools/test/topology/test-all.m4 @@ -93,8 +93,8 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) diff --git a/tools/test/topology/test-capture.m4 b/tools/test/topology/test-capture.m4 index b5a8deb7681c..75fb88d45821 100644 --- a/tools/test/topology/test-capture.m4 +++ b/tools/test/topology/test-capture.m4 @@ -80,8 +80,8 @@ DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, TEST_DAI_LINK_NAME, ifelse(TEST_DAI_TYPE, `SSP', SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)), diff --git a/tools/test/topology/test-playback.m4 b/tools/test/topology/test-playback.m4 index 48ed1f26af37..ef16d9b3d839 100644 --- a/tools/test/topology/test-playback.m4 +++ b/tools/test/topology/test-playback.m4 @@ -218,8 +218,8 @@ PCM_PLAYBACK_ADD(Passthrough, 0, PIPELINE_PCM_1) DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) @@ -229,8 +229,8 @@ ifdef(`TEST_HAS_PIPE2', DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI2_PORT, 1, TEST_DAI2_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI2_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) @@ -241,8 +241,8 @@ ifdef(`TEST_HAS_PIPE3', DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI3_PORT, 2, TEST_DAI3_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI3_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) @@ -253,8 +253,8 @@ ifdef(`TEST_HAS_PIPE4', DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI4_PORT, 3, TEST_DAI4_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI4_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) diff --git a/tools/test/topology/test-tone-playback.m4 b/tools/test/topology/test-tone-playback.m4 index 5f3f8d2e02b1..6007b5381221 100644 --- a/tools/test/topology/test-tone-playback.m4 +++ b/tools/test/topology/test-tone-playback.m4 @@ -64,8 +64,8 @@ DAI_ADD(sof/pipe-dai-playback.m4, DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_PORT, TEST_DAI_LINK_NAME, SSP_CONFIG(TEST_SSP_MODE, SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3), SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT, TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID))) diff --git a/tools/testbench/CMakeLists.txt b/tools/testbench/CMakeLists.txt index 3d4e622c08bf..76a3716571ee 100644 --- a/tools/testbench/CMakeLists.txt +++ b/tools/testbench/CMakeLists.txt @@ -41,7 +41,7 @@ if (supports_implicit_fallthrough) set(implicit_fallthrough -Wimplicit-fallthrough) endif() -target_compile_options(testbench PRIVATE -g -O3 -Wall -Werror -Wl,-EL -Wmissing-prototypes +target_compile_options(testbench PRIVATE -g -O3 -Wall -Werror -Wmissing-prototypes ${implicit_fallthrough} -DCONFIG_LIBRARY -DCONFIG_LIBRARY_STATIC -imacros${config_h}) target_link_libraries(testbench PRIVATE -lm) diff --git a/tools/testbench/testbench.c b/tools/testbench/testbench.c index 889aba1c0209..72d8ac4417a5 100644 --- a/tools/testbench/testbench.c +++ b/tools/testbench/testbench.c @@ -353,13 +353,14 @@ static int parse_input_args(int argc, char **argv, struct testbench_prm *tp) break; /* print usage */ - default: - fprintf(stderr, "unknown option %c\n", option); - ret = -EINVAL; - /* fallthrough */ case 'h': print_usage(argv[0]); exit(EXIT_SUCCESS); + + default: + fprintf(stderr, "unknown option %c\n", option); + print_usage(argv[0]); + ret = -EINVAL; } if (ret < 0) diff --git a/tools/topology/topology1/development/sof-imx8-compr-pcm-cap-wm8960.m4 b/tools/topology/topology1/development/sof-imx8-compr-pcm-cap-wm8960.m4 index 436148af13d5..c1f5db6eb6c1 100644 --- a/tools/topology/topology1/development/sof-imx8-compr-pcm-cap-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8-compr-pcm-cap-wm8960.m4 @@ -85,7 +85,7 @@ COMPR_CAPTURE_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0))) diff --git a/tools/topology/topology1/development/sof-imx8-compr-pcm-wm8960.m4 b/tools/topology/topology1/development/sof-imx8-compr-pcm-wm8960.m4 index f20985a6bb47..2aaea2434105 100644 --- a/tools/topology/topology1/development/sof-imx8-compr-pcm-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8-compr-pcm-wm8960.m4 @@ -85,7 +85,7 @@ COMPR_PLAYBACK_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0))) diff --git a/tools/topology/topology1/development/sof-imx8-compr-wm8960.m4 b/tools/topology/topology1/development/sof-imx8-compr-wm8960.m4 index 945b70f5d6dc..9c4e4d1c9701 100644 --- a/tools/topology/topology1/development/sof-imx8-compr-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8-compr-wm8960.m4 @@ -103,14 +103,14 @@ DAI_CONFIG(SAI, 1, 0, DAI_BE_NAME, ifelse( CODEC, `wm8960', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, `RATE', codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0)))', CODEC, `wm8962', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, `RATE', codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0)))', ) diff --git a/tools/topology/topology1/development/sof-imx8-src-cs42888.m4 b/tools/topology/topology1/development/sof-imx8-src-cs42888.m4 index 3de6e81267cd..ddc16a80d632 100644 --- a/tools/topology/topology1/development/sof-imx8-src-cs42888.m4 +++ b/tools/topology/topology1/development/sof-imx8-src-cs42888.m4 @@ -76,7 +76,7 @@ PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, esai_config) DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), - ESAI_CLOCK(bclk, 3072000, codec_slave), - ESAI_CLOCK(fsync, 48000, codec_slave), + ESAI_CLOCK(bclk, 3072000, codec_consumer), + ESAI_CLOCK(fsync, 48000, codec_consumer), ESAI_TDM(2, 32, 3, 3), ESAI_CONFIG_DATA(ESAI, 0, 0))) diff --git a/tools/topology/topology1/development/sof-imx8-src-wm8960.m4 b/tools/topology/topology1/development/sof-imx8-src-wm8960.m4 index db7e86c1b5a7..e8a0f39a4939 100644 --- a/tools/topology/topology1/development/sof-imx8-src-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8-src-wm8960.m4 @@ -89,14 +89,14 @@ DAI_CONFIG(SAI, SAI_INDEX, 0, DAI_BE_NAME, ifelse( CODEC, `wm8960', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, RATE, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, RATE, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', CODEC, `wm8962', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, `RATE', codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', ) diff --git a/tools/topology/topology1/development/sof-imx8mp-compr-pcm-cap-wm8960.m4 b/tools/topology/topology1/development/sof-imx8mp-compr-pcm-cap-wm8960.m4 index e2cf0a2f22d6..9eb27880c4f5 100644 --- a/tools/topology/topology1/development/sof-imx8mp-compr-pcm-cap-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8mp-compr-pcm-cap-wm8960.m4 @@ -86,7 +86,7 @@ COMPR_CAPTURE_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 3, 0, sai3-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0))) diff --git a/tools/topology/topology1/development/sof-imx8mp-compr-pcm-wm8960.m4 b/tools/topology/topology1/development/sof-imx8mp-compr-pcm-wm8960.m4 index d72e2ce6540d..c518430b01c5 100644 --- a/tools/topology/topology1/development/sof-imx8mp-compr-pcm-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8mp-compr-pcm-wm8960.m4 @@ -86,7 +86,7 @@ COMPR_PLAYBACK_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 3, 0, sai3-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0))) diff --git a/tools/topology/topology1/development/sof-imx8mp-compr-wm8960.m4 b/tools/topology/topology1/development/sof-imx8mp-compr-wm8960.m4 index 72a7b62ac7cc..e74caff6b27c 100644 --- a/tools/topology/topology1/development/sof-imx8mp-compr-wm8960.m4 +++ b/tools/topology/topology1/development/sof-imx8mp-compr-wm8960.m4 @@ -104,14 +104,14 @@ DAI_CONFIG(SAI, 3, 0, DAI_BE_NAME, ifelse( CODEC, `wm8960', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, `RATE', codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0)))', CODEC, `wm8962', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, `RATE', codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0)))', ) diff --git a/tools/topology/topology1/platform/common/acp-hs.m4 b/tools/topology/topology1/platform/common/acp-hs.m4 index 2094d35b0f12..2dc74df3eabc 100644 --- a/tools/topology/topology1/platform/common/acp-hs.m4 +++ b/tools/topology/topology1/platform/common/acp-hs.m4 @@ -2,7 +2,7 @@ divert(-1) dnl ACPHS related macros -dnl ACP_CLOCK(clock, freq, codec_master, polarity) +dnl ACP_CLOCK(clock, freq, codec_provider, polarity) dnl polarity is optional define(`ACP_CLOCK', $1 STR($3) diff --git a/tools/topology/topology1/platform/common/acp-sp.m4 b/tools/topology/topology1/platform/common/acp-sp.m4 index acf8fb0f556f..e76ec1432c7d 100644 --- a/tools/topology/topology1/platform/common/acp-sp.m4 +++ b/tools/topology/topology1/platform/common/acp-sp.m4 @@ -2,7 +2,7 @@ divert(-1) dnl ACPSP related macros -dnl ACP_CLOCK(clock, freq, codec_master, polarity) +dnl ACP_CLOCK(clock, freq, codec_provider, polarity) dnl polarity is optional define(`ACP_CLOCK', $1 STR($3) diff --git a/tools/topology/topology1/platform/common/esai.m4 b/tools/topology/topology1/platform/common/esai.m4 index 9dd1b4c845cd..7b44caf5d8fb 100644 --- a/tools/topology/topology1/platform/common/esai.m4 +++ b/tools/topology/topology1/platform/common/esai.m4 @@ -2,7 +2,7 @@ divert(-1) dnl ESAI related macros -dnl ESAI_CLOCK(clock, freq, codec_master, polarity) +dnl ESAI_CLOCK(clock, freq, codec_provider, polarity) dnl polarity is optional define(`ESAI_CLOCK', $1 STR($3) diff --git a/tools/topology/topology1/platform/common/sai.m4 b/tools/topology/topology1/platform/common/sai.m4 index 389daaaf5a5a..888308c714d4 100644 --- a/tools/topology/topology1/platform/common/sai.m4 +++ b/tools/topology/topology1/platform/common/sai.m4 @@ -2,7 +2,7 @@ divert(-1) dnl SAI related macros -dnl SAI_CLOCK(clock, freq, codec_master, polarity) +dnl SAI_CLOCK(clock, freq, codec_provider, polarity) dnl polarity is optional define(`SAI_CLOCK', $1 STR($3) diff --git a/tools/topology/topology1/platform/common/ssp.m4 b/tools/topology/topology1/platform/common/ssp.m4 index 9dbedcf643f6..d3f5b19afad3 100644 --- a/tools/topology/topology1/platform/common/ssp.m4 +++ b/tools/topology/topology1/platform/common/ssp.m4 @@ -2,7 +2,7 @@ divert(-1) dnl SSP related macros -dnl SSP_CLOCK(clock, freq, codec_master, polarity) +dnl SSP_CLOCK(clock, freq, codec_provider, polarity) dnl polarity is optional define(`SSP_CLOCK', $1 STR($3) diff --git a/tools/topology/topology1/sof-acp-renoir.m4 b/tools/topology/topology1/sof-acp-renoir.m4 index 09052f25b7ca..2debdfa0f8a4 100644 --- a/tools/topology/topology1/sof-acp-renoir.m4 +++ b/tools/topology/topology1/sof-acp-renoir.m4 @@ -31,8 +31,8 @@ PIPELINE_SOURCE_1, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPSP, 0, 0, acp-headset-codec, ACPSP_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPSP_CONFIG_DATA(ACPSP, 0, 48000, 2, 0))) # Capture pipeline 2 on PCM 0 using max 2 channels of s16le. diff --git a/tools/topology/topology1/sof-acp-rmb-dmic4ch.m4 b/tools/topology/topology1/sof-acp-rmb-dmic4ch.m4 index bba80efee423..4bf45dccbae4 100644 --- a/tools/topology/topology1/sof-acp-rmb-dmic4ch.m4 +++ b/tools/topology/topology1/sof-acp-rmb-dmic4ch.m4 @@ -30,8 +30,8 @@ PIPELINE_SOURCE_1, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPHS, 0, 0, acp-headset-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 0, 48000, 2, 0))) PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, @@ -45,8 +45,8 @@ PIPELINE_SOURCE_2, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 2, 0))) diff --git a/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic2ch-nau8825-max98360.m4 b/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic2ch-nau8825-max98360.m4 index 4be6362334c4..2c6b89e9c672 100644 --- a/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic2ch-nau8825-max98360.m4 +++ b/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic2ch-nau8825-max98360.m4 @@ -95,8 +95,8 @@ DAI_ADD(sof/pipe-virtual-playback-passthrough.m4, DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec, ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 8, 1))) #/**********************************************************************************/ # PCM Playback pipeline 4 on PCM 1 using max 2 channels of s16le. @@ -168,8 +168,8 @@ PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_3, PIPELINE_PCM_2) # BE configurations - DAI_CONFIG(ACPHS, 0, 0, acp-headset-codec, ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 0, 48000, 8, 1))) #/**********************************************************************************/ diff --git a/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic4ch-rt5682-rt1019.m4 b/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic4ch-rt5682-rt1019.m4 index 5f4524cf6113..c4e484f6a0d2 100644 --- a/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic4ch-rt5682-rt1019.m4 +++ b/tools/topology/topology1/sof-acp-rmb-tdm8ch-dmic4ch-rt5682-rt1019.m4 @@ -95,8 +95,8 @@ DAI_ADD(sof/pipe-virtual-playback-passthrough.m4, DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec, ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 8, 1))) #/**********************************************************************************/ @@ -169,8 +169,8 @@ PCM_DUPLEX_ADD(Low Latency, 0, PIPELINE_PCM_3, PIPELINE_PCM_2) # BE configurations - DAI_CONFIG(ACPHS, 0, 0, acp-headset-codec, ACPHS_CONFIG(DSP_A, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(8, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 0, 48000, 8, 1))) #/**********************************************************************************/ diff --git a/tools/topology/topology1/sof-acp-rmb.m4 b/tools/topology/topology1/sof-acp-rmb.m4 index f2b24a796453..d5945f9ee778 100644 --- a/tools/topology/topology1/sof-acp-rmb.m4 +++ b/tools/topology/topology1/sof-acp-rmb.m4 @@ -31,8 +31,8 @@ PIPELINE_SOURCE_1, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPHS, 0, 0, acp-headset-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 0, 48000, 2, 0))) PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, @@ -46,8 +46,8 @@ PIPELINE_SOURCE_2, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 2, 0))) diff --git a/tools/topology/topology1/sof-acp-vangogh.m4 b/tools/topology/topology1/sof-acp-vangogh.m4 index 27cfbc96da79..4c313ec608c2 100644 --- a/tools/topology/topology1/sof-acp-vangogh.m4 +++ b/tools/topology/topology1/sof-acp-vangogh.m4 @@ -31,8 +31,8 @@ PIPELINE_SOURCE_1, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPSP, 0, 0, acp-headset-codec, ACPSP_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPSP_CONFIG_DATA(ACPSP, 0, 48000, 2, 0))) PIPELINE_PCM_ADD(sof/pipe-passthrough-playback.m4, @@ -46,8 +46,8 @@ PIPELINE_SOURCE_2, 2, s16le, 2000, 0, 0, SCHEDULE_TIME_DOMAIN_DMA) DAI_CONFIG(ACPHS, 1, 1, acp-amp-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 1, 48000, 2, 0))) diff --git a/tools/topology/topology1/sof-acp_6_3.m4 b/tools/topology/topology1/sof-acp_6_3.m4 index 88204638d9ac..1923d93acf8e 100644 --- a/tools/topology/topology1/sof-acp_6_3.m4 +++ b/tools/topology/topology1/sof-acp_6_3.m4 @@ -46,14 +46,14 @@ DAI_ADD(sof/pipe-dai-playback.m4, dnl DAI_CONFIG(type, dai_index, link_id, name, acphs_config/acpdmic_config) dnl ACPHS_CONFIG(format, mclk, bclk, fsync, tdm, acphs_config_data) -dnl ACP_CLOCK(clock, freq, codec_master, polarity) +dnl ACP_CLOCK(clock, freq, codec_provider, polarity) dnl ACPHS_CONFIG_DATA(type, idx, valid bits, mclk_id) dnl mclk_id is optional DAI_CONFIG(ACPHS, 0, 0, acp-headset-codec, ACPHS_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3),ACPHS_CONFIG_DATA(ACPHS, 0, 48000, 2, 0))) #=========================================================================== diff --git a/tools/topology/topology1/sof-cavs-nocodec.m4 b/tools/topology/topology1/sof-cavs-nocodec.m4 index ba5f741f26e2..0b913fc68f82 100644 --- a/tools/topology/topology1/sof-cavs-nocodec.m4 +++ b/tools/topology/topology1/sof-cavs-nocodec.m4 @@ -249,8 +249,8 @@ ifelse(ROOT_CLK, `19_2', ` DAI_CONFIG(SSP, SSP0_IDX, 0, NoCodec-0, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in), - SSP_CLOCK(bclk, 3072000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 3072000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 32, 3, 3), dnl SSP_CONFIG_DATA(type, idx, valid bits, mclk_id, quirks, bclk_delay, dnl clks_control, pulse_width, padding) @@ -259,16 +259,16 @@ DAI_CONFIG(SSP, SSP0_IDX, 0, NoCodec-0, DAI_CONFIG(SSP, SSP1_IDX, 1, NoCodec-1, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in), - SSP_CLOCK(bclk, 3072000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 3072000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 32, 3, 3), SSP_CONFIG_DATA(SSP, SSP1_IDX, 32, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) DAI_CONFIG(SSP, SSP2_IDX, 2, NoCodec-2, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in), - SSP_CLOCK(bclk, 3072000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 3072000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 32, 3, 3), SSP_CONFIG_DATA(SSP, SSP2_IDX, 32, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) @@ -279,24 +279,24 @@ ifelse(ROOT_CLK, `24', DAI_CONFIG(SSP, SSP0_IDX, 0, NoCodec-0, dnl SSP_CONFIG(format, mclk, bclk, fsync, tdm, ssp_config_data) SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in), - SSP_CLOCK(bclk, 4800000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 4800000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP0_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) DAI_CONFIG(SSP, SSP1_IDX, 1, NoCodec-1, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in), - SSP_CLOCK(bclk, 4800000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 4800000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP1_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) DAI_CONFIG(SSP, SSP2_IDX, 2, NoCodec-2, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24000000, codec_mclk_in), - SSP_CLOCK(bclk, 4800000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 4800000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP2_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) @@ -306,24 +306,24 @@ ifelse(ROOT_CLK, `38_4', ` DAI_CONFIG(SSP, SSP0_IDX, 0, NoCodec-0, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), - SSP_CLOCK(bclk, 2400000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 2400000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP0_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) DAI_CONFIG(SSP, SSP1_IDX, 1, NoCodec-1, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), - SSP_CLOCK(bclk, 2400000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 2400000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP1_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) DAI_CONFIG(SSP, SSP2_IDX, 2, NoCodec-2, SSP_CONFIG(I2S, SSP_CLOCK(mclk, 38400000, codec_mclk_in), - SSP_CLOCK(bclk, 2400000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 2400000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(2, 25, 3, 3), SSP_CONFIG_DATA(SSP, SSP2_IDX, 24, 0, SSP_QUIRK_LBM, 0, eval(SSP_CC_MCLK_ES | SSP_CC_BCLK_ES)))) diff --git a/tools/topology/topology1/sof-eq-iir-dts-codec-smart-amplifier.m4 b/tools/topology/topology1/sof-eq-iir-dts-codec-smart-amplifier.m4 index e76cb4292d5d..a9040132688a 100644 --- a/tools/topology/topology1/sof-eq-iir-dts-codec-smart-amplifier.m4 +++ b/tools/topology/topology1/sof-eq-iir-dts-codec-smart-amplifier.m4 @@ -226,8 +226,8 @@ DAI_CONFIG(ALH, eval(SMART_ALH_INDEX + 1), eval(SMART_BE_ID + 1), SMART_ALH_CAPT #SSP SSP_INDEX (ID: SMART_BE_ID) DAI_CONFIG(SSP, SMART_SSP_INDEX, SMART_BE_ID, SMART_SSP_NAME, SSP_CONFIG(DSP_B, SSP_CLOCK(mclk, SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, 12288000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 12288000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(8, 32, 15, 255), SSP_CONFIG_DATA(SSP, SMART_SSP_INDEX, 32, 0, SMART_SSP_QUIRK))) ') diff --git a/tools/topology/topology1/sof-imx8-compr-wm8960-mixer.m4 b/tools/topology/topology1/sof-imx8-compr-wm8960-mixer.m4 index 5ead8841e5b9..2b1ad5977dcc 100644 --- a/tools/topology/topology1/sof-imx8-compr-wm8960-mixer.m4 +++ b/tools/topology/topology1/sof-imx8-compr-wm8960-mixer.m4 @@ -132,7 +132,7 @@ COMPR_PLAYBACK_ADD(PCM Deep Buffer, 1, PIPELINE_PCM_4) # DAI_CONFIG(SAI, SAI_INDEX, 0, DAI_BE_NAME, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), - SAI_TDM(2, 16, 3, 3), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), + SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0))) diff --git a/tools/topology/topology1/sof-imx8-cs42888-mixer.m4 b/tools/topology/topology1/sof-imx8-cs42888-mixer.m4 index 486235fa0ef6..b3fcea341ab1 100644 --- a/tools/topology/topology1/sof-imx8-cs42888-mixer.m4 +++ b/tools/topology/topology1/sof-imx8-cs42888-mixer.m4 @@ -100,7 +100,7 @@ PCM_PLAYBACK_ADD(PCM Deep Buffer, 1, PIPELINE_PCM_4) # DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), - ESAI_CLOCK(bclk, 3072000, codec_slave), - ESAI_CLOCK(fsync, 48000, codec_slave), + ESAI_CLOCK(bclk, 3072000, codec_consumer), + ESAI_CLOCK(fsync, 48000, codec_consumer), ESAI_TDM(2, 32, 3, 3), ESAI_CONFIG_DATA(ESAI, 0, 0))) diff --git a/tools/topology/topology1/sof-imx8-cs42888.m4 b/tools/topology/topology1/sof-imx8-cs42888.m4 index b7e00b57007e..49d4de3324fb 100644 --- a/tools/topology/topology1/sof-imx8-cs42888.m4 +++ b/tools/topology/topology1/sof-imx8-cs42888.m4 @@ -76,7 +76,7 @@ PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, esai_config) DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), - ESAI_CLOCK(bclk, 3072000, codec_slave), - ESAI_CLOCK(fsync, 48000, codec_slave), + ESAI_CLOCK(bclk, 3072000, codec_consumer), + ESAI_CLOCK(fsync, 48000, codec_consumer), ESAI_TDM(2, 32, 3, 3), ESAI_CONFIG_DATA(ESAI, 0, 0))) diff --git a/tools/topology/topology1/sof-imx8-nocodec-sai.m4 b/tools/topology/topology1/sof-imx8-nocodec-sai.m4 index 4c130f075146..b77fe0537975 100644 --- a/tools/topology/topology1/sof-imx8-nocodec-sai.m4 +++ b/tools/topology/topology1/sof-imx8-nocodec-sai.m4 @@ -62,7 +62,7 @@ PCM_PLAYBACK_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, dai_index, link_id, name, sai_config) DAI_CONFIG(SAI, 1, 0, NoCodec-0, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 49152000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_slave), - SAI_CLOCK(fsync, 48000, codec_slave), + SAI_CLOCK(bclk, 3072000, codec_consumer), + SAI_CLOCK(fsync, 48000, codec_consumer), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0))) diff --git a/tools/topology/topology1/sof-imx8-nocodec.m4 b/tools/topology/topology1/sof-imx8-nocodec.m4 index dadd916c7599..aa33e86d0f38 100644 --- a/tools/topology/topology1/sof-imx8-nocodec.m4 +++ b/tools/topology/topology1/sof-imx8-nocodec.m4 @@ -62,7 +62,7 @@ PCM_PLAYBACK_ADD(Port0, 0, PIPELINE_PCM_1) dnl DAI_CONFIG(type, dai_index, link_id, name, esai_config) DAI_CONFIG(ESAI, 0, 0, NoCodec-0, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), - ESAI_CLOCK(bclk, 3072000, codec_slave), - ESAI_CLOCK(fsync, 48000, codec_slave), + ESAI_CLOCK(bclk, 3072000, codec_consumer), + ESAI_CLOCK(fsync, 48000, codec_consumer), ESAI_TDM(2, 32, 3, 3), ESAI_CONFIG_DATA(ESAI, 0, 0))) diff --git a/tools/topology/topology1/sof-imx8-wm8960-cs42888.m4 b/tools/topology/topology1/sof-imx8-wm8960-cs42888.m4 index 150846069197..3864add58a46 100644 --- a/tools/topology/topology1/sof-imx8-wm8960-cs42888.m4 +++ b/tools/topology/topology1/sof-imx8-wm8960-cs42888.m4 @@ -104,15 +104,15 @@ PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) dnl DAI_CONFIG(type, idx, link_id, name, esai_config) DAI_CONFIG(ESAI, 0, 0, esai0-cs42888, ESAI_CONFIG(I2S, ESAI_CLOCK(mclk, 49152000, codec_mclk_in), - ESAI_CLOCK(bclk, 3072000, codec_slave), - ESAI_CLOCK(fsync, 48000, codec_slave), + ESAI_CLOCK(bclk, 3072000, codec_consumer), + ESAI_CLOCK(fsync, 48000, codec_consumer), ESAI_TDM(2, 32, 3, 3), ESAI_CONFIG_DATA(ESAI, 0, 0))) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0))) diff --git a/tools/topology/topology1/sof-imx8-wm8960-kwd.m4 b/tools/topology/topology1/sof-imx8-wm8960-kwd.m4 index 54b8157a44a9..44e2ecf8e83b 100644 --- a/tools/topology/topology1/sof-imx8-wm8960-kwd.m4 +++ b/tools/topology/topology1/sof-imx8-wm8960-kwd.m4 @@ -84,7 +84,7 @@ SectionGraph."pipe-sof-imx8-keyword-detect" { dnl DAI_CONFIG(type, dai_index, link_id, name, sai_config) DAI_CONFIG(SAI, 1, 0, sai1-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 16000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 16000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 1, 0))) diff --git a/tools/topology/topology1/sof-imx8-wm8960-mixer.m4 b/tools/topology/topology1/sof-imx8-wm8960-mixer.m4 index ed2c63ea13ce..d95db75fe709 100644 --- a/tools/topology/topology1/sof-imx8-wm8960-mixer.m4 +++ b/tools/topology/topology1/sof-imx8-wm8960-mixer.m4 @@ -113,14 +113,14 @@ DAI_CONFIG(SAI, SAI_INDEX, 0, DAI_BE_NAME, ifelse( CODEC, `wm8960', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, RATE, codec_master), - SAI_TDM(2, 16, 3, 3), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, RATE, codec_provider), + SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', CODEC, `wm8962', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, RATE, codec_master), - SAI_TDM(2, 16, 3, 3), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, RATE, codec_provider), + SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', ) diff --git a/tools/topology/topology1/sof-imx8-wm8960.m4 b/tools/topology/topology1/sof-imx8-wm8960.m4 index e7339ae60bf2..3628bc5392e9 100644 --- a/tools/topology/topology1/sof-imx8-wm8960.m4 +++ b/tools/topology/topology1/sof-imx8-wm8960.m4 @@ -90,8 +90,8 @@ DAI_CONFIG(SAI, SAI_INDEX, 0, DAI_BE_NAME, ifelse( CODEC, `wm8960', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, RATE, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, RATE, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', CODEC, `wm8904', ` @@ -102,8 +102,8 @@ ifelse( SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', CODEC, `wm8962', ` SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, RATE, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, RATE, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, SAI_INDEX, 0)))', ) diff --git a/tools/topology/topology1/sof-imx8mp-btsco-dual-8ch.m4 b/tools/topology/topology1/sof-imx8mp-btsco-dual-8ch.m4 index 6abb1e4e0755..8c581b7a760a 100644 --- a/tools/topology/topology1/sof-imx8mp-btsco-dual-8ch.m4 +++ b/tools/topology/topology1/sof-imx8mp-btsco-dual-8ch.m4 @@ -104,7 +104,7 @@ PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) dnl DAI_CONFIG(type, dai_index, link_id, name, sai_config) -dnl SAI_CLOCK: clock, freq, codec_master, polarity (optional) +dnl SAI_CLOCK: clock, freq, codec_provider, polarity (optional) dnl SAI_TDM: number of channels, word width, tx mask, rx mask: decimal channel enable bits dnl SAI_CONFIG_DATA: index, mclk_id (optional) diff --git a/tools/topology/topology1/sof-imx8mp-wm8960-kwd.m4 b/tools/topology/topology1/sof-imx8mp-wm8960-kwd.m4 index 9f03a58ac72d..61bb1ce513b0 100644 --- a/tools/topology/topology1/sof-imx8mp-wm8960-kwd.m4 +++ b/tools/topology/topology1/sof-imx8mp-wm8960-kwd.m4 @@ -90,7 +90,7 @@ SectionGraph."pipe-sof-apl-keyword-detect" { dnl DAI_CONFIG(type, dai_index, link_id, name, sai_config/ssp_config/dmic_config) DAI_CONFIG(SAI, 3, 0, sai3-wm8960-hifi, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 16000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 16000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0))) diff --git a/tools/topology/topology1/sof-imx8ulp-btsco.m4 b/tools/topology/topology1/sof-imx8ulp-btsco.m4 index a1ce55b3fd0a..4e1492f22445 100644 --- a/tools/topology/topology1/sof-imx8ulp-btsco.m4 +++ b/tools/topology/topology1/sof-imx8ulp-btsco.m4 @@ -79,7 +79,7 @@ PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 5, 0, sai5-bt-sco-pcm-wb, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_out), - SAI_CLOCK(bclk, 256000, codec_slave), - SAI_CLOCK(fsync, `RATE', codec_slave), + SAI_CLOCK(bclk, 256000, codec_consumer), + SAI_CLOCK(fsync, `RATE', codec_consumer), SAI_TDM(1, 16, 1, 1), SAI_CONFIG_DATA(SAI, 5, 0))) diff --git a/tools/topology/topology1/sof-imx93-wm8962.m4 b/tools/topology/topology1/sof-imx93-wm8962.m4 index 0e99ce292db8..836d6fb77be6 100644 --- a/tools/topology/topology1/sof-imx93-wm8962.m4 +++ b/tools/topology/topology1/sof-imx93-wm8962.m4 @@ -76,7 +76,7 @@ PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) dnl DAI_CONFIG(type, idx, link_id, name, sai_config) DAI_CONFIG(SAI, 3, 0, sai3-wm8962, SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), - SAI_CLOCK(bclk, 3072000, codec_master), - SAI_CLOCK(fsync, 48000, codec_master), + SAI_CLOCK(bclk, 3072000, codec_provider), + SAI_CLOCK(fsync, 48000, codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0))) diff --git a/tools/topology/topology1/sof-rn-rt5682-max98360.m4 b/tools/topology/topology1/sof-rn-rt5682-max98360.m4 index 3965042c7499..103412db299e 100644 --- a/tools/topology/topology1/sof-rn-rt5682-max98360.m4 +++ b/tools/topology/topology1/sof-rn-rt5682-max98360.m4 @@ -33,8 +33,8 @@ DAI_ADD(sof/pipe-dai-playback.m4, DAI_CONFIG(ACPSP, 0, 0, acp-headset-codec, ACPSP_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3), ACPSP_CONFIG_DATA(ACPSP, 0, 48000, 2, 0))) diff --git a/tools/topology/topology1/sof-rn-rt5682-rt1019.m4 b/tools/topology/topology1/sof-rn-rt5682-rt1019.m4 index 79e621110865..5d87210b4fe9 100644 --- a/tools/topology/topology1/sof-rn-rt5682-rt1019.m4 +++ b/tools/topology/topology1/sof-rn-rt5682-rt1019.m4 @@ -34,8 +34,8 @@ DAI_ADD(sof/pipe-dai-playback.m4, DAI_CONFIG(ACPSP, 0, 0, acp-headset-codec, ACPSP_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), - ACP_CLOCK(bclk, 3072000, codec_slave), - ACP_CLOCK(fsync, 48000, codec_slave), + ACP_CLOCK(bclk, 3072000, codec_consumer), + ACP_CLOCK(fsync, 48000, codec_consumer), ACP_TDM(2, 32, 3, 3), ACPSP_CONFIG_DATA(ACPSP, 0, 48000, 2, 0))) diff --git a/tools/topology/topology1/sof-smart-amplifier.m4 b/tools/topology/topology1/sof-smart-amplifier.m4 index 054c14684fd0..38d4b5872d78 100644 --- a/tools/topology/topology1/sof-smart-amplifier.m4 +++ b/tools/topology/topology1/sof-smart-amplifier.m4 @@ -234,8 +234,8 @@ DAI_CONFIG(ALH, eval(SMART_ALH_INDEX + 1), eval(SMART_BE_ID + 1), SMART_ALH_CAPT #SSP SSP_INDEX (ID: SMART_BE_ID) DAI_CONFIG(SSP, SMART_SSP_INDEX, SMART_BE_ID, SMART_SSP_NAME, SSP_CONFIG(DSP_B, SSP_CLOCK(mclk, SSP_MCLK, codec_mclk_in), - SSP_CLOCK(bclk, 12288000, codec_slave), - SSP_CLOCK(fsync, 48000, codec_slave), + SSP_CLOCK(bclk, 12288000, codec_consumer), + SSP_CLOCK(fsync, 48000, codec_consumer), SSP_TDM(8, 32, 15, 255), SSP_CONFIG_DATA(SSP, SMART_SSP_INDEX, 32, 0, SMART_SSP_QUIRK))) ') diff --git a/tools/topology/topology1/sof/pipe-low-latency-playback_mux_tdm4ch.m4 b/tools/topology/topology1/sof/pipe-low-latency-playback_mux_tdm4ch.m4 index 1a69cf3a38de..97a44d6eaf7e 100644 --- a/tools/topology/topology1/sof/pipe-low-latency-playback_mux_tdm4ch.m4 +++ b/tools/topology/topology1/sof/pipe-low-latency-playback_mux_tdm4ch.m4 @@ -73,8 +73,8 @@ W_BUFFER(1, COMP_BUFFER_SIZE(2, #DAI_CONFIG(ACPSP1, 1, 1, acp-amp-codec, # ACPSP1_CONFIG(I2S, ACP_CLOCK(mclk, 49152000, codec_mclk_in), -# ACP_CLOCK(bclk, 3072000, codec_slave), -# ACP_CLOCK(fsync, 48000, codec_slave), +# ACP_CLOCK(bclk, 3072000, codec_consumer), +# ACP_CLOCK(fsync, 48000, codec_consumer), # ACP_TDM(4, 32, 3, 3),ACPSP1_CONFIG_DATA(ACPSP1, 1, 48000, 4))) # diff --git a/tools/topology/topology2/cavs-mixin-mixout-ssp.conf b/tools/topology/topology2/cavs-mixin-mixout-ssp.conf index d5a0c2c28ba8..3b26c1102838 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-ssp.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-ssp.conf @@ -10,7 +10,7 @@ Object.Pipeline { # playback pipelines host-copier-gain-mixin-playback [ { - index 1 + index $HEADSET_HOST_PIPELINE_ID Object.Widget.host-copier.1 { stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' @@ -23,7 +23,7 @@ Object.Pipeline { } } { - index 3 + index $SPEAKER_HOST_PIPELINE_ID Object.Widget.host-copier.1 { stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' @@ -39,7 +39,7 @@ Object.Pipeline { mixout-gain-dai-copier-playback [ { - index 2 + index $HEADSET_DAI_PIPELINE_ID Object.Widget.dai-copier.1 { dai_index $HEADSET_SSP_DAI_INDEX @@ -56,7 +56,7 @@ Object.Pipeline { } } { - index 4 + index $SPEAKER_DAI_PIPELINE_ID Object.Widget.dai-copier.1 { dai_index $SPEAKER_SSP_DAI_INDEX @@ -77,19 +77,19 @@ Object.Pipeline { Object.Base.route [ { - source "gain.2.1" - sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" + source "gain.$HEADSET_DAI_PIPELINE_ID.1" + sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" } { - source "mixin.1.1" - sink "mixout.2.1" + source "mixin.$HEADSET_HOST_PIPELINE_ID.1" + sink "mixout.$HEADSET_DAI_PIPELINE_ID.1" } { - source "gain.4.1" - sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" + source "gain.$SPEAKER_DAI_PIPELINE_ID.1" + sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" } { - source "mixin.3.1" - sink "mixout.4.1" + source "mixin.$SPEAKER_HOST_PIPELINE_ID.1" + sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1" } ] diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index 2984cf202036..299684f2f8d6 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -85,6 +85,10 @@ Define { SPEAKER_PLAYBACK_PCM_STREAM_NAME 'Speaker Playback' SPEAKER_SSP_DAI_INDEX 1 SPEAKER_HW_CONFIG_NAME 'SPEAKER HWCFG' + HEADSET_HOST_PIPELINE_ID 1 + HEADSET_DAI_PIPELINE_ID 2 + SPEAKER_HOST_PIPELINE_ID 3 + SPEAKER_DAI_PIPELINE_ID 4 INCLUDE_ECHO_REF false ECHO_REF_HOST_PIPELINE_ID 7 ECHO_REF_DAI_PIPELINE_ID 8 @@ -96,7 +100,10 @@ Define { BT_PB_DAI_PIPELINE_SRC "copier.host.9.1" BT_PB_PIPELINE_STREAM_NAME "dai-copier.SSP.10.1" GOOGLE_RTC_AEC_SUPPORT 0 + # assign core for AEC LL pipelines GOOGLE_AEC_CORE_ID 0 + # assign core for RTC_AE DP task + GOOGLE_AEC_DP_CORE_ID 0 HEADSET_PCM_NAME "Headset" HEADSET_PCM_ID 0 SPEAKER_PCM_NAME "Speakers" diff --git a/tools/topology/topology2/development/cavs-nocodec-rtcaec.conf b/tools/topology/topology2/development/cavs-nocodec-rtcaec.conf index b79ca37ad4f2..406e13d5b6d9 100644 --- a/tools/topology/topology2/development/cavs-nocodec-rtcaec.conf +++ b/tools/topology/topology2/development/cavs-nocodec-rtcaec.conf @@ -346,11 +346,6 @@ Object.Widget.google-rtc-aec [ Object.Base.input_pin_binding.2 { input_pin_binding_name "dai-copier.SSP.NoCodec-2.capture" } - - Object.Control.bytes."1" { - name 'google-rtc-aec bytes' - - } } ] diff --git a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf index 336d31aac2e0..57e9bcfa34da 100644 --- a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf +++ b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf @@ -10,6 +10,7 @@ Object.Pipeline.google-rtc-aec-capture [ } Object.Widget.google-rtc-aec.1 { + core_id $GOOGLE_AEC_DP_CORE_ID Object.Base.input_pin_binding.1 { input_pin_binding_name "module-copier.18.1" } diff --git a/tools/tplg_parser/CMakeLists.txt b/tools/tplg_parser/CMakeLists.txt index 749868fd2dd2..871eaf06c60a 100644 --- a/tools/tplg_parser/CMakeLists.txt +++ b/tools/tplg_parser/CMakeLists.txt @@ -64,7 +64,7 @@ endif() # TODO: add IPC4 option when it's ready. target_compile_options(sof_tplg_parser PRIVATE - -g -O -Wall -Werror -Wl,-EL -fPIC -DPIC + -g -O -Wall -Werror -fPIC -DPIC -Wmissing-prototypes ${implicit_fallthrough} -DCONFIG_LIBRARY -D${tplg_ipc}) diff --git a/west.yml b/west.yml index 6fe222be2d1b..bc36728fe84c 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 35e9104de7a32a1cb2f7083015da0609a89f04b5 + revision: 35e9104de7a32a1cb2f7083015da0609a89f04b5 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 2c7e78222934..54fc5379525a 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -1,7 +1,7 @@ -# This is still WIP - Not fully validated on any platform. - # When west is installed, Zephyr's CMake invokes west to list and try to -# compile every Zephyr module that can be found. +# compile every Zephyr module that can be found. See +# sof/zephyr/module.yml and +# https://docs.zephyrproject.org/latest/develop/modules.html if(CONFIG_SOF) if(CONFIG_LIBRARY) @@ -114,14 +114,30 @@ zephyr_include_directories( # SOC level sources # Files that are commented may not be needed. + +# New, "de-centralized Zephyr" way. Requires "is_zephyr()" conditionals in +# the decentralized CMakeLists.txt files shared with XTOS. + +# XTOS duplicate in sof/scripts/misc.cmake; keep in sync +macro(is_zephyr ret) + if(CONFIG_ZEPHYR_SOF_MODULE) + set(${ret} TRUE) + else() + set(${ret} FALSE) + endif() +endmacro() + +add_subdirectory(../src/init/ init_unused_install/) +add_subdirectory(../src/ipc/ ipc_unused_install/) + + + +# Old way below: all .c files added by this giant CMake file. + # Intel TGL and CAVS 2.5 platforms if (CONFIG_SOC_SERIES_INTEL_CAVS_V25) # Driver sources - zephyr_library_sources( - ${SOF_IPC_PATH}/ipc-zephyr.c - ) - zephyr_library_sources_ifdef(CONFIG_INTEL_HDA ${SOF_DRIVERS_PATH}/intel/hda/hda-dma.c ) @@ -147,11 +163,6 @@ endif() # Intel ACE 1.5 and newer platforms if (CONFIG_SOC_SERIES_INTEL_ACE) - # Driver sources - zephyr_library_sources( - ${SOF_IPC_PATH}/ipc-zephyr.c - ) - # Platform sources zephyr_library_sources( ${SOF_PLATFORM_PATH}/intel/ace/platform.c @@ -337,9 +348,6 @@ zephyr_include_directories(${SOF_PLATFORM_PATH}/${PLATFORM}/include) # Mandatory Files used on all platforms. # Commented files will be added/removed as integration dictates. zephyr_library_sources( - ${SOF_IPC_PATH}/dma-copy.c - ${SOF_IPC_PATH}/ipc-common.c - ${SOF_IPC_PATH}/ipc-helper.c # SOF math utilities ${SOF_MATH_PATH}/decibels.c @@ -372,8 +380,6 @@ zephyr_library_sources( ${SOF_AUDIO_PATH}/pipeline/pipeline-xrun.c # SOF core infrastructure - runs on top of Zephyr - ${SOF_SRC_PATH}/init/init.c - ${SOF_SRC_PATH}/init/ext_manifest.c ${SOF_SRC_PATH}/arch/xtensa/drivers/cache_attr.c ${SOF_SRC_PATH}/schedule/zephyr_domain.c ${SOF_SRC_PATH}/schedule/schedule.c @@ -420,20 +426,6 @@ else() ) endif() -zephyr_library_sources_ifdef(CONFIG_IPC_MAJOR_3 - ${SOF_IPC_PATH}/ipc3/handler.c - ${SOF_IPC_PATH}/ipc3/helper.c - ${SOF_IPC_PATH}/ipc3/dai.c - ${SOF_IPC_PATH}/ipc3/host-page-table.c -) - -zephyr_library_sources_ifdef(CONFIG_IPC_MAJOR_4 - ${SOF_IPC_PATH}/ipc4/handler.c - ${SOF_IPC_PATH}/ipc4/helper.c - ${SOF_IPC_PATH}/ipc4/dai.c - ${SOF_IPC_PATH}/ipc4/logging.c - ${SOF_IPC_PATH}/ipc4/notification.c -) zephyr_library_sources_ifdef(CONFIG_TRACE ${SOF_SRC_PATH}/trace/dma-trace.c @@ -786,7 +778,6 @@ zephyr_library_sources_ifdef(CONFIG_HAVE_AGENT zephyr_library_sources_ifdef(CONFIG_AMS ${SOF_LIB_PATH}/ams.c - ${SOF_IPC_PATH}/ipc4/ams_helpers.c ) zephyr_library_sources_ifdef(CONFIG_GDB_DEBUG diff --git a/zephyr/include/rtos/idc.h b/zephyr/include/rtos/idc.h index 34418a320a22..30a4069f8863 100644 --- a/zephyr/include/rtos/idc.h +++ b/zephyr/include/rtos/idc.h @@ -106,6 +106,10 @@ #define IDC_MSG_UNBIND IDC_TYPE(0xE) #define IDC_MSG_GET_ATTRIBUTE IDC_TYPE(0xF) +/** \brief IDC component delete message. */ +#define IDC_MSG_FREE IDC_TYPE(0x10) +#define IDC_MSG_FREE_EXT(x) IDC_EXTENSION(x) + /** \brief IDC pipeline set state message. */ #define IDC_MSG_PPL_STATE IDC_TYPE(0xC) #define IDC_PPL_STATE_PPL_ID_SHIFT 0 diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index d630177bdde2..3dde19dc38bc 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -148,8 +148,7 @@ int cpu_enable_core(int id) * initialization. By reinitializing the idle thread, we would overwrite the kernel structs * and the idle thread stack. */ - if (!IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE) || - pm_state_next_get(id)->state == PM_STATE_ACTIVE) + if (pm_state_next_get(id)->state == PM_STATE_ACTIVE) z_init_cpu(id); #endif