if SOF

config SOF_STAGING
	bool "Enable SOF staging features and modules"
	default n
	help
	  SOF staging features are not ready for production but are
	  upstream to enable developers to continue development in order
	  to bring the feature to production level faster using the
	  upstream codebase.

rsource "../Kconfig.sof"

config SOF_USERSPACE
	bool "Enable SOF support for userspace modules"
	default n
	help
	  SOF userspace modules support will enable modules to run in DP
	  processing mode as userspace code and data. This feature is WIP
	  and is not yet ready for production, for developers only.

config SOF_ZEPHYR_HEAP_CACHED
	bool "Cached Zephyr heap for SOF memory non-shared zones"
	default y if CAVS || ACE
	default n
	help
	  Enable cached heap by mapping cached SOF memory zones to different
	  Zephyr sys_heap objects and enable caching for non-shared zones.

config SOF_ZEPHYR_HEAP_SIZE
	hex "Size of the Zephyr heap for SOF"
	default 0xF0000 if SOC_INTEL_ACE15_MTPM || SOC_INTEL_ACE20_LNL
	default 0xD0000 if SOC_INTEL_ACE30 || SOC_INTEL_ACE40
	default 0x0
	help
	 Support scaling of the heap size for different platforms and different types
	 of heaps. This is the default heap size for most users.
	 TODO: Currently this setting is only available on platforms with a
	 simplified heap size configuration. i.e. a single macro that defines the
	 heap size. This is not the case for all platforms.
	 NOTE: Keep in mind that the heap size should not be greater than the physical
	 memory size of the system defined in DT (and this includes baseFW text/data).

config SOF_ZEPHYR_SHARED_BUFFER_HEAP_SIZE
	hex "Size of the shared buffer heap for SOF userspace modules"
	default 0x1E000 if SOC_INTEL_ACE15_MTPM || SOC_INTEL_ACE20_LNL
	default 0x1A000 if SOC_INTEL_ACE30
	default 0x0
	depends on USERSPACE
	help
	 The size of the zephyr heap portion designated as the shared buffer heap.
	 This heap is shared between the sof and userspace modules. It is used exclusively for
	 allocating audio buffers between the kernel and userspace modules.
	 NOTE: Keep in mind that the shared heap size should not be greater than the
	 heap size.

config SOF_ZEPHYR_VIRTUAL_HEAP_SIZE
	hex "Size of the Zephyr virtual heap for SOF"
	depends on VIRTUAL_HEAP
	default 0x40000
	help
	 Support scaling of the virtual address heap size for different platforms.
	 NOTE: Keep in mind that the heap size should not be greater than the physical
	 memory size of the system defined in DT (and this includes baseFW text/data).

config SOF_ZEPHYR_VIRTUAL_HEAP_REGION_SIZE
	hex "Size in bytes of virtual memory region for virtual heap shared for all cores"
	depends on MM_DRV_INTEL_ADSP_MTL_TLB
	default 0x100000
	help
	  This config defines size of virtual heap region shared between all cores

config SOF_ZEPHYR_USERSPACE_MODULE_HEAP_SIZE
	hex "Size of the private heap created for each userspace module"
	default 0x1000
	depends on USERSPACE
	help
	 The size of the private heap created for each userspace module. Each userspace
	 module has its own independent heap to which only it has access. This heap is
	 shared between instances of the same module.

config ZEPHYR_NATIVE_DRIVERS
	bool "Use Zephyr native drivers"
	default n
	help
	  Enable Zephyr native api drivers for host and dai audio components
	  host-zephyr
	  dai-zephyr
	  will be used instead of legacy xtos version.

config DMA_DOMAIN
	bool "Enable the usage of DMA domain."
	help
	  This enables the usage of the DMA domain in scheduling.

config DMA_DOMAIN_SEM_LIMIT
	int "Number of resources the Zephyr's DMA domain can accumulate"
	depends on DMA_DOMAIN
	default 10
	help
	  Set this value according to the load of the system. Please make sure
	  that SEM_LIMIT covers the maximum number of tasks your system will be
	  executing at some point (worst case).

config PIPELINE_2_0
	bool "Enable pipeline 2.0 changes"
	depends on IPC_MAJOR_4
	default y if ACE
	help
	  This flag enables changes to new pipeline structure, known as pipeline2_0
	  It is required for certain new features, like DP_SCHEDULER.

config ZEPHYR_DP_SCHEDULER
	bool "use Zephyr thread based DP scheduler"
	default y if ACE
	default n
	depends on IPC_MAJOR_4
	depends on ZEPHYR_SOF_MODULE
	depends on ACE
	depends on PIPELINE_2_0
	imply XTENSA_HIFI_SHARING if XTENSA_HIFI
	help
	  Enable Data Processing preemptive scheduler based on
	  Zephyr preemptive threads.
	  DP modules can be located in dieffrent cores than LL pipeline modules, may have
	  different tick (i.e. 300ms for speech reccognition, etc.)

config CROSS_CORE_STREAM
	bool "Enable cross-core connected pipelines"
	default y if IPC_MAJOR_4
	help
	  Enables support for pipelines from different cores to be
	  connected together cross-core. So stream can travel from one
	  core to another. Note, this is different from "multicore"
	  support. In SOF "multicore" support means different streams
	  can be processed on different cores, however, each stream
	  is processed entirely on single core.

config SOF_BOOT_TEST
	bool "enable SOF run-time testing"
	depends on ZTEST
	help
	  Run tests during boot. This enables an SOF boot-time self-test. When
	  enabled, the resulting image will run a number of self-tests when the
	  first global IPC command is received, i.e. when SOF is completely
	  initialized. After that SOF will continue running and be usable as
	  usual.

config SOF_ZEPHYR_NO_SOF_CLOCK
	bool
	help
	  Do not use SOF clk.h interface to set the DSP clock frequency.
	  Requires implementation of platform/lib/clk.h.

config VIRTUAL_HEAP
	bool "Use virtual memory heap to allocate a buffers"
	default y if ACE
	default n
	depends on ACE
	help
	  Enabling this option will use the virtual memory heap allocator to allocate buffers.
	  It is based on a set of buffers whose size is predetermined.

config STACK_SIZE_EDF
	int "EDF scheduler stack size"
	default 8192
	help
	  EDF scheduler work-queue thread stack size. Keep a power of 2.

config STACK_SIZE_IPC_TX
	int "IPC sender stack size"
	default 2048
	help
	  IPC sender work-queue thread stack size. Keep a power of 2.

endif
