From 4074262317a28bfc87e4aa7d3f6ccba34b5d9fa5 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 25 Sep 2026 11:30:41 +0300 Subject: [PATCH 1/2] app: overlays: ptl: ll_userspace_overlay: increase memory partitions Increase the max limit for memory partitions to allow running SOF with sof-ptl-nocodec.tplg when running all pipelines in user-space. Signed-off-by: Kai Vehmanen --- app/overlays/ptl/ll_userspace_overlay.conf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/overlays/ptl/ll_userspace_overlay.conf b/app/overlays/ptl/ll_userspace_overlay.conf index 8b21815e51b9..eddedca8d241 100644 --- a/app/overlays/ptl/ll_userspace_overlay.conf +++ b/app/overlays/ptl/ll_userspace_overlay.conf @@ -36,10 +36,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 From 49cc50d5503f5e750600b1d60b39f702e64148b4 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Fri, 18 Sep 2026 16:18:18 +0300 Subject: [PATCH 2/2] app: CMakeLists: auto-include ptl LL userspace overlay for Linux builds When building ptl for Linux (i.e. os_linux_overlay.conf is in EXTRA_CONF_FILE), automatically append ll_userspace_overlay.conf so callers do not need to pass it explicitly. A double-inclusion guard is included for the case where the caller already lists it. This keeps os_linux_overlay.conf target-agnostic while ensuring all ptl Linux builds get the LL userspace configuration. Signed-off-by: Kai Vehmanen --- app/CMakeLists.txt | 13 +++++++++++++ app/overlays/ptl/ll_userspace_overlay.conf | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) 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 eddedca8d241..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 # -----------------------------------