diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 832d4eb12098..b66ab5b0735e 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -2,6 +2,19 @@ cmake_minimum_required(VERSION 3.21.0) +# Board specific overlays (these must be before find_package(Zephyr)) +# ------------------------------------------------------------------- + +# Intel PTL: if "os_linux_overlay" used, also add "ll_userspace_overlay" +if(DEFINED EXTRA_CONF_FILE AND (BOARD MATCHES "/ptl" OR BOARD_QUALIFIERS MATCHES "/ptl")) + string(FIND "${EXTRA_CONF_FILE}" "os_linux_overlay" _linux_overlay_idx) + string(FIND "${EXTRA_CONF_FILE}" "ll_userspace_overlay" _ll_overlay_idx) + if(_linux_overlay_idx GREATER_EQUAL 0 AND _ll_overlay_idx LESS 0) + list(APPEND EXTRA_CONF_FILE + "${CMAKE_CURRENT_SOURCE_DIR}/overlays/ptl/ll_userspace_overlay.conf") + endif() +endif() + find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) project(sample_sof) diff --git a/app/overlays/ptl/ll_userspace_overlay.conf b/app/overlays/ptl/ll_userspace_overlay.conf index 8b21815e51b9..a74ef5563f29 100644 --- a/app/overlays/ptl/ll_userspace_overlay.conf +++ b/app/overlays/ptl/ll_userspace_overlay.conf @@ -1,7 +1,8 @@ # This is overlay configuration file to enable user-space LL audio -# pipeline support. This overlay is intended for development -# purposes. If user-space LL is enabled for some build target by -# default, the settings should be made in the SOF board file directly. +# pipeline support. +# +# NOTE: this overlay is automatically included if PTL is built +# with generic "os_linux_overlay.conf" # Enable user-space LL support in SOF # ----------------------------------- @@ -36,10 +37,12 @@ CONFIG_XRUN_NOTIFICATIONS_ENABLE=n # max two isolated DP modules CONFIG_XTENSA_MMU_NUM_L2_TABLES=70 -# Extend the shared LL user-space heap to 512KiB. This -# is current maximum for PTL builds with virtual heap -# enabled and uses the vmh allocation intended for KBP. -# TODO: needs some better solution to allocate -CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x80000 - +# Allocate majority of heap to user-space but only +# via vregions. +CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x40000 +CONFIG_SOF_ZEPHYR_HEAP_SIZE=0x60000 CONFIG_VIRTUAL_HEAP=n + +# sof-ptl-nocodec.tplg requires more than 64 partitions for DP +# (vregion is created for each pipeline) +CONFIG_MAX_DOMAIN_PARTITIONS=128