copier: Add copier simd option

Add copier simd HIFI option, with this adding, developer
can select which HIFI version used for copier.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This commit is contained in:
Baofeng Tian 2024-02-19 15:49:01 +08:00 committed by Liam Girdwood
parent 1cb8d8fb19
commit 7e3f4a2f21
5 changed files with 46 additions and 15 deletions

View File

@ -1,5 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
rsource "Kconfig.simd"
config COMP_COPIER
bool "COPIER component"
default y

View File

@ -0,0 +1,40 @@
# SPDX-License-Identifier: BSD-3-Clause
comment "COPIER optimization level select"
choice "COPIER_SIMD_LEVEL_SELECT"
prompt "choose which SIMD level used for COPIER module"
depends on COMP_COPIER
default COPIER_HIFI_MAX
config COPIER_HIFI_MAX
prompt "SIMD will selected by toolchain pre-defined header"
bool
help
When this was selected, optimization level will be determined
by toolchain pre-defined macros in core isa header file.
config COPIER_HIFI_5
prompt "choose HIFI5 intrinsic optimized COPIER module"
bool
help
This option used to build HIFI5 optimized COPIER code
config COPIER_HIFI_4
prompt "choose HIFI4 intrinsic optimized COPIER module"
bool
help
This option used to build HIFI4 optimized COPIER code
config COPIER_HIFI_3
prompt "choose HIFI3 intrinsic optimized COPIER module"
bool
help
This option used to build HIFI3 intrinsic optimized COPIER code
config COPIER_HIFI_NONE
prompt "choose generic C COPIER module, no HIFI SIMD involved"
bool
help
This option used to build COPIER generic code.
endchoice

View File

@ -33,17 +33,6 @@
#include <sof/audio/buffer.h>
#include <sof/audio/pcm_converter.h>
#define COPIER_GENERIC
#if defined(__XCC__)
#include <xtensa/config/core-isa.h>
#if XCHAL_HAVE_HIFI3 || XCHAL_HAVE_HIFI4
#undef COPIER_GENERIC
#endif
#endif
static const uint32_t INVALID_QUEUE_ID = 0xFFFFFFFF;
/* copier Module Configuration & Interface

View File

@ -7,16 +7,16 @@
#include <ipc4/base-config.h>
#include <sof/audio/component_ext.h>
#include "copier.h"
#include <sof/common.h>
LOG_MODULE_DECLARE(copier, CONFIG_SOF_LOG_LEVEL);
#ifdef COPIER_GENERIC
#if SOF_USE_HIFI(NONE, COPIER)
#include <sof/audio/buffer.h>
#include <sof/audio/format.h>
#include <sof/audio/pipeline.h>
#include <sof/audio/component.h>
#include <sof/common.h>
#include <stddef.h>
#include <errno.h>
#include <stdint.h>

View File

@ -4,15 +4,15 @@
//
// Author: Andrula Song <xiaoyuan.song@intel.com>
#include "copier.h"
#include <sof/common.h>
#if __XCC__ && (XCHAL_HAVE_HIFI3 || XCHAL_HAVE_HIFI4)
#if SOF_USE_HIFI(3, COPIER) || SOF_USE_HIFI(4, COPIER) || SOF_USE_HIFI(5, COPIER)
#include <sof/audio/buffer.h>
#include <sof/audio/component_ext.h>
#include <sof/audio/format.h>
#include <sof/audio/pipeline.h>
#include <sof/audio/component.h>
#include <sof/common.h>
#include <stddef.h>
#include <errno.h>
#include <stdint.h>