Skip to content

Commit 450f5af

Browse files
committed
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 <kai.vehmanen@linux.intel.com>
1 parent fd8fa1c commit 450f5af

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

‎app/CMakeLists.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
cmake_minimum_required(VERSION 3.21.0)
44

5+
# Board specific overlays (these must be before find_package(Zephyr))
6+
# -------------------------------------------------------------------
7+
8+
# Intel PTL: if "os_linux_overlay" used, also add "ll_userspace_overlay"
9+
if(DEFINED EXTRA_CONF_FILE AND (BOARD MATCHES "/ptl" OR BOARD_QUALIFIERS MATCHES "/ptl"))
10+
string(FIND "${EXTRA_CONF_FILE}" "os_linux_overlay" _linux_overlay_idx)
11+
string(FIND "${EXTRA_CONF_FILE}" "ll_userspace_overlay" _ll_overlay_idx)
12+
if(_linux_overlay_idx GREATER_EQUAL 0 AND _ll_overlay_idx LESS 0)
13+
list(APPEND EXTRA_CONF_FILE
14+
"${CMAKE_CURRENT_SOURCE_DIR}/overlays/ptl/ll_userspace_overlay.conf")
15+
endif()
16+
endif()
17+
518
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
619
project(sample_sof)
720

‎app/overlays/ptl/ll_userspace_overlay.conf‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# This is overlay configuration file to enable user-space LL audio
2-
# pipeline support. This overlay is intended for development
3-
# purposes. If user-space LL is enabled for some build target by
4-
# default, the settings should be made in the SOF board file directly.
2+
# pipeline support.
3+
#
4+
# NOTE: this overlay is automatically included if PTL is built
5+
# with generic "os_linux_overlay.conf"
56

67
# Enable user-space LL support in SOF
78
# -----------------------------------

0 commit comments

Comments
 (0)